{"_id":"@2ji-han/kuromoji.js","_rev":"3-bb729aa471b179c4462258cea9ffdb58","name":"@2ji-han/kuromoji.js","dist-tags":{"latest":"0.1.8"},"versions":{"0.1.6":{"name":"@2ji-han/kuromoji.js","version":"0.1.6","keywords":["japanese","morphological analyzer","nlp","pos","pos tagger","tokenizer"],"author":{"name":"2ji-han"},"license":"Apache-2.0","_id":"@2ji-han/kuromoji.js@0.1.6","maintainers":[{"name":"am4_02","email":"iiijihan@outlook.jp"}],"contributors":[{"name":"Takuya Asano","email":"takuya.a@gmail.com"},{"name":"f1w3"},{"name":"2ji-han"}],"homepage":"https://github.com/2ji-han/kuromoji.js#readme","bugs":{"url":"https://github.com/2ji-han/kuromoji.js/issues"},"dist":{"shasum":"de1433860096d83b89e3b9d2b9c521474347632d","tarball":"https://registry.npmjs.org/@2ji-han/kuromoji.js/-/kuromoji.js-0.1.6.tgz","fileCount":15,"integrity":"sha512-JpZtRxBsPob2mqxcAnGGAVrBGTyEHIK5itFesMqcEbIWKnii5fvX3KJfxz+TT3ir1jrEF98qGIsV2yi7J7LRRQ==","signatures":[{"sig":"MEQCIF+H3tsgglTfwNqY6elsjyWGUIlVgi76CsHgt11XjjJIAiBMP5g5Cjxkqvvdb/ssVVf9zpGXRaxmLtzChRa4L/2/kA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17809028},"type":"module","_from":"file:2ji-han-kuromoji.js-0.1.6.tgz","exports":{".":{"types":"./built/dts/index.d.ts","import":"./built/esm/index.js"},"./*":{"types":"./built/dts/*","import":"./built/esm/*"}},"scripts":{"lint":"biome lint ./src ./playground/src","build":"pnpm run ts-esm && pnpm run ts-dts","check":"biome check ./src ./playground/src","clean":"pnpm scripts/clean.ts","watch":"nodemon -w src -e ts,json --exec \"pnpm --workspace-root build\"","format":"biome format ./src ./playground/src","ts-dts":"tsc --outDir built/dts --declaration true --emitDeclarationOnly true --declarationMap true","ts-esm":"tsc --outDir built/esm","lint:fix":"biome lint ./src ./playground/src --write","changelog":"pnpm scripts/changelog.ts","check:fix":"biome check ./src ./playground/src --write","format:fix":"biome format ./src ./playground/src --write","playground":"pnpm --filter playground run dev"},"_npmUser":{"name":"am4_02","email":"iiijihan@outlook.jp"},"_resolved":"/tmp/72ea703b8951dae9394b53ae95dbe6db/2ji-han-kuromoji.js-0.1.6.tgz","_integrity":"sha512-JpZtRxBsPob2mqxcAnGGAVrBGTyEHIK5itFesMqcEbIWKnii5fvX3KJfxz+TT3ir1jrEF98qGIsV2yi7J7LRRQ==","repository":{"url":"git+https://github.com/2ji-han/kuromoji.js.git","type":"git"},"workspaces":["./playground"],"_npmVersion":"10.8.2","description":"JavaScript implementation of Japanese morphological analyzer","directories":{},"_nodeVersion":"20.18.2","_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.6","nodemon":"^3.1.9","typescript":"^5.0.0","@biomejs/biome":"^1.9.4"},"peerDependencies":{"typescript":"^5.7.2"},"trustedDependencies":["@biomejs/biome"],"_npmOperationalInternal":{"tmp":"tmp/kuromoji.js_0.1.6_1740240356662_0.7334390761009217","host":"s3://npm-registry-packages-npm-production"}},"0.1.7":{"name":"@2ji-han/kuromoji.js","version":"0.1.7","keywords":["japanese","morphological analyzer","nlp","pos","pos tagger","tokenizer"],"author":{"name":"2ji-han"},"license":"Apache-2.0","_id":"@2ji-han/kuromoji.js@0.1.7","maintainers":[{"name":"am4_02","email":"iiijihan@outlook.jp"}],"contributors":[{"name":"Takuya Asano","email":"takuya.a@gmail.com"},{"name":"f1w3"},{"name":"2ji-han"}],"homepage":"https://github.com/2ji-han/kuromoji.js#readme","bugs":{"url":"https://github.com/2ji-han/kuromoji.js/issues"},"dist":{"shasum":"d1370075508d5990d8276b0b6e6ff64985b54d8d","tarball":"https://registry.npmjs.org/@2ji-han/kuromoji.js/-/kuromoji.js-0.1.7.tgz","fileCount":87,"integrity":"sha512-fwLWKPT23vyVAUXtllMp3TlM17V/3gmPSuKGgE7Hd5kP/DZ7ruMSjnmXd2GG710+FpA8CsWBJjegpkrTov64BQ==","signatures":[{"sig":"MEUCIQD5DYbHQkU0Sig3GVTbGYVFIUBphtxnzDDx9CprC1oxZwIgCira2C1bVSZxjrFtbUAz4fAQweiDVlEcpItU2dZVPsA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":182110},"type":"module","_from":"file:2ji-han-kuromoji.js-0.1.7.tgz","exports":{".":{"types":"./built/dts/index.d.ts","import":"./built/esm/index.js"},"./*":{"types":"./built/dts/*","import":"./built/esm/*"}},"scripts":{"lint":"biome lint ./src ./playground/src","build":"pnpm run ts-esm && pnpm run ts-dts","check":"biome check ./src ./playground/src","clean":"pnpm scripts/clean.ts","watch":"nodemon -w src -e ts,json --exec \"pnpm --workspace-root build\"","format":"biome format ./src ./playground/src","ts-dts":"tsc --outDir built/dts --declaration true --emitDeclarationOnly true --declarationMap true","ts-esm":"tsc --outDir built/esm","lint:fix":"biome lint ./src ./playground/src --write","changelog":"pnpm scripts/changelog.ts","check:fix":"biome check ./src ./playground/src --write","format:fix":"biome format ./src ./playground/src --write","playground":"pnpm --filter playground run dev"},"_npmUser":{"name":"am4_02","email":"iiijihan@outlook.jp"},"_resolved":"/tmp/ad0c87f7e4254399ba0ab2cbe90185bf/2ji-han-kuromoji.js-0.1.7.tgz","_integrity":"sha512-fwLWKPT23vyVAUXtllMp3TlM17V/3gmPSuKGgE7Hd5kP/DZ7ruMSjnmXd2GG710+FpA8CsWBJjegpkrTov64BQ==","repository":{"url":"git+https://github.com/2ji-han/kuromoji.js.git","type":"git"},"workspaces":["./playground"],"_npmVersion":"10.8.2","description":"JavaScript implementation of Japanese morphological analyzer","directories":{},"_nodeVersion":"20.18.2","_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.6","nodemon":"^3.1.9","typescript":"^5.0.0","@biomejs/biome":"^1.9.4"},"peerDependencies":{"typescript":"^5.7.2"},"trustedDependencies":["@biomejs/biome"],"_npmOperationalInternal":{"tmp":"tmp/kuromoji.js_0.1.7_1740240585542_0.28716538688674054","host":"s3://npm-registry-packages-npm-production"}},"0.1.8":{"name":"@2ji-han/kuromoji.js","version":"0.1.8","description":"JavaScript implementation of Japanese morphological analyzer","author":{"name":"2ji-han"},"contributors":[{"name":"Takuya Asano","email":"takuya.a@gmail.com"},{"name":"f1w3"},{"name":"2ji-han"}],"license":"Apache-2.0","type":"module","keywords":["japanese","morphological analyzer","nlp","pos","pos tagger","tokenizer"],"repository":{"type":"git","url":"git+https://github.com/2ji-han/kuromoji.js.git"},"homepage":"https://github.com/2ji-han/kuromoji.js#readme","bugs":{"url":"https://github.com/2ji-han/kuromoji.js/issues"},"exports":{".":{"import":"./built/esm/index.js","types":"./built/dts/index.d.ts"},"./*":{"import":"./built/esm/*","types":"./built/dts/*"}},"devDependencies":{"@biomejs/biome":"^1.9.4","nodemon":"^3.1.9","typescript":"^5.0.0","vitest":"^3.0.6"},"peerDependencies":{"typescript":"^5.7.2"},"trustedDependencies":["@biomejs/biome"],"workspaces":["./playground"],"scripts":{"build":"pnpm run ts-esm && pnpm run ts-dts","ts-dts":"tsc --outDir built/dts --declaration true --emitDeclarationOnly true --declarationMap true","ts-esm":"tsc --outDir built/esm","watch":"nodemon -w src -e ts,json --exec \"pnpm --workspace-root build\"","playground":"pnpm --filter playground run dev","clean":"pnpm scripts/clean.ts","lint":"biome lint ./src ./playground/src","format":"biome format ./src ./playground/src","check":"biome check ./src ./playground/src","lint:fix":"biome lint ./src ./playground/src --write","format:fix":"biome format ./src ./playground/src --write","check:fix":"biome check ./src ./playground/src --write","changelog":"pnpm scripts/changelog.ts"},"_id":"@2ji-han/kuromoji.js@0.1.8","_integrity":"sha512-eJTalBfgyLtHm/tAQ71wIoG1gcYeKSQUVxWhZIBF8zBVhaz1OnTM2Rmcvmjax4XoFI1zYxThVT6v3D6nT2ix5Q==","_resolved":"/tmp/8c9a531671241b2439ed28cbc9dd900f/2ji-han-kuromoji.js-0.1.8.tgz","_from":"file:2ji-han-kuromoji.js-0.1.8.tgz","_nodeVersion":"20.18.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-eJTalBfgyLtHm/tAQ71wIoG1gcYeKSQUVxWhZIBF8zBVhaz1OnTM2Rmcvmjax4XoFI1zYxThVT6v3D6nT2ix5Q==","shasum":"0cca3e15b8270f8b9dfb94fc87c6f1bb64692293","tarball":"https://registry.npmjs.org/@2ji-han/kuromoji.js/-/kuromoji.js-0.1.8.tgz","fileCount":108,"unpackedSize":258838,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDDAkqCf8UXWYvKcWEJmCTGmdyf1gTw6NP8lvVzj3NXIAiBwpuoCY+gfBlgs/4U08hklvwHcox/cBnsipouTgwVIgA=="}]},"_npmUser":{"name":"am4_02","email":"iiijihan@outlook.jp"},"directories":{},"maintainers":[{"name":"am4_02","email":"iiijihan@outlook.jp"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/kuromoji.js_0.1.8_1753011926722_0.6782446551761703"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-22T16:05:56.567Z","modified":"2025-07-20T11:45:27.089Z","0.1.6":"2025-02-22T16:05:57.086Z","0.1.7":"2025-02-22T16:09:45.769Z","0.1.8":"2025-07-20T11:45:26.911Z"},"bugs":{"url":"https://github.com/2ji-han/kuromoji.js/issues"},"author":{"name":"2ji-han"},"license":"Apache-2.0","homepage":"https://github.com/2ji-han/kuromoji.js#readme","keywords":["japanese","morphological analyzer","nlp","pos","pos tagger","tokenizer"],"repository":{"type":"git","url":"git+https://github.com/2ji-han/kuromoji.js.git"},"description":"JavaScript implementation of Japanese morphological analyzer","contributors":[{"name":"Takuya Asano","email":"takuya.a@gmail.com"},{"name":"f1w3"},{"name":"2ji-han"}],"maintainers":[{"name":"am4_02","email":"iiijihan@outlook.jp"}],"readme":"# kuromoji.js\n\n[![test](https://github.com/f1w3/kuromoji.js/actions/workflows/test.yml/badge.svg)](https://github.com/f1w3/kuromoji.js/actions/workflows/test.yml)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](/LICENSE.txt)\n\n[English](/docs/README-en.md)・[日本語](/docs/README-ja.md)\n\n## this is fork of [@takuyaa/kuromoji.js](https://github.com/takuyaa/kuromoji.js)\n\nand, I was inspired by the following repositories\n\n- **[@MijinkoSD/kuromoji.ts](https://github.com/MijinkoSD/kuromoji.ts)**\n\nOnce again, I would like to thank you!\n\n## futures\n\n- [x] Tests Pass 100% :partying_face:\n- [x] async to promise/await :partying_face:\n- [x] Support and build for browser :partying_face:\n- [x] Asynchronization of init functions(eg. `await kuromoji.builder()`) :partying_face:\n- [ ] Support Stream\n- [ ] kuromoji-server\n- [ ] Support user dictionary\n- [ ] Search mode\n- [ ] Output of N-best solution\n- [ ] Support NAIST-jdic, Unidic\n- [ ] Low dictionary size(use fst?)\n\n## About\n\nJavaScript implementation of Japanese morphological analyzer.\nThis is a pure JavaScript porting of [Kuromoji](https://www.atilika.com/ja/kuromoji/).\n\nYou can see how kuromoji.js works in [demo site](https://coco-ly.com/kuromoji.js/).\n\n## Directory\n\nDirectory tree is as follows:\n```\n.github       -- Github settings\ndict/         -- Dictionaries for tokenizer (gzipped)\ndocs/         -- kuromoji.js documents\n   - demo/     -- kuromoji.js demo page (https://coco-ly.com/kuromoji.js/)\n   - example/  -- Examples to use in Node.js\nscripts/      -- build scripts\nsrc/          -- Type Script source\n```\n\n## Usage\n\nInstall with package manager:\n```\nnpm install kuromoji.js\npnpm install kuromoji.js\nbun install kuromoji.js\n```\n\nLoad this library as follows:\n```typescript\nimport kuromoji from \"kuromoji.js\";\nconst kuromoji = require(\"kuromoji.js\").default;\n//browser\nimport kuromoji from 'https://cdn.jsdelivr.net/npm/kuromoji.js/dist/browser/index.min.js'\n```\n\nYou can tokenize sentences with only 5 lines of code.\nIf you need working examples, you can see the files under the demo or example directory.\n```typescript\nimport kuromoji from \"kuromoji.js\";\n\nkuromoji.builder().build((err, tokenizer) => {\n    // tokenizer is ready\n    const path = tokenizer.tokenize(\"すもももももももものうち\");\n    console.log(path);\n});\n```\n\nAlso, Loading with top-level await is also supported as follows\n```typescript\nimport kuromoji from \"kuromoji.js/promise\";\n\nconst tokenizer = await kuromoji.builder().build();\n\nconst path = tokenizer.tokenize(\"すもももももももものうち\");\nconsole.log(path.length);\n```\n\n## Build Dictionary\n\nWe currently use mecab-ipadic for our dictionaries, but\nYou can build and use your own dictionary as long as it is compatible with mecab-ipadic\n```\nbun build-dict <output path> <dict input path>\n```\n\n## API\n\nThe function tokenize() returns an JSON array like this:\n```typescript\n[ {\n    // word id in dictionary\n    word_id: 509800,\n    // word type (KNOWN for words in the dictionary, UNKNOWN for unknown words)\n    word_type: 'KNOWN',\n    // word start position\n    word_position: 1,\n    // surface form\n    surface_form: '黒文字',\n    // part of speech\n    pos: '名詞',\n    // Part-of-Speech Subdivision 1\n    pos_detail_1: '一般',\n    // Part-of-Speech Subdivision 2\n    pos_detail_2: '*',\n    // Part-of-Speech Subdivision 3\n    pos_detail_3: '*',\n    // conjugated type\n    conjugated_type: '*',\n    // conjugated form\n    conjugated_form: '*',\n    // basic form\n    basic_form: '黒文字',\n    // reading\n    reading: 'クロモジ',\n    // pronunciation\n    pronunciation: 'クロモジ'\n} ]\n```\n\n(This is defined in [src/_core/util/IpadicFormatter.ts](/src/_core/util/IpadicFormatter.ts))\n","readmeFilename":"README.md"}