{"_id":"morpheme-match","_rev":"9-00c19b02b89d5796d918941ed824acb0","name":"morpheme-match","description":"match function that match token(形態素解析) with sentence.","dist-tags":{"latest":"2.0.4"},"versions":{"1.0.1":{"name":"morpheme-match","repository":{"type":"git","url":"git+https://github.com/azu/morpheme-match.git"},"author":{"name":"azu"},"email":"azuciao@gmail.com","homepage":"https://github.com/azu/morpheme-match","license":"MIT","bugs":{"url":"https://github.com/azu/morpheme-match/issues"},"files":["src/","lib/"],"version":"1.0.1","main":"lib/morpheme-match.js","directories":{"test":"test"},"scripts":{"test":"mocha test/","build":"NODE_ENV=production babel src --out-dir lib --source-maps","watch":"babel src --out-dir lib --watch --source-maps","prepublish":"npm run --if-present build","build:website":"cd website && npm i && npm run build"},"keywords":["morpheme","形態素","japanese","text"],"description":"match function that match token(形態素解析) with sentence.","devDependencies":{"@alrra/travis-scripts":"^3.0.1","babel-cli":"^6.9.0","babel-loader":"^6.2.4","babel-preset-es2015":"^6.9.0","babel-preset-jsdoc-to-assert":"^2.0.1","babel-preset-power-assert":"^1.0.0","babel-register":"^6.9.0","mocha":"^2.5.3","power-assert":"^1.4.1"},"gitHead":"7ec9fd9b02bd02c3efd56fb9e58c00ee5738acd8","_id":"morpheme-match@1.0.1","_shasum":"6eaf5294e2eed194f06c8956ad2e33cbb39dea62","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"dist":{"shasum":"6eaf5294e2eed194f06c8956ad2e33cbb39dea62","tarball":"https://registry.npmjs.org/morpheme-match/-/morpheme-match-1.0.1.tgz","integrity":"sha512-vloTtei4rMqZsF5GeyZmsWnbxg/8hHilTZjrsaD+doFpiMjuk9IyDM4BdWOYrcuYu6a6r1zUq9YD+wLzTOkiTQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFF49Ir/TChG14NG+Qfy1jrhyTWyzkAOIEj5lNlQn2rPAiBQyMGeN6/kkJPo1mZnDlHtxu096jiKzukrpg4jDhol0Q=="}]},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/morpheme-match-1.0.1.tgz_1465297719147_0.003462916472926736"}},"1.1.0":{"name":"morpheme-match","repository":{"type":"git","url":"git+https://github.com/azu/morpheme-match.git"},"author":{"name":"azu"},"email":"azuciao@gmail.com","homepage":"https://github.com/azu/morpheme-match","license":"MIT","bugs":{"url":"https://github.com/azu/morpheme-match/issues"},"files":["src/","lib/"],"version":"1.1.0","main":"lib/morpheme-match.js","directories":{"test":"test"},"scripts":{"test":"mocha test/","build":"NODE_ENV=production babel src --out-dir lib --source-maps","watch":"babel src --out-dir lib --watch --source-maps","prepublish":"npm run --if-present build","build:website":"cd website && npm i && npm run build"},"keywords":["morpheme","形態素","japanese","text"],"description":"match function that match token(形態素解析) with sentence.","devDependencies":{"@alrra/travis-scripts":"^3.0.1","babel-cli":"^6.9.0","babel-loader":"^6.2.4","babel-preset-es2015":"^6.9.0","babel-preset-jsdoc-to-assert":"^2.0.1","babel-preset-power-assert":"^1.0.0","babel-register":"^6.9.0","mocha":"^2.5.3","power-assert":"^1.4.1"},"gitHead":"222880e4d600034ddf5a7788adeba02f6ed9b7a4","_id":"morpheme-match@1.1.0","_shasum":"d8f3330b95e5f27d1cb610f763285c724c25874a","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.2.0","_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"dist":{"shasum":"d8f3330b95e5f27d1cb610f763285c724c25874a","tarball":"https://registry.npmjs.org/morpheme-match/-/morpheme-match-1.1.0.tgz","integrity":"sha512-r+zwvUtj4U9COy9DhD7sMSF8RlkKLYRxEMk/jvSI9Od6z+z0ISMgtNZmX7go1LJzgNW2DqvMVDO/l+F1eAUnLg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHdSk9x5+pg3Wndw1efIlH4ubFAieRFfdnA0SfxhWJPBAiEAn9k58Oe5ulwzBI0HPBKOPfpmxCM0bjhP278RJGg5LzA="}]},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/morpheme-match-1.1.0.tgz_1480767103443_0.041774995159357786"}},"1.2.0":{"name":"morpheme-match","repository":{"type":"git","url":"git+https://github.com/azu/morpheme-match.git"},"author":{"name":"azu"},"email":"azuciao@gmail.com","homepage":"https://github.com/azu/morpheme-match","license":"MIT","bugs":{"url":"https://github.com/azu/morpheme-match/issues"},"version":"1.2.0","main":"lib/morpheme-match.js","directories":{"test":"test"},"scripts":{"test":"mocha test/","build":"NODE_ENV=production babel src --out-dir lib --source-maps","watch":"babel src --out-dir lib --watch --source-maps","prepublish":"npm run --if-present build","build:website":"cd website && npm i && npm run build"},"keywords":["morpheme","形態素","japanese","text"],"description":"match function that match token(形態素解析) with sentence.","devDependencies":{"@alrra/travis-scripts":"^3.0.1","babel-cli":"^6.9.0","babel-loader":"^6.2.4","babel-preset-es2015":"^6.9.0","babel-preset-jsdoc-to-assert":"^2.0.1","babel-preset-power-assert":"^1.0.0","babel-register":"^6.9.0","mocha":"^2.5.3","power-assert":"^1.4.1"},"gitHead":"52a55296b27041fe505f62594cad9119b655224d","_id":"morpheme-match@1.2.0","_npmVersion":"6.5.0","_nodeVersion":"10.13.0","_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"dist":{"integrity":"sha512-gBdzNex59qMxfAqPvnKsAjo99l+MUTbJIwRt34aPQ60YmroLP/DJyEhzpw19MYmmgYGCCiXTWUGi4f+MP1Jfag==","shasum":"754684450f3fcfc344e5c9d435cdcf391f74b321","tarball":"https://registry.npmjs.org/morpheme-match/-/morpheme-match-1.2.0.tgz","fileCount":6,"unpackedSize":15047,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcKiS5CRA9TVsSAnZWagAAVEwP/1LgrYcDe/wQnGm3ygZN\nlXYbizTjJ/KoDGHqOd8jzYv3Y01YE1EUbbzWtRYwLe9YPQnWtliDfFue5WIu\nqCYF9/UPOwnMjI0LGzlodjHC1Oz7nd8jI2QhgN7CvkDiSGEFHs5Ch8Tnt+ck\n0/hDcBL2c9Ehq1zeRaVvBGgq0qujmdY5jKwe55mSTAs9OPLT5neiUbhsCyoY\nqlrIz1kVOhK0jTu2xwmruSYtFRbWNPHRufuw4czhvfA4Fm6ZVdbnhOWmJ5tK\nFHxh95E4YB7cGyTs3rEdDTeTXyeM0e4enbx0cP8m2e34A85bSi3CLuRH/8tQ\nH1/Y26DRdIJGT78+10xiinyNu4gMdxzKlMI/ccDurhsw/CgxrNFPLjaSU1PF\ndaAhy+SxNAt3PJVMe19vbqZgZgA6OsWCyNyIbzKrGh2Pg3sgASciL/Xk86PZ\nlXSj2Q/McY8bq6PMo/U0xq77qoTkryqagMrVmCZGfTHdVD9eTjZUDBcrCs2O\ninSlvVfoCTRCS14ru7ty34JRgryF1M26vaXifdIKHcaEYs7so5orw+wHBS+q\nhaS/7iNdlFzQR5V8mLr/GvsvtJkh5FZ4bjokqtv7Y+PUCfxL4o6NkMvAqW3q\n2NnQyGoO0ADIkkHdUgxsBoe+gz1L3ZfUGBq9hheCIYbxuAPZHX2/OLJnZ+R6\nWIrd\r\n=9fyv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCisNia+H5mkdyPeWQOIJDkirIURkWh8Qju2cwop3zQ3AIhALIfZFYFjiTr8GwOIs+hoslWrVaqxrihtkjfWGaF6GH5"}]},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/morpheme-match_1.2.0_1546265784902_0.24545985894745304"},"_hasShrinkwrap":false},"1.2.1":{"name":"morpheme-match","repository":{"type":"git","url":"git+https://github.com/azu/morpheme-match.git"},"author":{"name":"azu"},"email":"azuciao@gmail.com","homepage":"https://github.com/azu/morpheme-match","license":"MIT","bugs":{"url":"https://github.com/azu/morpheme-match/issues"},"version":"1.2.1","main":"lib/morpheme-match.js","directories":{"test":"test"},"scripts":{"test":"mocha test/","build":"NODE_ENV=production babel src --out-dir lib --source-maps","watch":"babel src --out-dir lib --watch --source-maps","prepublish":"npm run --if-present build","build:website":"cd website && npm i && npm run build"},"keywords":["morpheme","形態素","japanese","text"],"description":"match function that match token(形態素解析) with sentence.","devDependencies":{"@alrra/travis-scripts":"^3.0.1","babel-cli":"^6.9.0","babel-loader":"^6.2.4","babel-preset-es2015":"^6.9.0","babel-preset-jsdoc-to-assert":"^2.0.1","babel-preset-power-assert":"^1.0.0","babel-register":"^6.9.0","mocha":"^2.5.3","power-assert":"^1.4.1"},"gitHead":"3726750f840525d90c854b38bb39b760e8d9f154","_id":"morpheme-match@1.2.1","_npmVersion":"6.5.0","_nodeVersion":"10.13.0","_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"dist":{"integrity":"sha512-SSIcFPas4Dctx5PbrfKbW5XNADlkcn38LI+fqgB9QtminQ7FXeOR3//rnAmooZ1/5zTGeFoi8H9kFBAH9y1nfQ==","shasum":"783cdcf9feb0e8e7da7e794a8a38f6d711796aa0","tarball":"https://registry.npmjs.org/morpheme-match/-/morpheme-match-1.2.1.tgz","fileCount":6,"unpackedSize":16161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcKqFKCRA9TVsSAnZWagAAdLYP/iNxX6s7+AE8RcL07+Hi\nXMEKIj1+YnUp05qWrabG3nbB21ruHnJdChY3du6ZyXZpcVdF/uvkFTdSfgym\n0IpndgFUGl5JD68L8TTdTL8Ls6jL1/DLqjIxfitNCL6qyEM60OlRNsl9EZwQ\nW0zLUZlv9hGmQbHyzOb9YgEUtUlDY2a++UIGCmXh41juZ0nDoaIePZ3mjobo\n0YcrqsiYppH2FDWoy5qMip+orjXjWY09voHgNOW8VbyQNrIf3HyKwAs3g1sX\ng5Fmz5AyALXDBR2v9/8BzPWqu+jYUuAkg0hGScmTn8FIVHwAqXigDqWni9kp\nDwNCZuiw5cyxUowcVV1eSEPsf19BSJAPzy6GlEzmBCkz7zIwSrkfrG97Rwex\n8I4GBFKYRTgNzIJirB15jFHiGk0Gp+vo/wDPffHAbvxIfZ9ic/XkVc3zVeAk\nbC869Y2V9IkSBuTEkB2eAQhVQyuL2N3aDoHkqzqreKapIBHetjD1yHNdM+Ig\nNiA6/YXDQRMKdUFoL7CELXOFZNVDBj6tU+7hS1ukrV33y4GZvVFKcoQvqEzD\n2Odxkid6O+54tLvXFhgAKWy+davQs1DIsYc1QN38ZgkhNcWmX2eHCDBwRnzW\nejE/CN4Up/rCrTsx1GQ9d2Kn3TZwqQ84bKRJO4nWdlWwahtoC+O4XoVkqBO6\nONi5\r\n=8I8v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEZ4QAtnct8+5ABRCk1qchnE8Vut4MdFDL2hLAkUd2QdAiEA7YRB2EVnSe9lnOfX1u0YOCbY8ZQ2TJ9em8tPvgIKsoA="}]},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/morpheme-match_1.2.1_1546297673517_0.0006396115236695366"},"_hasShrinkwrap":false},"2.0.0":{"name":"morpheme-match","version":"2.0.0","description":"match function that match token(形態素解析) with sentence.","keywords":["japanese","morpheme","text","形態素"],"homepage":"https://github.com/azu/morpheme-match","bugs":{"url":"https://github.com/azu/morpheme-match/issues"},"repository":{"type":"git","url":"git+https://github.com/azu/morpheme-match.git"},"license":"MIT","author":{"name":"azu"},"main":"lib/morpheme-match.js","types":"lib/morpheme-match.d.ts","directories":{"test":"test"},"scripts":{"build":"cross-env NODE_ENV=production tsc -p .","build:website":"cd website && npm i && npm run build","prepublish":"npm run --if-present build","test":"mocha \"test/**/*.{js,ts}\"","watch":"tsc -p . --watch"},"devDependencies":{"@types/mocha":"^5.2.7","@types/node":"^12.0.7","cross-env":"^5.2.0","mocha":"^6.1.4","ts-node":"^8.2.0","ts-node-test-register":"^8.0.1","typescript":"^3.5.1"},"email":"azuciao@gmail.com","gitHead":"3c3aa522a214e319eac7bfd7817dbd23b7a56cb0","_id":"morpheme-match@2.0.0","_nodeVersion":"10.15.1","_npmVersion":"lerna/3.14.1/node@v10.15.1+x64 (darwin)","_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"dist":{"integrity":"sha512-6k8vkOliZVX4p3Ufknnlv+QshCRdkxc72b7MVq3Zo8l5dBVLuvM7L7VPnaQJwsWntI3xLLDzDLy84YMHrl35Qw==","shasum":"d95916683e119d916335ffe54e79dfb0b2ceee6a","tarball":"https://registry.npmjs.org/morpheme-match/-/morpheme-match-2.0.0.tgz","fileCount":8,"unpackedSize":16812,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdA3asCRA9TVsSAnZWagAA1t4QAJlkiIa4ZNPJbgxS13xI\n3aBj3nR3M1XR/ytWr5wFhbuodyxu1TBSdMgUU/mC9vjpWU6iFcv6TplxDnWx\n7zKkbdm7n2Z9CL1mt84QQwY2Hx4YNvPaGiLF6HmZDMv+DRpJAxwC8ny4t1k2\nNOgvuTLp8/kD/IzDApU9Fyjd669kxJ7/jd+a0i8nXKx56P92p8UmdPUdrmBP\nGR9gU6GO2YCneg36ZubIfTe6cA93XX84rY4hQqI/3CzDj9zKqjsFX41GJIhK\nQu+Wj4/Li3uEbfbWFfYUNUdSsvj7MCNjReFukqmrJszTW72t9J9Mt8uHZwbI\nr3+9FuAOcRsH1nyakvXY4yjXVhTukDOwyi5KqKYR0gGoPp/vewd3vgCjKdDA\nrwxZ5irKUs5jYAXRcX5lGxN+zQCffeEu6uhtzeYdZdrbVuO7zP+IykOvfNCa\n+BkQCcE6Kp5p42DUv3Tmchfe4x6+Ib8X+A3icBpfLBFss8kKpUR0j40g/BX/\n81yP/XgG2gLyvFfk6/Bg3qWkyOMErOBFFVA7qeY4Y8YHzQlnWS4kL8L1AcQ4\npLkKddYhETz6H4wPkkd1jOOtdpKZRrrFggpNTeWxszD7h5WoQel7vHEFRqX3\nQVxCgs/TC7ZD9+SUyLn0JDFsnwiJX8q/FDoW5wpz3ncfjK97EJanOOp3yd5M\nbkhJ\r\n=12DF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCh6r+0lCec8sWSMnb4nIvokEkvc2I/p+C4YOCq9eBeQAIgPS2tgLIPWq6x8n76fcNithIjeE7LSGZvL8ucUbPiNQg="}]},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/morpheme-match_2.0.0_1560508075345_0.8516843075972451"},"_hasShrinkwrap":false},"2.0.4":{"name":"morpheme-match","version":"2.0.4","description":"match function that match token(形態素解析) with sentence.","keywords":["japanese","morpheme","text","形態素"],"homepage":"https://github.com/azu/morpheme-match","bugs":{"url":"https://github.com/azu/morpheme-match/issues"},"repository":{"type":"git","url":"git+https://github.com/azu/morpheme-match.git"},"license":"MIT","author":{"name":"azu"},"main":"lib/morpheme-match.js","types":"lib/morpheme-match.d.ts","directories":{"test":"test"},"scripts":{"build":"cross-env NODE_ENV=production tsc -p .","build:website":"cd website && npm i && npm run build","prepublish":"npm run --if-present build","test":"mocha \"test/**/*.{js,ts}\"","watch":"tsc -p . --watch"},"devDependencies":{"@types/mocha":"^5.2.7","@types/node":"^12.0.7","cross-env":"^5.2.0","mocha":"^6.1.4","ts-node":"^8.2.0","ts-node-test-register":"^8.0.1","typescript":"^3.5.1"},"email":"azuciao@gmail.com","gitHead":"e04dd2b7ba05005a3c8bd8eae81803e0ca77a95f","_id":"morpheme-match@2.0.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.14.1/node@v12.12.0+x64 (darwin)","_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"dist":{"integrity":"sha512-C3U5g2h47dpztGVePLA8w2O1aQEvuJORwIcahWaCG91YPrq+0u7qcPsF9Nqqe8noFvHwgO7b2EEk3iPnYuGTew==","shasum":"4ce77a4d6b51c0b33b3ca6d398363c42756b0c99","tarball":"https://registry.npmjs.org/morpheme-match/-/morpheme-match-2.0.4.tgz","fileCount":8,"unpackedSize":18499,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdq7KyCRA9TVsSAnZWagAAIBUP/3VffxclwYbLgPOXzh0i\n653cyWbbRv0UuMQPCAE+scdjAHNKyHwvE7SPh52k8iCuJTahX16rpxluEkjJ\nnxake5FNR0MzK2xHoeqSMvW+p4BXKRwLND/z7UJwfFmL6O4QYpeeCnWumibP\nn5e1YDsQEU5AbZ56yOIZ6JUwhV2FB2g4C5X9eoYDm5tpy2L7voNEgwYKU/IP\nGK/5WaRy7VAbEhKL2ZK3KGZs7xf/n2d5sV7E02cDReVJT0gcXpHk5QclBCpn\nYVDAr2+WTOO6fEGR29FGFWg/xrDS7bG+Z1jsWpHJ3ZuwruMuyQZmAJ7h93sY\nbFDrRRfn4Mdw+Q25EYcLqi66znW7DyjogCElobvQKCO3MuKr2Kqx23mDPN+Y\ny3M8rYNldNeoj+UzjVvGY60FcaKBVKWM2rpzcDZLlZXobXP0csLPIlCHfohX\nau4xdv7CfB6JUfNX6C5xUr/+PMXbjp9cEwD4+Mzx5mzj6T6iZe6orkGEzXtR\n9Us4wo6iL+igSgrwK62cvB3kkYM6VOvbNK3NN2iz4kP4ZhWB1sFOxE3WWZPK\nExfhRKAJVJBFMc8PlH8lzFquBTT8O7LXj8w9LvFlM+/+ZR7KbJ76xvNdNgAO\nVVgQWx+uw98NBacVwu1MxCmXNpvwAkdE1ClA8fJYvnZvah19uXK9JCVMs1ed\n2/3q\r\n=407q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIErkdr4vXNLvjp+qDmCJb356V8oC8MVFP/LCK3QyNeNkAiEA9nwsPObnbI1TpIlPq7zY0zoMYhaVySsT2V7BPBRP4To="}]},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/morpheme-match_2.0.4_1571533489785_0.5848203766096172"},"_hasShrinkwrap":false}},"readme":"# morpheme-match \n\nmorpheme-match provide match function that match token with sentence.\n\n形態素解析したトークンを元に、文章にマッチするトークンが含まれているかをチェックするライブラリ。\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n    npm install morpheme-match\n\n## Usage\n\n### createTokenMatcher(expectedTokens): function\n\n`createTokenMatcher()` return `function(token): { match: boolean, tokens?: Array, skipped? Array }`.\n\nWe want to check \"名詞かもしれない\" contain \"かも\" token. \nWrite following:\n\nSee example code with [azu.github.io/morpheme-match/#名詞(かも)しれない](http://azu.github.io/morpheme-match/#名詞(かも)しれない).\n\n```js\nimport {createTokenMatcher} from \"morpheme-match\";\nconst matchToken = createTokenMatcher([\n    {\n        \"surface_form\": \"かも\",\n        \"pos\": \"助詞\",\n        \"pos_detail_1\": \"副助詞\",\n        \"pos_detail_2\": \"*\",\n        \"pos_detail_3\": \"*\",\n        \"conjugated_type\": \"*\",\n        \"conjugated_form\": \"*\",\n        \"basic_form\": \"かも\",\n        \"reading\": \"カモ\",\n        \"pronunciation\": \"カモ\"\n    }\n]);\nconst tokens = [\n    {\n        \"surface_form\": \"名詞\",\n        \"pos\": \"名詞\",\n        \"pos_detail_1\": \"一般\",\n        \"pos_detail_2\": \"*\",\n        \"pos_detail_3\": \"*\",\n        \"conjugated_type\": \"*\",\n        \"conjugated_form\": \"*\",\n        \"basic_form\": \"名詞\",\n        \"reading\": \"メイシ\",\n        \"pronunciation\": \"メイシ\"\n    },\n    // Hit!\n    {\n        \"surface_form\": \"かも\",\n        \"pos\": \"助詞\",\n        \"pos_detail_1\": \"副助詞\",\n        \"pos_detail_2\": \"*\",\n        \"pos_detail_3\": \"*\",\n        \"conjugated_type\": \"*\",\n        \"conjugated_form\": \"*\",\n        \"basic_form\": \"かも\",\n        \"reading\": \"カモ\",\n        \"pronunciation\": \"カモ\"\n    },\n    {\n        \"surface_form\": \"しれ\",\n        \"pos\": \"動詞\",\n        \"pos_detail_1\": \"自立\",\n        \"pos_detail_2\": \"*\",\n        \"pos_detail_3\": \"*\",\n        \"conjugated_type\": \"一段\",\n        \"conjugated_form\": \"未然形\",\n        \"basic_form\": \"しれる\",\n        \"reading\": \"シレ\",\n        \"pronunciation\": \"シレ\"\n    },\n    {\n        \"surface_form\": \"ない\",\n        \"pos\": \"助動詞\",\n        \"pos_detail_1\": \"*\",\n        \"pos_detail_2\": \"*\",\n        \"pos_detail_3\": \"*\",\n        \"conjugated_type\": \"特殊・ナイ\",\n        \"conjugated_form\": \"基本形\",\n        \"basic_form\": \"ない\",\n        \"reading\": \"ナイ\",\n        \"pronunciation\": \"ナイ\"\n    }\n];\nconst result = tokens.some(token => {\n    const {match} = matchToken(token);\n    return match;\n});\nconsole.log(result);// true\n```\n\nIf want to get matched token, write following:\n\n\n```js\nlet resultTokens = [];\nconst result = tokens.some(token => {\n    const {match, tokens, skipped} = matchToken(token);\n    resultTokens = tokens;\n    return match;\n});\nconsole.log(resultTokens);\n/*\n[ { surface_form: 'かも',\n    pos: '助詞',\n    pos_detail_1: '副助詞',\n    pos_detail_2: '*',\n    pos_detail_3: '*',\n    conjugated_type: '*',\n    conjugated_form: '*',\n    basic_form: 'かも',\n    reading: 'カモ',\n    pronunciation: 'カモ' } ]\n*/\n```\n\n### Tips\n\nmorpheme-matchは`_`から始まるキーを無視するため、メタ情報は`_`で書き込む事ができます。\n\n```js\nconst matchToken = createTokenMatcher([\n    {\n        \"surface_form\": \"かも\",\n        \"pos\": \"助詞\",\n        \"pos_detail_1\": \"副助詞\",\n        \"pos_detail_2\": \"*\",\n        \"pos_detail_3\": \"*\",\n        \"conjugated_type\": \"*\",\n        \"conjugated_form\": \"*\",\n        \"basic_form\": \"かも\",\n        \"reading\": \"カモ\",\n        \"pronunciation\": \"カモ\",\n        \"_cature\": \"$1\"\n    }\n]);\n```\n\nキー`_skippable`が`true`の場合はマッチしない場合は無視されます。\n\n\n```js\nconst matchToken = createTokenMatcher([\n    {\n        \"surface_form\": \"かも\",\n    },\n    {\n        \"surface_form\": \"、\",\n        \"_skippable\": true,\n    },\n    {\n        \"surface_form\": \"しれ\",\n    },\n]);\n```\n\n\n\n## 関連\n\n- [azu/morpheme-match-all: A wrapper of morpheme-match API. Match all kuromoji's tokens.](https://github.com/azu/morpheme-match-all)\n    - A wrapper for morpheme-match\n- [textlint-ja/textlint-rule-morpheme-match: 形態素解析結果のTokenベースの辞書でマッチするtextlintルール](https://github.com/textlint-ja/textlint-rule-morpheme-match)\n\n## Changelog\n\nSee [Releases page](https://github.com/azu/morpheme-match/releases).\n\n## Running tests\n\nInstall devDependencies and Run `npm test`:\n\n    npm i -d && npm test\n\n## Contributing\n\nPull requests and stars are always welcome.\nFor bugs and feature requests, [please create an issue](https://github.com/azu/morpheme-match/issues).\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n## Author\n\n- [github/azu](https://github.com/azu)\n- [twitter/azu_re](http://twitter.com/azu_re)\n\n## License\n\nMIT © azu\n","maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"time":{"modified":"2022-06-20T09:34:48.241Z","created":"2016-06-07T11:08:39.612Z","1.0.1":"2016-06-07T11:08:39.612Z","1.1.0":"2016-12-03T12:11:45.542Z","1.2.0":"2018-12-31T14:16:24.984Z","1.2.1":"2018-12-31T23:07:53.665Z","2.0.0":"2019-06-14T10:27:55.457Z","2.0.4":"2019-10-20T01:04:49.919Z"},"homepage":"https://github.com/azu/morpheme-match","keywords":["japanese","morpheme","text","形態素"],"repository":{"type":"git","url":"git+https://github.com/azu/morpheme-match.git"},"author":{"name":"azu"},"bugs":{"url":"https://github.com/azu/morpheme-match/issues"},"license":"MIT","readmeFilename":"README.md"}