technological-book-corpus-ja

3.0.0 • Public • Published

technological-book-corpus-ja Actions Status: test

日本語技術書のコーパス。

日本語の再配布が可能な技術書を集めたものです。 商用利用できないライセンスを含みます。

主にMarkdownで書かれた技術書を集めたものです。

収集対象

  • 日本語の技術文書
  • 特殊なDSL(Markdownの拡張など)を行っていない文書
  • ある程度の量がある文書
  • 再配布が可能なライセンスである文書

条件に含んでいないもの

  • 校正が十分に行われているかどうか(校正済みの文書を収集するものではない)

利用目的

  • textlintルールのテストのfixtureとして利用する
    • 文書は逐次更新されるため、自動テストには適していません

例) コーパスに含まれている文章に対してtextlintでチェックして意図しない結果がないかを確かめる

npm install --global textlint technological-book-corpus-ja
# --rule でルール名を指定する
technological-book-corpus-ja | xargs textlint --rule textlint-no-todo -f pretty-error

開発中のルールをコーパスでテストする方法。

--prefix tmp/で一時的なディレクトリにインストールして確認する。

mkdir tmp/
npm install --save-dev . textlint technological-book-corpus-ja --prefix tmp/
cd tmp
# --rule でルール名を指定する
technological-book-corpus-ja | xargs textlint --rule textlint-rule-my-rule -f pretty-error --no-textlintrc

Install

Install with npm:

npm install technological-book-corpus-ja

Usage

CLI

$ npm i -g technological-book-corpus-ja
$ technological-book-corpus-ja
/Users/technological-book-corpus-jasource/js-primer/array/README.md
/Users/technological-book-corpus-ja/source/js-primer/comments/README.md
/Users/technological-book-corpus-ja/source/js-primer/condition/README.md
/Users/technological-book-corpus-ja/source/js-primer/data-type/README.md
/Users/technological-book-corpus-ja/source/js-primer/function-method/README.md
/Users/technological-book-corpus-ja/source/js-primer/implicit-coercion/README.md
/Users/technological-book-corpus-ja/source/js-primer/introduction/README.md
/Users/technological-book-corpus-ja/source/js-primer/loop/README.md
/Users/technological-book-corpus-ja/source/js-primer/object/README.md
/Users/technological-book-corpus-ja/source/js-primer/operator/README.md
/Users/technological-book-corpus-ja/source/js-primer/read-eval-print/README.md
/Users/technological-book-corpus-ja/source/js-primer/README.md
/Users/technological-book-corpus-ja/source/js-primer/statement-expression/README.md
/Users/technological-book-corpus-ja/source/js-primer/string/README.md
/Users/technological-book-corpus-ja/source/js-primer/variables/README.md

パターンでの絞り込みもできます。

$ technological-book-corpus-ja "/**/js-primer/**/*.md"

Node.js

const References = {
    "JavaScript-Plugin-Architecture": {
        name: "JavaScript-Plugin-Architecture",
        url: "https://github.com/azu/JavaScript-Plugin-Architecture",
        license: "https://github.com/azu/JavaScript-Plugin-Architecture#license"
    },
    "Introduction-to-Add-on-Development-in-Blender": {
        name: "Introduction-to-Add-on-Development-in-Blender",
        url: "https://github.com/nutti/Introduction-to-Add-on-Development-in-Blender",
        license: "https://github.com/nutti/Introduction-to-Add-on-Development-in-Blender/blob/draft/LICENSE"
    },
    ...
};
/**
 * get files by glob pattern
 * @param {string} patterns glob pattern
 * "/" root is source directory
 * @see https://github.com/isaacs/node-glob
 */
module.exports.findByPattern = function findByPattern(patterns) {};
/**
 * get files by type
 * default all files
 * @param {string} ext
 * e.g) ".md"
 */
module.exports.get = function get(ext = ".*") {};

References

このコーパスは次の文書を含んでいます。 それぞれの文書のライセンスに基づき再配布されています。

文書の追加方法

  1. git submodule add <追加するGit URL> repo/<name>
  2. index.jsReferencesに定義を追加する
  3. build.jscopyTaskに文書のみをコピーする処理を追加する

文書の更新方法

次のコマンドでsubmoduleを更新できる。

  1. npm run update-refs

文書の構造が変わっていないかを確認し、build.jsを修正する

Changelog

See Releases page.

Running tests

Install devDependencies and Run npm test:

npm i -d && npm test

Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, please create an issue.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

License

MIT © azu

Package Sidebar

Install

npm i technological-book-corpus-ja

Weekly Downloads

0

Version

3.0.0

License

MIT

Unpacked Size

3.98 MB

Total Files

289

Last publish

Collaborators

  • azu
  • shirayu
  • takahashim
  • textlint-user
  • hata6502