Giter Site home page Giter Site logo

kuromoji-js-dictionary's Introduction

[WIP]kuromoji-js-dictionary

kuromoji.js用の辞書ファイルを生成するスクリプト mecab-ipadic-neologdの汎用辞書のみプリセットで含んでます。

組み込まれている辞書について

基本の辞書としてmecab用のIPA辞書を使用しています。

IPA辞書 -> dict/mecab-ipadic-2.7.0-20070801.tar.gz

より多くの固有名詞に対応するため、mecab-ipadic-nelogdの中から次の辞書ファイルを使用しています。

  • mecab-user-dict-seed.20180322.csv.xz
  • neologd-adjective-verb-dict-seed.20160324.csv.xz
  • neologd-common-noun-ortho-variant-dict-seed.20170228.csv.xz
  • neologd-noun-sahen-conn-ortho-variant-dict-seed.20160323.csv.xz

準備

GitLFS/xz/nkfのインストール

brew install git-lfs
brew install xz

辞書作成

./bin/run [options]

※ 同梱辞書セットはdictディレクトリに格納済みなので上記コマンドで辞書が生成されます。

mecab-ipadic-nelogdの他の辞書を追加する

  1. ./neologd-seedディレクトリに****.csv.xzを置く
  2. npm run convert を実行
  3. エラーがなければ dict/neologdディレクトリに****.tar.gzが作成されます
  4. 辞書作成を実行する

カスタム辞書の追加

  1. 任意のフォルダに評価済みの辞書データをtar.gzで設置
  2. node index.js -c=/path/to/dict のようにCオプションにオリジナルの辞書データのあるディレクトリを引き渡します

mecab-ipadic-neologdを使用しない場合

./bin/run -n

kuromoji-js-dictionary's People

Contributors

mu-777 avatar sable-virt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.