{"_id":"fm-index.jsx","_rev":"27-c0ad04824f01e3929afa2d8c8bfdbfdf","name":"fm-index.jsx","description":"FM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"fm-index.jsx","version":"0.1.0","description":"FM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.","scripts":{"build":"grunt build","test":"grunt test","doc":"grunt doc"},"engines":{"node":">=0.8.0"},"keywords":["jsx","altjs","lib","js","amd","commonjs","nodejs","browser"],"main":"./lib/fm-index.jsx","homepage":"https://github.com/shibukawa/fm-index.jsx","bugs":{"url":"https://github.com/shibukawa/fm-index.jsx/issues"},"directories":{"doc":"./doc","lib":"./lib","test":"./test"},"repository":{"type":"git","url":"git://github.com/shibukawa/fm-index.jsx.git"},"devDependencies":{"grunt-contrib-watch":"~0.5.3","grunt":"~0.4.1","grunt-jsx":">=0.1.5","burrows-wheeler-transform.jsx":"~0.1.2","wavelet-matrix.jsx":"~0.1.1","binary-io.jsx":"~0.2.1","binary-support.jsx":"~0.1.0"},"author":{"name":"shibukawa"},"license":"MIT","readme":"fm-index.jsx\n===========================================\n\nSynopsis\n---------------\n\nFM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.\n\nMotivation\n---------------\n\nFM-index is the alternate search algorithm of an inverse index algorithm. FM-index has the following advantages:\n\n1. It doesn't need to split word (like N-gram). It is good for CJK languages.\n2. It can recreate original document from the index file\n3. Index file is compressed.\n4. Easy to control the performance and the index file size.\n\nCode Example\n---------------\n\n### Use from JSX\n\n```js\nimport \"fm-index.jsx\";\n\nclass _Main {\n    static function main(argv : string[]) : void\n    {\n        var fm = new FMIndex();\n        fm.push(\"hello\");\n        fm.push(\"world\");\n        this.fm.build(5);\n        console.log(this.fm.search('world')); // -> [5]\n    }\n}\n```\n\n### Use from node.js\n\n```js\nvar FMIndex = require('fm-index.common.js').FMIndex;\n```\n\n### Use from require.js\n\n```js\n// use fm-index.amd.js\ndefine(['fm-index.jsx'], function (fmindex) {\n\n    var fmindex = fmindex.FMIndex();\n    // Write simple usage here!\n});\n```\n\n### Use via standard JSX function\n\n```html\n<script src=\"fm-index.js}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var FMIndex = JSX.require(\"src/fm-index.js\").FMIndex;\n});\n</script>\n```\n\n### Use via global variables\n\n```html\n<script src=\"fm-index.global.js}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var fmindex = new FMIndex();\n});\n</script>\n```\n\nInstallation\n---------------\n\n```sh\n$ npm install fm-index.jsx\n```\n\nYou should add the following modules to `package.json` if you want to use from JSX:\n\n* burrows-wheeler-transform.jsx\n* wavelet-matrix.jsx\n* binary-io.jsx\n* binary-support.jsx\n\nAPI Reference\n------------------\n\n### class FMIndex()\n\nConstructor.\n\n### FMIndex.push(str : string) : void\n\nAppend string.\n\n### FMIndex.contentSize()\n\nReturn total length of pushed string. It is available before `build()`.\n\n### FMIndex.build(ddic : int, maxChar : int = 65535) : void\n\nBuild search index. `ddic` is a cache density. `(1 / ddic) * 100` % is a actual cache rate.\nIf ddic == 1, densty = 100%, it provides maximum speed but it use match memory and storage.\nInitial recommendation value is 50.\n\n`maxChar` is a maximum character code. If you reduce this, you can save memory.\n\n### FMIndex.size()\n\nReturn contetn size. It is available after `build()`.\n\n### FMIndex.search(keyword : string) : int[]\n\nReturn position list that includes `keyword`.\n\n### FMIndex.getSubstring(pos : int, len : int) : string\n\nReturn original document content \n\n### FMIndex.dump(output : BinaryOutput) : void\n\nExport bit-vector.\n\n### FMIndex.load(input : BinaryInput) : void\n\nImport bit-vector.\n\nDevelopment\n-------------\n\n## JSX\n\nDon't be afraid [JSX](http://jsx.github.io)! If you have an experience of JavaScript, you can learn JSX\nquickly.\n\n* Static type system and unified class syntax.\n* All variables and methods belong to class.\n* JSX includes optimizer. You don't have to write tricky unreadalbe code for speed.\n* You can use almost all JavaScript API as you know. Some functions become static class functions. See [reference](http://jsx.github.io/doc/stdlibref.html).\n\n## Setup\n\nTo create development environment, call following command:\n\n```sh\n$ npm install\n```\n\n## Repository\n\n* Repository: git://github.com/shibukawa/fm-index.jsx.git\n* Issues: https://github.com/shibukawa/fm-index.jsx/issues\n\n## Run Test\n\n```sh\n$ grunt test\n```\n\n## Build\n\n```sh\n$ grunt build\n```\n\n## Generate API reference\n\n```sh\n$ grunt doc\n```\n\nAuthor\n---------\n\n* shibukawa / yoshiki@shibu.jp\n\nLicense\n------------\n\nMIT\n\nComplete license is written in `LICENSE.md`.\n","readmeFilename":"README.md","_id":"fm-index.jsx@0.1.0","dist":{"shasum":"5ef462f45e75503758f7d1afd23a0ca7c9b80e35","tarball":"https://registry.npmjs.org/fm-index.jsx/-/fm-index.jsx-0.1.0.tgz","integrity":"sha512-rmLzOKjAk0cHFikLkmtVjo0ZsEPRaNO7zPLjwa6hiyroiMSepx29VnQREbOJum+ipI9E9p0SeCnE6U5nh1d1RA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBn+NC47IiQx0OKYOtrUAqtyVWlxgH14+1CYmgy+K8TAIhAOoPboBrMItzfGj8xMfZvL+pF+fpFSeSJHGQdkYhekXA"}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"shibu","email":"yoshiki@shibu.jp"},"maintainers":[{"name":"shibu","email":"yoshiki@shibu.jp"}]},"0.1.1":{"name":"fm-index.jsx","version":"0.1.1","description":"FM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.","scripts":{"build":"grunt build","test":"grunt test","doc":"grunt doc"},"engines":{"node":">=0.8.0"},"keywords":["jsx","altjs","lib","js","amd","commonjs","nodejs","browser"],"main":"./lib/fm-index.jsx","homepage":"https://github.com/shibukawa/fm-index.jsx","bugs":{"url":"https://github.com/shibukawa/fm-index.jsx/issues"},"directories":{"doc":"./doc","lib":"./lib","test":"./test"},"repository":{"type":"git","url":"git://github.com/shibukawa/fm-index.jsx.git"},"devDependencies":{"grunt-contrib-watch":"~0.5.3","grunt":"~0.4.1","grunt-jsx":">=0.1.5","burrows-wheeler-transform.jsx":"~0.1.2","wavelet-matrix.jsx":"~0.1.1","binary-io.jsx":"~0.2.1","binary-support.jsx":"~0.1.0"},"author":{"name":"shibukawa"},"license":"MIT","readme":"fm-index.jsx\n===========================================\n\nSynopsis\n---------------\n\nFM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.\n\nMotivation\n---------------\n\nFM-index is the alternate search algorithm of an inverse index algorithm. FM-index has the following advantages:\n\n1. It doesn't need to split word (like N-gram). It is good for CJK languages.\n2. It can recreate original document from the index file\n3. Index file is compressed.\n4. Easy to control the performance and the index file size.\n\nCode Example\n---------------\n\n### Use from JSX\n\n```js\nimport \"fm-index.jsx\";\n\nclass _Main {\n    static function main(argv : string[]) : void\n    {\n        var fm = new FMIndex();\n        fm.push(\"hello\");\n        fm.push(\"world\");\n        this.fm.build(5);\n        console.log(this.fm.search('world')); // -> [5]\n    }\n}\n```\n\n### Use from node.js\n\n```js\nvar FMIndex = require('fm-index.common.js').FMIndex;\n```\n\n### Use from require.js\n\n```js\n// use fm-index.amd.js\ndefine(['fm-index.jsx'], function (fmindex) {\n\n    var fmindex = fmindex.FMIndex();\n    // Write simple usage here!\n});\n```\n\n### Use via standard JSX function\n\n```html\n<script src=\"fm-index.js}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var FMIndex = JSX.require(\"src/fm-index.js\").FMIndex;\n});\n</script>\n```\n\n### Use via global variables\n\n```html\n<script src=\"fm-index.global.js}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var fmindex = new FMIndex();\n});\n</script>\n```\n\nInstallation\n---------------\n\n```sh\n$ npm install fm-index.jsx\n```\n\nYou should add the following modules to `package.json` if you want to use from JSX:\n\n* burrows-wheeler-transform.jsx\n* wavelet-matrix.jsx\n* binary-io.jsx\n* binary-support.jsx\n\nAPI Reference\n------------------\n\n### class FMIndex()\n\nConstructor.\n\n### FMIndex.push(str : string) : void\n\nAppend string.\n\n### FMIndex.contentSize()\n\nReturn total length of pushed string. It is available before `build()`.\n\n### FMIndex.build(ddic : int, maxChar : int = 65535) : void\n\nBuild search index. `ddic` is a cache density. `(1 / ddic) * 100` % is a actual cache rate.\nIf ddic == 1, densty = 100%, it provides maximum speed but it use match memory and storage.\nInitial recommendation value is 50.\n\n`maxChar` is a maximum character code. If you reduce this, you can save memory.\n\n### FMIndex.size()\n\nReturn contetn size. It is available after `build()`.\n\n### FMIndex.search(keyword : string) : int[]\n\nReturn position list that includes `keyword`.\n\n### FMIndex.getSubstring(pos : int, len : int) : string\n\nReturn original document content \n\n### FMIndex.dump(output : BinaryOutput) : void\n\nExport bit-vector.\n\n### FMIndex.load(input : BinaryInput) : void\n\nImport bit-vector.\n\nDevelopment\n-------------\n\n## JSX\n\nDon't be afraid [JSX](http://jsx.github.io)! If you have an experience of JavaScript, you can learn JSX\nquickly.\n\n* Static type system and unified class syntax.\n* All variables and methods belong to class.\n* JSX includes optimizer. You don't have to write tricky unreadalbe code for speed.\n* You can use almost all JavaScript API as you know. Some functions become static class functions. See [reference](http://jsx.github.io/doc/stdlibref.html).\n\n## Setup\n\nTo create development environment, call following command:\n\n```sh\n$ npm install\n```\n\n## Repository\n\n* Repository: git://github.com/shibukawa/fm-index.jsx.git\n* Issues: https://github.com/shibukawa/fm-index.jsx/issues\n\n## Run Test\n\n```sh\n$ grunt test\n```\n\n## Build\n\n```sh\n$ grunt build\n```\n\n## Generate API reference\n\n```sh\n$ grunt doc\n```\n\nAuthor\n---------\n\n* shibukawa / yoshiki@shibu.jp\n\nLicense\n------------\n\nMIT\n\nComplete license is written in `LICENSE.md`.\n","readmeFilename":"README.md","_id":"fm-index.jsx@0.1.1","dist":{"shasum":"f6e955516807cda60216e45869d9b68c4cfff7f3","tarball":"https://registry.npmjs.org/fm-index.jsx/-/fm-index.jsx-0.1.1.tgz","integrity":"sha512-PFOaINjYdbhNwDCsXw/Ml4371mUm/zAmRzDc1aHdbizPYKhw7E1Zbvwd2vyPYjlSrO6+SLuF389MFI4kAkb3Bw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGt/aiMF69Ia13tJIhLrhparrsQHNc1PxgUT2l1jg4nnAiBccOHuBRaEqNHFTA78R8o29kdM+2ZjOqd2vLhQIYpIxQ=="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"shibu","email":"yoshiki@shibu.jp"},"maintainers":[{"name":"shibu","email":"yoshiki@shibu.jp"}]},"0.1.2":{"name":"fm-index.jsx","version":"0.1.2","description":"FM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.","scripts":{"build":"grunt build","test":"grunt test","doc":"grunt doc"},"engines":{"node":">=0.8.0"},"keywords":["jsx","altjs","lib","js","amd","commonjs","nodejs","browser"],"main":"./lib/fm-index.jsx","homepage":"https://github.com/shibukawa/fm-index.jsx","bugs":{"url":"https://github.com/shibukawa/fm-index.jsx/issues"},"directories":{"doc":"./doc","lib":"./lib","test":"./test"},"repository":{"type":"git","url":"git://github.com/shibukawa/fm-index.jsx.git"},"devDependencies":{"grunt-contrib-watch":"~0.5.3","grunt":"~0.4.1","grunt-jsx":">=0.1.5","burrows-wheeler-transform.jsx":"~0.1.2","wavelet-matrix.jsx":"~0.1.3","binary-io.jsx":"~0.2.1","binary-support.jsx":"~0.1.0"},"author":{"name":"shibukawa"},"license":"MIT","readme":"fm-index.jsx\n===========================================\n\nSynopsis\n---------------\n\nFM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.\n\nMotivation\n---------------\n\nFM-index is the alternate search algorithm of an inverse index algorithm. FM-index has the following advantages:\n\n1. It doesn't need to split word (like N-gram). It is good for CJK languages.\n2. It can recreate original document from the index file\n3. Index file is compressed.\n4. Easy to control the performance and the index file size.\n\nCode Example\n---------------\n\n### Use from JSX\n\n```js\nimport \"fm-index.jsx\";\n\nclass _Main {\n    static function main(argv : string[]) : void\n    {\n        var fm = new FMIndex();\n        fm.push(\"hello\");\n        fm.push(\"world\");\n        this.fm.build(5);\n        console.log(this.fm.search('world')); // -> [5]\n    }\n}\n```\n\n### Use from node.js\n\n```js\nvar FMIndex = require('fm-index.common.js').FMIndex;\n```\n\n### Use from require.js\n\n```js\n// use fm-index.amd.js\ndefine(['fm-index.jsx'], function (fmindex) {\n\n    var fmindex = fmindex.FMIndex();\n    // Write simple usage here!\n});\n```\n\n### Use via standard JSX function\n\n```html\n<script src=\"fm-index.js}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var FMIndex = JSX.require(\"src/fm-index.js\").FMIndex;\n});\n</script>\n```\n\n### Use via global variables\n\n```html\n<script src=\"fm-index.global.js}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var fmindex = new FMIndex();\n});\n</script>\n```\n\nInstallation\n---------------\n\n```sh\n$ npm install fm-index.jsx\n```\n\nYou should add the following modules to `package.json` if you want to use from JSX:\n\n* burrows-wheeler-transform.jsx\n* wavelet-matrix.jsx\n* binary-io.jsx\n* binary-support.jsx\n\nAPI Reference\n------------------\n\n### class FMIndex()\n\nConstructor.\n\n### FMIndex.push(str : string) : void\n\nAppend string.\n\n### FMIndex.contentSize()\n\nReturn total length of pushed string. It is available before `build()`.\n\n### FMIndex.build(ddic : int, maxChar : int = 65535) : void\n\nBuild search index. `ddic` is a cache density. `(1 / ddic) * 100` % is a actual cache rate.\nIf ddic == 1, densty = 100%, it provides maximum speed but it use match memory and storage.\nInitial recommendation value is 50.\n\n`maxChar` is a maximum character code. If you reduce this, you can save memory.\n\n### FMIndex.size()\n\nReturn contetn size. It is available after `build()`.\n\n### FMIndex.search(keyword : string) : int[]\n\nReturn position list that includes `keyword`.\n\n### FMIndex.getSubstring(pos : int, len : int) : string\n\nReturn original document content \n\n### FMIndex.dump(output : BinaryOutput) : void\n\nExport bit-vector.\n\n### FMIndex.load(input : BinaryInput) : void\n\nImport bit-vector.\n\nDevelopment\n-------------\n\n## JSX\n\nDon't be afraid [JSX](http://jsx.github.io)! If you have an experience of JavaScript, you can learn JSX\nquickly.\n\n* Static type system and unified class syntax.\n* All variables and methods belong to class.\n* JSX includes optimizer. You don't have to write tricky unreadalbe code for speed.\n* You can use almost all JavaScript API as you know. Some functions become static class functions. See [reference](http://jsx.github.io/doc/stdlibref.html).\n\n## Setup\n\nTo create development environment, call following command:\n\n```sh\n$ npm install\n```\n\n## Repository\n\n* Repository: git://github.com/shibukawa/fm-index.jsx.git\n* Issues: https://github.com/shibukawa/fm-index.jsx/issues\n\n## Run Test\n\n```sh\n$ grunt test\n```\n\n## Build\n\n```sh\n$ grunt build\n```\n\n## Generate API reference\n\n```sh\n$ grunt doc\n```\n\nAuthor\n---------\n\n* shibukawa / yoshiki@shibu.jp\n\nLicense\n------------\n\nMIT\n\nComplete license is written in `LICENSE.md`.\n","readmeFilename":"README.md","_id":"fm-index.jsx@0.1.2","dist":{"shasum":"14c4b7940fd6aefc9e373b05382f810f20b1fc81","tarball":"https://registry.npmjs.org/fm-index.jsx/-/fm-index.jsx-0.1.2.tgz","integrity":"sha512-N/5hkNracUvk/iJY3IrfOYHkn3wWk3c0tqm+0fwSN8pUoeEDuDGP4MaqT0E0dxoKt32izMvFNsCTUOhAYksvcg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICbFcrnTiKNCgBPw5d3GIoYk2AqUzTyqD57hv2SHBIQ1AiA/qMCxnv4mBNaxjz5Tq3cjtxsXivBeV6Wk8oaQDfEUcQ=="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"shibu","email":"yoshiki@shibu.jp"},"maintainers":[{"name":"shibu","email":"yoshiki@shibu.jp"}]},"0.1.3":{"name":"fm-index.jsx","version":"0.1.3","description":"FM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.","scripts":{"build":"grunt build","test":"grunt test","doc":"grunt doc"},"engines":{"node":">=0.8.0"},"keywords":["jsx","altjs","lib","js","amd","commonjs","nodejs","browser"],"main":"./lib/fm-index.jsx","homepage":"https://github.com/shibukawa/fm-index.jsx","bugs":{"url":"https://github.com/shibukawa/fm-index.jsx/issues"},"directories":{"doc":"./doc","lib":"./lib","test":"./test"},"repository":{"type":"git","url":"git://github.com/shibukawa/fm-index.jsx.git"},"devDependencies":{"grunt-contrib-watch":"~0.5.3","grunt":"~0.4.1","grunt-jsx":">=0.1.5","burrows-wheeler-transform.jsx":"~0.1.2","wavelet-matrix.jsx":"~0.1.4","binary-io.jsx":"~0.2.1","binary-support.jsx":"~0.1.0"},"author":{"name":"shibukawa"},"license":"MIT","readme":"fm-index.jsx\n===========================================\n\nSynopsis\n---------------\n\nFM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.\n\nMotivation\n---------------\n\nFM-index is the alternate search algorithm of an inverse index algorithm. FM-index has the following advantages:\n\n1. It doesn't need to split word (like N-gram). It is good for CJK languages.\n2. It can recreate original document from the index file\n3. Index file is compressed.\n4. Easy to control the performance and the index file size.\n\nCode Example\n---------------\n\n### Use from JSX\n\n```js\nimport \"fm-index.jsx\";\n\nclass _Main {\n    static function main(argv : string[]) : void\n    {\n        var fm = new FMIndex();\n        fm.push(\"hello\");\n        fm.push(\"world\");\n        this.fm.build(5);\n        console.log(this.fm.search('world')); // -> [5]\n    }\n}\n```\n\n### Use from node.js\n\n```js\nvar FMIndex = require('fm-index.common.js').FMIndex;\n```\n\n### Use from require.js\n\n```js\n// use fm-index.amd.js\ndefine(['fm-index.amd.jsx'], function (fmindex) {\n\n    var fmindex = fmindex.FMIndex();\n    // Write simple usage here!\n});\n```\n\n### Use via standard JSX function\n\n```html\n<script src=\"fm-index.js}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var FMIndex = JSX.require(\"src/fm-index.js\").FMIndex;\n});\n</script>\n```\n\n### Use via global variables\n\n```html\n<script src=\"fm-index.global.js}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var fmindex = new FMIndex();\n});\n</script>\n```\n\nInstallation\n---------------\n\n```sh\n$ npm install fm-index.jsx\n```\n\nYou should add the following modules to `package.json` if you want to use from JSX:\n\n* burrows-wheeler-transform.jsx\n* wavelet-matrix.jsx\n* binary-io.jsx\n* binary-support.jsx\n\nAPI Reference\n------------------\n\n### class FMIndex()\n\nConstructor.\n\n### FMIndex.push(str : string) : void\n\nAppend string.\n\n### FMIndex.contentSize()\n\nReturn total length of pushed string. It is available before `build()`.\n\n### FMIndex.build(ddic : int, maxChar : int = 65535) : void\n\nBuild search index. `ddic` is a cache density. `(1 / ddic) * 100` % is a actual cache rate.\nIf ddic == 1, densty = 100%, it provides maximum speed but it use match memory and storage.\nInitial recommendation value is 50.\n\n`maxChar` is a maximum character code. If you reduce this, you can save memory.\n\n### FMIndex.size()\n\nReturn contetn size. It is available after `build()`.\n\n### FMIndex.search(keyword : string) : int[]\n\nReturn position list that includes `keyword`.\n\n### FMIndex.getSubstring(pos : int, len : int) : string\n\nReturn original document content \n\n### FMIndex.dump(output : BinaryOutput) : void\n\nExport bit-vector.\n\n### FMIndex.load(input : BinaryInput) : void\n\nImport bit-vector.\n\nDevelopment\n-------------\n\n## JSX\n\nDon't be afraid [JSX](http://jsx.github.io)! If you have an experience of JavaScript, you can learn JSX\nquickly.\n\n* Static type system and unified class syntax.\n* All variables and methods belong to class.\n* JSX includes optimizer. You don't have to write tricky unreadalbe code for speed.\n* You can use almost all JavaScript API as you know. Some functions become static class functions. See [reference](http://jsx.github.io/doc/stdlibref.html).\n\n## Setup\n\nTo create development environment, call following command:\n\n```sh\n$ npm install\n```\n\n## Repository\n\n* Repository: git://github.com/shibukawa/fm-index.jsx.git\n* Issues: https://github.com/shibukawa/fm-index.jsx/issues\n\n## Run Test\n\n```sh\n$ grunt test\n```\n\n## Build\n\n```sh\n$ grunt build\n```\n\n## Generate API reference\n\n```sh\n$ grunt doc\n```\n\nAuthor\n---------\n\n* shibukawa / yoshiki@shibu.jp\n\nLicense\n------------\n\nMIT\n\nComplete license is written in `LICENSE.md`.\n","readmeFilename":"README.md","_id":"fm-index.jsx@0.1.3","dist":{"shasum":"57701485c41be3258cc31ef6560ab69c96f146c3","tarball":"https://registry.npmjs.org/fm-index.jsx/-/fm-index.jsx-0.1.3.tgz","integrity":"sha512-02+XD3L746XKWf1+pZhThMgBsIDNHs5F0q7cru2+I4Nsx2laIJMYA+HR5cFBrSfOxCBt3ilRGWuCz/OqBCvVsA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2+278G0SIazB2AsufFuIoBXgBDXIR5abFm60+tYQLEQIhAKSRZx7WL1MLBrHNnDJMVOC+o3M77y60pbgyd11S9pXr"}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"shibu","email":"yoshiki@shibu.jp"},"maintainers":[{"name":"shibu","email":"yoshiki@shibu.jp"}]},"0.2.0":{"name":"fm-index.jsx","version":"0.2.0","description":"FM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.","scripts":{"build":"grunt build","test":"grunt test","doc":"grunt doc"},"engines":{"node":">=0.8.0"},"keywords":["jsx","altjs","lib","js","amd","commonjs","nodejs","browser"],"main":"./lib/fm-index.jsx","homepage":"https://github.com/shibukawa/fm-index.jsx","bugs":{"url":"https://github.com/shibukawa/fm-index.jsx/issues"},"directories":{"doc":"./doc","lib":"./lib","test":"./test"},"repository":{"type":"git","url":"git://github.com/shibukawa/fm-index.jsx.git"},"devDependencies":{"grunt-contrib-watch":"~0.5.3","grunt":"~0.4.1","grunt-jsx":">=0.1.5","burrows-wheeler-transform.jsx":"~0.1.2","wavelet-matrix.jsx":"~0.2.0","binary-io.jsx":"~0.2.1","binary-support.jsx":"~0.1.0","bit-vector.jsx":"~0.3.1"},"author":{"name":"shibukawa"},"license":"MIT","readme":"fm-index.jsx\n===========================================\n\nSynopsis\n---------------\n\nFM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.\n\nMotivation\n---------------\n\nFM-index is the alternate search algorithm of an inverse index algorithm. FM-index has the following advantages:\n\n1. It doesn't need to split word (like N-gram). It is good for CJK languages.\n2. It can recreate original document from the index file\n3. Index file is compressed.\n4. Easy to control the performance and the index file size.\n\nCode Example\n---------------\n\n### Use from JSX\n\n```js\nimport \"fm-index.jsx\";\n\nclass _Main {\n    static function main(argv : string[]) : void\n    {\n        var fm = new FMIndex();\n        fm.push(\"hello\");\n        fm.push(\"world\");\n        this.fm.build(5);\n        console.log(this.fm.search('world')); // -> [5]\n    }\n}\n```\n\n### Use from node.js\n\n```js\nvar FMIndex = require('fm-index.common.js').FMIndex;\n```\n\n### Use from require.js\n\n```js\n// use fm-index.amd.js\ndefine(['fm-index.amd.jsx'], function (fmindex) {\n\n    var fmindex = fmindex.FMIndex();\n    // Write simple usage here!\n});\n```\n\n### Use via standard JSX function\n\n```html\n<script src=\"fm-index.js}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var FMIndex = JSX.require(\"src/fm-index.js\").FMIndex;\n});\n</script>\n```\n\n### Use via global variables\n\n```html\n<script src=\"fm-index.global.js}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var fmindex = new FMIndex();\n});\n</script>\n```\n\nInstallation\n---------------\n\n```sh\n$ npm install fm-index.jsx\n```\n\nYou should add the following modules to `package.json` if you want to use from JSX:\n\n* burrows-wheeler-transform.jsx\n* wavelet-matrix.jsx\n* binary-io.jsx\n* binary-support.jsx\n\nAPI Reference\n------------------\n\n### class FMIndex()\n\nConstructor.\n\n### FMIndex.push(str : string) : void\n\nAppend string.\n\n### FMIndex.contentSize()\n\nReturn total length of pushed string. It is available before `build()`.\n\n### FMIndex.build(ddic : int, maxChar : int = 65535) : void\n\nBuild search index. `ddic` is a cache density. `(1 / ddic) * 100` % is a actual cache rate.\nIf ddic == 1, densty = 100%, it provides maximum speed but it use match memory and storage.\nInitial recommendation value is 50.\n\n`maxChar` is a maximum character code. If you reduce this, you can save memory.\n\n### FMIndex.size()\n\nReturn contetn size. It is available after `build()`.\n\n### FMIndex.search(keyword : string) : int[]\n\nReturn position list that includes `keyword`.\n\n### FMIndex.getSubstring(pos : int, len : int) : string\n\nReturn original document content.\n\n### FMIndex.dump(output : BinaryOutput) : void\n\nExport bit-vector.\n\n### FMIndex.load(input : BinaryInput) : void\n\nImport bit-vector.\n\nDevelopment\n-------------\n\n## JSX\n\nDon't be afraid [JSX](http://jsx.github.io)! If you have an experience of JavaScript, you can learn JSX\nquickly.\n\n* Static type system and unified class syntax.\n* All variables and methods belong to class.\n* JSX includes optimizer. You don't have to write tricky unreadalbe code for speed.\n* You can use almost all JavaScript API as you know. Some functions become static class functions. See [reference](http://jsx.github.io/doc/stdlibref.html).\n\n## Setup\n\nTo create development environment, call following command:\n\n```sh\n$ npm install\n```\n\n## Repository\n\n* Repository: git://github.com/shibukawa/fm-index.jsx.git\n* Issues: https://github.com/shibukawa/fm-index.jsx/issues\n\n## Run Test\n\n```sh\n$ grunt test\n```\n\n## Build\n\n```sh\n$ grunt build\n```\n\n## Generate API reference\n\n```sh\n$ grunt doc\n```\n\nAuthor\n---------\n\n* shibukawa / yoshiki@shibu.jp\n\nLicense\n------------\n\nMIT\n\nComplete license is written in `LICENSE.md`.\n","readmeFilename":"README.md","_id":"fm-index.jsx@0.2.0","dist":{"shasum":"e1bbd6cd79548677740823153502b1861412ceb4","tarball":"https://registry.npmjs.org/fm-index.jsx/-/fm-index.jsx-0.2.0.tgz","integrity":"sha512-M7EzK63Mnk9J4zh6GHlmg/sR4RNTEqwtm0xvqLvqqOyNlIiMUeIuJ59j4q77UNAhU+xSpBL0D4psn/++CUr1Ug==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC13LYiBCai2y7D7JI+os3Vw5s1YtipVHHQcR4jMpbppgIhAI2A77DSOXP8xOPpysQ29Jnw+vpYY+L0xtMd3Zn07pum"}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"shibu","email":"yoshiki@shibu.jp"},"maintainers":[{"name":"shibu","email":"yoshiki@shibu.jp"}]},"0.2.1":{"name":"fm-index.jsx","version":"0.2.1","description":"FM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.","scripts":{"build":"grunt build","test":"grunt test","doc":"grunt doc"},"engines":{"node":">=0.8.0"},"keywords":["jsx","altjs","lib","js","amd","commonjs","nodejs","browser"],"main":"./lib/fm-index.jsx","homepage":"https://github.com/shibukawa/fm-index.jsx","bugs":{"url":"https://github.com/shibukawa/fm-index.jsx/issues"},"directories":{"doc":"./doc","lib":"./lib","test":"./test"},"repository":{"type":"git","url":"git://github.com/shibukawa/fm-index.jsx.git"},"devDependencies":{"grunt-contrib-watch":"~0.5.3","grunt":"~0.4.1","grunt-jsx":">=0.1.5","burrows-wheeler-transform.jsx":"~0.2.1","wavelet-matrix.jsx":"~0.2.0","binary-io.jsx":"~0.2.1","binary-support.jsx":"~0.1.0","bit-vector.jsx":"~0.3.1"},"peerDependencies":{"burrows-wheeler-transform.jsx":"~0.2.1","wavelet-matrix.jsx":"~0.2.0","binary-io.jsx":"~0.2.1","binary-support.jsx":"~0.1.0","bit-vector.jsx":"~0.3.1"},"author":{"name":"shibukawa"},"license":"MIT","readme":"fm-index.jsx\n===========================================\n\nSynopsis\n---------------\n\nFM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.\n\nMotivation\n---------------\n\nFM-index is the alternate search algorithm of an inverse index algorithm. FM-index has the following advantages:\n\n1. It doesn't need to split word (like N-gram). It is good for CJK languages.\n2. It can recreate original document from the index file\n3. Index file is compressed.\n4. Easy to control the performance and the index file size.\n\nCode Example\n---------------\n\n### Use from JSX\n\n```js\nimport \"fm-index.jsx\";\n\nclass _Main {\n    static function main(argv : string[]) : void\n    {\n        var fm = new FMIndex();\n        fm.push(\"hello\");\n        fm.push(\"world\");\n        this.fm.build(5);\n        console.log(this.fm.search('world')); // -> [5]\n    }\n}\n```\n\n### Use from node.js\n\n```js\nvar FMIndex = require('fm-index.common.js').FMIndex;\n```\n\n### Use from require.js\n\n```js\n// use fm-index.amd.js\ndefine(['fm-index.amd.jsx'], function (fmindex) {\n\n    var fmindex = fmindex.FMIndex();\n    // Write simple usage here!\n});\n```\n\n### Use via standard JSX function\n\n```html\n<script src=\"fm-index.js\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var FMIndex = JSX.require(\"lib/fm-index.js\").FMIndex;\n});\n</script>\n```\n\n### Use via global variables\n\n```html\n<script src=\"fm-index.global.js\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var fmindex = new FMIndex();\n});\n</script>\n```\n\nInstallation\n---------------\n\n```sh\n$ npm install fm-index.jsx\n```\n\nYou should add the following modules to `package.json` if you want to use from JSX:\n\n* burrows-wheeler-transform.jsx\n* wavelet-matrix.jsx\n* binary-io.jsx\n* binary-support.jsx\n\nAPI Reference\n------------------\n\n### class FMIndex()\n\nConstructor.\n\n### FMIndex.push(str : string) : void\n\nAppend string.\n\n### FMIndex.contentSize()\n\nReturn total length of pushed string. It is available before `build()`.\n\n### FMIndex.build(ddic : int, maxChar : int = 65535) : void\n\nBuild search index. `ddic` is a cache density. `(1 / ddic) * 100` % is a actual cache rate.\nIf ddic == 1, densty = 100%, it provides maximum speed but it use match memory and storage.\nInitial recommendation value is 50.\n\n`maxChar` is a maximum character code. If you reduce this, you can save memory.\n\n### FMIndex.size()\n\nReturn contetn size. It is available after `build()`.\n\n### FMIndex.search(keyword : string) : int[]\n\nReturn position list that includes `keyword`.\n\n### FMIndex.getSubstring(pos : int, len : int) : string\n\nReturn original document content.\n\n### FMIndex.dump(output : BinaryOutput) : void\n\nExport bit-vector.\n\n### FMIndex.load(input : BinaryInput) : void\n\nImport bit-vector.\n\nDevelopment\n-------------\n\n## JSX\n\nDon't be afraid [JSX](http://jsx.github.io)! If you have an experience of JavaScript, you can learn JSX\nquickly.\n\n* Static type system and unified class syntax.\n* All variables and methods belong to class.\n* JSX includes optimizer. You don't have to write tricky unreadalbe code for speed.\n* You can use almost all JavaScript API as you know. Some functions become static class functions. See [reference](http://jsx.github.io/doc/stdlibref.html).\n\n## Setup\n\nTo create development environment, call following command:\n\n```sh\n$ npm install\n```\n\n## Repository\n\n* Repository: git://github.com/shibukawa/fm-index.jsx.git\n* Issues: https://github.com/shibukawa/fm-index.jsx/issues\n\n## Run Test\n\n```sh\n$ grunt test\n```\n\n## Build\n\n```sh\n$ grunt build\n```\n\n## Generate API reference\n\n```sh\n$ grunt doc\n```\n\nAuthor\n---------\n\n* shibukawa / yoshiki@shibu.jp\n\nLicense\n------------\n\nMIT\n\nComplete license is written in `LICENSE.md`.\n","readmeFilename":"README.md","_id":"fm-index.jsx@0.2.1","dist":{"shasum":"361551764b1bb9a0ab26c0bbaa326b98831f9963","tarball":"https://registry.npmjs.org/fm-index.jsx/-/fm-index.jsx-0.2.1.tgz","integrity":"sha512-SPy+wiWBEpbDPjuvoAFyiDjiOIqL+licYZiVpk1gWw2pJV4uyjwbk0oyJa330KKubfsgE4zWCCy0bcYQgJ3fHQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC7U47LkE0zPYY4yiv6zhMbS67ovgMr90MEHViPAL4s7QIhAI95LiZGBsUwgjrCslksYAaGiKTo3YUjyAsw8mKo7zyf"}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"shibu","email":"yoshiki@shibu.jp"},"maintainers":[{"name":"shibu","email":"yoshiki@shibu.jp"}]},"0.2.2":{"name":"fm-index.jsx","version":"0.2.2","description":"FM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.","scripts":{"build":"grunt build","test":"grunt test","doc":"grunt doc"},"engines":{"node":">=0.8.0"},"keywords":["jsx","altjs","lib","js","amd","commonjs","nodejs","browser"],"main":"./lib/fm-index.jsx","homepage":"https://github.com/shibukawa/fm-index.jsx","bugs":{"url":"https://github.com/shibukawa/fm-index.jsx/issues"},"directories":{"doc":"./doc","lib":"./lib","test":"./test"},"repository":{"type":"git","url":"git://github.com/shibukawa/fm-index.jsx.git"},"devDependencies":{"grunt-contrib-watch":"~0.5.3","grunt":"~0.4.1","grunt-jsx":">=0.1.5","burrows-wheeler-transform.jsx":"~0.2.1","wavelet-matrix.jsx":"~0.2.0","binary-io.jsx":"~0.2.1","binary-support.jsx":"~0.1.0","bit-vector.jsx":"~0.3.1"},"peerDependencies":{"burrows-wheeler-transform.jsx":"~0.2.1","wavelet-matrix.jsx":"~0.2.0","binary-io.jsx":"~0.2.1","binary-support.jsx":"~0.1.0","bit-vector.jsx":"~0.3.1"},"author":{"name":"shibukawa"},"license":"MIT","readme":"fm-index.jsx\n===========================================\n\nSynopsis\n---------------\n\nFM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.\n\nMotivation\n---------------\n\nFM-index is the alternate search algorithm of an inverse index algorithm. FM-index has the following advantages:\n\n1. It doesn't need to split word (like N-gram). It is good for CJK languages.\n2. It can recreate original document from the index file\n3. Index file is compressed.\n4. Easy to control the performance and the index file size.\n\nCode Example\n---------------\n\n### Use from JSX\n\n```js\nimport \"fm-index.jsx\";\n\nclass _Main {\n    static function main(argv : string[]) : void\n    {\n        var fm = new FMIndex();\n        fm.push(\"hello\");\n        fm.push(\"world\");\n        this.fm.build(5);\n        console.log(this.fm.search('world')); // -> [5]\n    }\n}\n```\n\n### Use from node.js\n\n```js\nvar FMIndex = require('fm-index.common.js').FMIndex;\n```\n\n### Use from require.js\n\n```js\n// use fm-index.amd.js\ndefine(['fm-index.amd.jsx'], function (fmindex) {\n\n    var fmindex = fmindex.FMIndex();\n    // Write simple usage here!\n});\n```\n\n### Use via standard JSX function\n\n```html\n<script src=\"fm-index.js\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var FMIndex = JSX.require(\"lib/fm-index.js\").FMIndex;\n});\n</script>\n```\n\n### Use via global variables\n\n```html\n<script src=\"fm-index.global.js\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var fmindex = new FMIndex();\n});\n</script>\n```\n\nInstallation\n---------------\n\n```sh\n$ npm install fm-index.jsx\n```\n\nYou should add the following modules to `package.json` if you want to use from JSX:\n\n* burrows-wheeler-transform.jsx\n* wavelet-matrix.jsx\n* binary-io.jsx\n* binary-support.jsx\n\nAPI Reference\n------------------\n\n### class FMIndex()\n\nConstructor.\n\n### FMIndex.push(str : string) : void\n\nAppend string.\n\n### FMIndex.contentSize()\n\nReturn total length of pushed string. It is available before `build()`.\n\n### FMIndex.build(ddic : int, maxChar : int = 65535) : void\n\nBuild search index. `ddic` is a cache density. `(1 / ddic) * 100` % is a actual cache rate.\nIf ddic == 1, densty = 100%, it provides maximum speed but it use match memory and storage.\nInitial recommendation value is 50.\n\n`maxChar` is a maximum character code. If you reduce this, you can save memory.\n\n### FMIndex.size()\n\nReturn contetn size. It is available after `build()`.\n\n### FMIndex.search(keyword : string) : int[]\n\nReturn position list that includes `keyword`.\n\n### FMIndex.getSubstring(pos : int, len : int) : string\n\nReturn original document content.\n\n### FMIndex.dump(output : BinaryOutput) : void\n\nExport bit-vector.\n\n### FMIndex.load(input : BinaryInput) : void\n\nImport bit-vector.\n\nDevelopment\n-------------\n\n## JSX\n\nDon't be afraid [JSX](http://jsx.github.io)! If you have an experience of JavaScript, you can learn JSX\nquickly.\n\n* Static type system and unified class syntax.\n* All variables and methods belong to class.\n* JSX includes optimizer. You don't have to write tricky unreadalbe code for speed.\n* You can use almost all JavaScript API as you know. Some functions become static class functions. See [reference](http://jsx.github.io/doc/stdlibref.html).\n\n## Setup\n\nTo create development environment, call following command:\n\n```sh\n$ npm install\n```\n\n## Repository\n\n* Repository: git://github.com/shibukawa/fm-index.jsx.git\n* Issues: https://github.com/shibukawa/fm-index.jsx/issues\n\n## Run Test\n\n```sh\n$ grunt test\n```\n\n## Build\n\n```sh\n$ grunt build\n```\n\n## Generate API reference\n\n```sh\n$ grunt doc\n```\n\nAuthor\n---------\n\n* shibukawa / yoshiki@shibu.jp\n\nLicense\n------------\n\nMIT\n\nComplete license is written in `LICENSE.md`.\n","readmeFilename":"README.md","_id":"fm-index.jsx@0.2.2","dist":{"shasum":"69c60949c92859785b7745f99fcab85ba93270ed","tarball":"https://registry.npmjs.org/fm-index.jsx/-/fm-index.jsx-0.2.2.tgz","integrity":"sha512-zNgeeJFttrBjScg53jXfuV18vlPbiewQaJDBTrB+5JH8Qka2RkUonBbMnZeKNnFidcbYn9fQZBh0WOQo9GVCvg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAiQWxNGuWOWXBpTut/2hfuLHzwOSgTWNkAgqQiJgZY4AiBPZ86o62PWJv/fpfOOB9H7uiE7EX4x1N76daFQm645mg=="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"shibu","email":"yoshiki@shibu.jp"},"maintainers":[{"name":"shibu","email":"yoshiki@shibu.jp"}]},"0.2.3":{"name":"fm-index.jsx","version":"0.2.3","description":"FM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.","scripts":{"build":"grunt build","test":"grunt test","doc":"grunt doc"},"engines":{"node":">=0.8.0"},"keywords":["jsx","altjs","lib","js","amd","commonjs","nodejs","browser"],"main":"./lib/fm-index.jsx","homepage":"https://github.com/shibukawa/fm-index.jsx","bugs":{"url":"https://github.com/shibukawa/fm-index.jsx/issues"},"directories":{"doc":"./doc","lib":"./lib","test":"./test"},"repository":{"type":"git","url":"git://github.com/shibukawa/fm-index.jsx.git"},"devDependencies":{"grunt-contrib-watch":"~0.5.3","grunt":"~0.4.1","grunt-jsx":">=0.1.5","burrows-wheeler-transform.jsx":"~0.2.1","wavelet-matrix.jsx":"~0.2.0","binary-io.jsx":"~0.2.1","binary-support.jsx":"~0.1.0","bit-vector.jsx":"~0.3.1"},"peerDependencies":{"burrows-wheeler-transform.jsx":"~0.2.1","wavelet-matrix.jsx":"~0.2.0","binary-io.jsx":"~0.2.1","binary-support.jsx":"~0.1.0","bit-vector.jsx":"~0.3.1"},"author":{"name":"shibukawa"},"license":"MIT","readme":"fm-index.jsx\n===========================================\n\nSynopsis\n---------------\n\nFM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.\n\nMotivation\n---------------\n\nFM-index is the alternate search algorithm of an inverse index algorithm. FM-index has the following advantages:\n\n1. It doesn't need to split word (like N-gram). It is good for CJK languages.\n2. It can recreate original document from the index file\n3. Index file is compressed.\n4. Easy to control the performance and the index file size.\n\nCode Example\n---------------\n\n### Use from JSX\n\n```js\nimport \"fm-index.jsx\";\n\nclass _Main {\n    static function main(argv : string[]) : void\n    {\n        var fm = new FMIndex();\n        fm.push(\"hello\");\n        fm.push(\"world\");\n        this.fm.build(5);\n        console.log(this.fm.search('world')); // -> [5]\n    }\n}\n```\n\n### Use from node.js\n\n```js\nvar FMIndex = require('fm-index.common.js').FMIndex;\n```\n\n### Use from require.js\n\n```js\n// use fm-index.amd.js\ndefine(['fm-index.amd.jsx'], function (fmindex) {\n\n    var fmindex = fmindex.FMIndex();\n    // Write simple usage here!\n});\n```\n\n### Use via standard JSX function\n\n```html\n<script src=\"fm-index.js\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var FMIndex = JSX.require(\"lib/fm-index.js\").FMIndex;\n});\n</script>\n```\n\n### Use via global variables\n\n```html\n<script src=\"fm-index.global.js\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var fmindex = new FMIndex();\n});\n</script>\n```\n\nInstallation\n---------------\n\n```sh\n$ npm install fm-index.jsx\n```\n\nYou should add the following modules to `package.json` if you want to use from JSX:\n\n* burrows-wheeler-transform.jsx\n* wavelet-matrix.jsx\n* binary-io.jsx\n* binary-support.jsx\n\nAPI Reference\n------------------\n\n### class FMIndex()\n\nConstructor.\n\n### FMIndex.push(str : string) : void\n\nAppend string.\n\n### FMIndex.contentSize()\n\nReturn total length of pushed string. It is available before `build()`.\n\n### FMIndex.build(ddic : int, maxChar : int = 65535) : void\n\nBuild search index. `ddic` is a cache density. `(1 / ddic) * 100` % is a actual cache rate.\nIf ddic == 1, densty = 100%, it provides maximum speed but it use match memory and storage.\nInitial recommendation value is 50.\n\n`maxChar` is a maximum character code. If you reduce this, you can save memory.\n\n### FMIndex.size()\n\nReturn contetn size. It is available after `build()`.\n\n### FMIndex.search(keyword : string) : int[]\n\nReturn position list that includes `keyword`.\n\n### FMIndex.getSubstring(pos : int, len : int) : string\n\nReturn original document content.\n\n### FMIndex.dump(output : BinaryOutput) : void\n\nExport bit-vector.\n\n### FMIndex.load(input : BinaryInput) : void\n\nImport bit-vector.\n\nDevelopment\n-------------\n\n## JSX\n\nDon't be afraid [JSX](http://jsx.github.io)! If you have an experience of JavaScript, you can learn JSX\nquickly.\n\n* Static type system and unified class syntax.\n* All variables and methods belong to class.\n* JSX includes optimizer. You don't have to write tricky unreadalbe code for speed.\n* You can use almost all JavaScript API as you know. Some functions become static class functions. See [reference](http://jsx.github.io/doc/stdlibref.html).\n\n## Setup\n\nTo create development environment, call following command:\n\n```sh\n$ npm install\n```\n\n## Repository\n\n* Repository: git://github.com/shibukawa/fm-index.jsx.git\n* Issues: https://github.com/shibukawa/fm-index.jsx/issues\n\n## Run Test\n\n```sh\n$ grunt test\n```\n\n## Build\n\n```sh\n$ grunt build\n```\n\n## Generate API reference\n\n```sh\n$ grunt doc\n```\n\nAuthor\n---------\n\n* shibukawa / yoshiki@shibu.jp\n\nLicense\n------------\n\nMIT\n\nComplete license is written in `LICENSE.md`.\n","readmeFilename":"README.md","_id":"fm-index.jsx@0.2.3","dist":{"shasum":"ab987bc9b88593c62d085870d62d4c57160715ed","tarball":"https://registry.npmjs.org/fm-index.jsx/-/fm-index.jsx-0.2.3.tgz","integrity":"sha512-QlRwCmShVNEDlnyFjsdn3fpZDxCS2Zs10y5e+1BEojNWMe8Xni3RVJYyQYaxiWe39xT77nOdfFLMFgc1JaEPBA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICcwpXUqgi761px9uuK5YBU28+2/6BSecnPjVMwF3o6JAiA2uqakUL+jZnBI6Qsj+yBPEhU8CvGLP+lL+bBgNVEsOA=="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"shibu","email":"yoshiki@shibu.jp"},"maintainers":[{"name":"shibu","email":"yoshiki@shibu.jp"}]},"0.2.4":{"name":"fm-index.jsx","version":"0.2.4","description":"FM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.","scripts":{"build":"grunt build","test":"grunt test","doc":"grunt doc"},"engines":{"node":">=0.8.0"},"keywords":["jsx","altjs","lib","js","amd","commonjs","nodejs","browser"],"main":"./lib/fm-index.jsx","homepage":"https://github.com/shibukawa/fm-index.jsx","bugs":{"url":"https://github.com/shibukawa/fm-index.jsx/issues"},"directories":{"doc":"./doc","lib":"./lib","test":"./test"},"repository":{"type":"git","url":"git://github.com/shibukawa/fm-index.jsx.git"},"devDependencies":{"grunt-contrib-watch":"~0.5.3","grunt":"~0.4.1","grunt-jsx":">=0.1.5","burrows-wheeler-transform.jsx":"~0.2.1","wavelet-matrix.jsx":"~0.2.0","binary-io.jsx":"~0.2.1","binary-support.jsx":"~0.1.0","bit-vector.jsx":"~0.3.1"},"peerDependencies":{"burrows-wheeler-transform.jsx":"~0.2.1","wavelet-matrix.jsx":"~0.2.0","binary-io.jsx":"~0.2.1","binary-support.jsx":"~0.1.0","bit-vector.jsx":"~0.3.1"},"author":{"name":"shibukawa"},"license":"MIT","readme":"fm-index.jsx\n===========================================\n\nSynopsis\n---------------\n\nFM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.\n\nMotivation\n---------------\n\nFM-index is the alternate search algorithm of an inverse index algorithm. FM-index has the following advantages:\n\n1. It doesn't need to split word (like N-gram). It is good for CJK languages.\n2. It can recreate original document from the index file\n3. Index file is compressed.\n4. Easy to control the performance and the index file size.\n\nCode Example\n---------------\n\n### Use from JSX\n\n```js\nimport \"fm-index.jsx\";\n\nclass _Main {\n    static function main(argv : string[]) : void\n    {\n        var fm = new FMIndex();\n        fm.push(\"hello\");\n        fm.push(\"world\");\n        this.fm.build(5);\n        console.log(this.fm.search('world')); // -> [5]\n    }\n}\n```\n\n### Use from node.js\n\n```js\nvar FMIndex = require('fm-index.common.js').FMIndex;\n```\n\n### Use from require.js\n\n```js\n// use fm-index.amd.js\ndefine(['fm-index.amd.jsx'], function (fmindex) {\n\n    var fmindex = fmindex.FMIndex();\n    // Write simple usage here!\n});\n```\n\n### Use via standard JSX function\n\n```html\n<script src=\"fm-index.js\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var FMIndex = JSX.require(\"lib/fm-index.js\").FMIndex;\n});\n</script>\n```\n\n### Use via global variables\n\n```html\n<script src=\"fm-index.global.js\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var fmindex = new FMIndex();\n});\n</script>\n```\n\nInstallation\n---------------\n\n```sh\n$ npm install fm-index.jsx\n```\n\nYou should add the following modules to `package.json` if you want to use from JSX:\n\n* burrows-wheeler-transform.jsx\n* wavelet-matrix.jsx\n* binary-io.jsx\n* binary-support.jsx\n\nAPI Reference\n------------------\n\n### class FMIndex()\n\nConstructor.\n\n### FMIndex.push(str : string) : void\n\nAppend string.\n\n### FMIndex.contentSize()\n\nReturn total length of pushed string. It is available before `build()`.\n\n### FMIndex.build(ddic : int, maxChar : int = 65535) : void\n\nBuild search index. `ddic` is a cache density. `(1 / ddic) * 100` % is a actual cache rate.\nIf ddic == 1, densty = 100%, it provides maximum speed but it use match memory and storage.\nInitial recommendation value is 50.\n\n`maxChar` is a maximum character code. If you reduce this, you can save memory.\n\n### FMIndex.size()\n\nReturn contetn size. It is available after `build()`.\n\n### FMIndex.search(keyword : string) : int[]\n\nReturn position list that includes `keyword`.\n\n### FMIndex.getSubstring(pos : int, len : int) : string\n\nReturn original document content.\n\n### FMIndex.dump(output : BinaryOutput) : void\n\nExport bit-vector.\n\n### FMIndex.load(input : BinaryInput) : void\n\nImport bit-vector.\n\nDevelopment\n-------------\n\n## JSX\n\nDon't be afraid [JSX](http://jsx.github.io)! If you have an experience of JavaScript, you can learn JSX\nquickly.\n\n* Static type system and unified class syntax.\n* All variables and methods belong to class.\n* JSX includes optimizer. You don't have to write tricky unreadalbe code for speed.\n* You can use almost all JavaScript API as you know. Some functions become static class functions. See [reference](http://jsx.github.io/doc/stdlibref.html).\n\n## Setup\n\nTo create development environment, call following command:\n\n```sh\n$ npm install\n```\n\n## Repository\n\n* Repository: git://github.com/shibukawa/fm-index.jsx.git\n* Issues: https://github.com/shibukawa/fm-index.jsx/issues\n\n## Run Test\n\n```sh\n$ grunt test\n```\n\n## Build\n\n```sh\n$ grunt build\n```\n\n## Generate API reference\n\n```sh\n$ grunt doc\n```\n\nAuthor\n---------\n\n* shibukawa / yoshiki@shibu.jp\n\nLicense\n------------\n\nMIT\n\nComplete license is written in `LICENSE.md`.\n","readmeFilename":"README.md","_id":"fm-index.jsx@0.2.4","dist":{"shasum":"3f017ab9118b9d718c57e97345246160d6be03d1","tarball":"https://registry.npmjs.org/fm-index.jsx/-/fm-index.jsx-0.2.4.tgz","integrity":"sha512-ag9wK0D+4WsiB4QdqFkMUBvasgeYRxrfMhS41P9ModcLpmESpRVcoXp8i8BEKXieHs7Mcz6mALv8I+SXAXqy/A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKeETA/j6rZ/TofXPLTe5OU05D2y0jhoLpYEfBhcUa2wIhAJa+8gpTS4KQ23n6YkcBEX6qbZs2At/RUtdu8N07weH9"}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"shibu","email":"yoshiki@shibu.jp"},"maintainers":[{"name":"shibu","email":"yoshiki@shibu.jp"}]},"0.2.5":{"name":"fm-index.jsx","version":"0.2.5","description":"FM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.","scripts":{"build":"grunt build","test":"grunt test","doc":"grunt doc"},"engines":{"node":">=0.8.0"},"keywords":["jsx","altjs","lib","js","amd","commonjs","nodejs","browser"],"main":"./lib/fm-index.jsx","homepage":"https://github.com/shibukawa/fm-index.jsx","bugs":{"url":"https://github.com/shibukawa/fm-index.jsx/issues"},"directories":{"doc":"./doc","lib":"./lib","test":"./test"},"repository":{"type":"git","url":"git://github.com/shibukawa/fm-index.jsx.git"},"devDependencies":{"grunt-contrib-watch":"~0.5.3","grunt":"~0.4.1","grunt-jsx":">=0.1.5","burrows-wheeler-transform.jsx":"~0.2.1","wavelet-matrix.jsx":"~0.2.2","binary-io.jsx":"~0.2.1","binary-support.jsx":"~0.1.0","bit-vector.jsx":"~0.3.2"},"peerDependencies":{"burrows-wheeler-transform.jsx":"~0.2.1","wavelet-matrix.jsx":"~0.2.1","binary-io.jsx":"~0.2.1","binary-support.jsx":"~0.1.0","bit-vector.jsx":"~0.3.2"},"author":{"name":"shibukawa"},"license":"MIT","readme":"fm-index.jsx\n===========================================\n\nSynopsis\n---------------\n\nFM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.\n\nMotivation\n---------------\n\nFM-index is the alternate search algorithm of an inverse index algorithm. FM-index has the following advantages:\n\n1. It doesn't need to split word (like N-gram). It is good for CJK languages.\n2. It can recreate original document from the index file\n3. Index file is compressed.\n4. Easy to control the performance and the index file size.\n\nCode Example\n---------------\n\n### Use from JSX\n\n```js\nimport \"fm-index.jsx\";\n\nclass _Main {\n    static function main(argv : string[]) : void\n    {\n        var fm = new FMIndex();\n        fm.push(\"hello\");\n        fm.push(\"world\");\n        this.fm.build(5);\n        console.log(this.fm.search('world')); // -> [5]\n    }\n}\n```\n\n### Use from node.js\n\n```js\nvar FMIndex = require('fm-index.common.js').FMIndex;\n```\n\n### Use from require.js\n\n```js\n// use fm-index.amd.js\ndefine(['fm-index.amd.jsx'], function (fmindex) {\n\n    var fmindex = fmindex.FMIndex();\n    // Write simple usage here!\n});\n```\n\n### Use via standard JSX function\n\n```html\n<script src=\"fm-index.js\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var FMIndex = JSX.require(\"lib/fm-index.js\").FMIndex;\n});\n</script>\n```\n\n### Use via global variables\n\n```html\n<script src=\"fm-index.global.js\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var fmindex = new FMIndex();\n});\n</script>\n```\n\nInstallation\n---------------\n\n```sh\n$ npm install fm-index.jsx\n```\n\nYou should add the following modules to `package.json` if you want to use from JSX:\n\n* burrows-wheeler-transform.jsx\n* wavelet-matrix.jsx\n* binary-io.jsx\n* binary-support.jsx\n\nAPI Reference\n------------------\n\n### class FMIndex()\n\nConstructor.\n\n### FMIndex.push(str : string) : void\n\nAppend string.\n\n### FMIndex.contentSize()\n\nReturn total length of pushed string. It is available before `build()`.\n\n### FMIndex.build(ddic : int, maxChar : int = 65535) : void\n\nBuild search index. `ddic` is a cache density. `(1 / ddic) * 100` % is a actual cache rate.\nIf ddic == 1, densty = 100%, it provides maximum speed but it use match memory and storage.\nInitial recommendation value is 50.\n\n`maxChar` is a maximum character code. If you reduce this, you can save memory.\n\n### FMIndex.size()\n\nReturn contetn size. It is available after `build()`.\n\n### FMIndex.search(keyword : string) : int[]\n\nReturn position list that includes `keyword`.\n\n### FMIndex.getSubstring(pos : int, len : int) : string\n\nReturn original document content.\n\n### FMIndex.dump(output : BinaryOutput) : void\n\nExport bit-vector.\n\n### FMIndex.load(input : BinaryInput) : void\n\nImport bit-vector.\n\nDevelopment\n-------------\n\n## JSX\n\nDon't be afraid [JSX](http://jsx.github.io)! If you have an experience of JavaScript, you can learn JSX\nquickly.\n\n* Static type system and unified class syntax.\n* All variables and methods belong to class.\n* JSX includes optimizer. You don't have to write tricky unreadalbe code for speed.\n* You can use almost all JavaScript API as you know. Some functions become static class functions. See [reference](http://jsx.github.io/doc/stdlibref.html).\n\n## Setup\n\nTo create development environment, call following command:\n\n```sh\n$ npm install\n```\n\n## Repository\n\n* Repository: git://github.com/shibukawa/fm-index.jsx.git\n* Issues: https://github.com/shibukawa/fm-index.jsx/issues\n\n## Run Test\n\n```sh\n$ grunt test\n```\n\n## Build\n\n```sh\n$ grunt build\n```\n\n## Generate API reference\n\n```sh\n$ grunt doc\n```\n\nAuthor\n---------\n\n* shibukawa / yoshiki@shibu.jp\n\nLicense\n------------\n\nMIT\n\nComplete license is written in `LICENSE.md`.\n","readmeFilename":"README.md","_id":"fm-index.jsx@0.2.5","dist":{"shasum":"272c5dda239b99eff4f33047a35a824e8a6ee2c9","tarball":"https://registry.npmjs.org/fm-index.jsx/-/fm-index.jsx-0.2.5.tgz","integrity":"sha512-4RP/awXqbxowdkU282oCSzDaUv9w8a/8b+QQizTOSuj8jlqvuI5Qk/cO/xV3IJBKFoHQtkS+dSJCVSdJI7IAWA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFSez9pzHUCCijMKdHLEjbplqNcswACecYu4GbVc9r+NAiEA7cXsPpZVw3Opi7uRjqWqHKpiXtRAutfOgRRyErkGpGE="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"shibu","email":"yoshiki@shibu.jp"},"maintainers":[{"name":"shibu","email":"yoshiki@shibu.jp"}]},"0.2.6":{"name":"fm-index.jsx","version":"0.2.6","description":"FM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.","scripts":{"build":"grunt build","test":"grunt test","doc":"grunt doc"},"engines":{"node":">=0.8.0"},"keywords":["jsx","altjs","lib","js","amd","commonjs","nodejs","browser"],"main":"./lib/fm-index.jsx","homepage":"https://github.com/shibukawa/fm-index.jsx","bugs":{"url":"https://github.com/shibukawa/fm-index.jsx/issues"},"directories":{"doc":"./doc","lib":"./lib","test":"./test"},"repository":{"type":"git","url":"git://github.com/shibukawa/fm-index.jsx.git"},"devDependencies":{"grunt-contrib-watch":"~0.5.3","grunt":"~0.4.1","grunt-jsx":">=0.1.5","burrows-wheeler-transform.jsx":"~0.2.1","wavelet-matrix.jsx":"~0.2.2","binary-io.jsx":"~0.2.1","binary-support.jsx":"~0.1.0","bit-vector.jsx":"~0.3.2"},"peerDependencies":{"burrows-wheeler-transform.jsx":"~0.2.1","wavelet-matrix.jsx":"~0.2.1","binary-io.jsx":"~0.2.1","binary-support.jsx":"~0.1.0","bit-vector.jsx":"~0.3.2"},"author":{"name":"shibukawa"},"license":"MIT","readme":"fm-index.jsx\n===========================================\n\nSynopsis\n---------------\n\nFM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.\n\nMotivation\n---------------\n\nFM-index is the alternate search algorithm of an inverse index algorithm. FM-index has the following advantages:\n\n1. It doesn't need to split word (like N-gram). It is good for CJK languages.\n2. It can recreate original document from the index file\n3. Index file is compressed.\n4. Easy to control the performance and the index file size.\n\nCode Example\n---------------\n\n### Use from JSX\n\n```js\nimport \"fm-index.jsx\";\n\nclass _Main {\n    static function main(argv : string[]) : void\n    {\n        var fm = new FMIndex();\n        fm.push(\"hello\");\n        fm.push(\"world\");\n        this.fm.build(5);\n        console.log(this.fm.search('world')); // -> [5]\n    }\n}\n```\n\n### Use from node.js\n\n```js\nvar FMIndex = require('fm-index.common.js').FMIndex;\n```\n\n### Use from require.js\n\n```js\n// use fm-index.amd.js\ndefine(['fm-index.amd.jsx'], function (fmindex) {\n\n    var fmindex = fmindex.FMIndex();\n    // Write simple usage here!\n});\n```\n\n### Use via standard JSX function\n\n```html\n<script src=\"fm-index.js\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var FMIndex = JSX.require(\"lib/fm-index.js\").FMIndex;\n});\n</script>\n```\n\n### Use via global variables\n\n```html\n<script src=\"fm-index.global.js\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var fmindex = new FMIndex();\n});\n</script>\n```\n\nInstallation\n---------------\n\n```sh\n$ npm install fm-index.jsx\n```\n\nYou should add the following modules to `package.json` if you want to use from JSX:\n\n* burrows-wheeler-transform.jsx\n* wavelet-matrix.jsx\n* binary-io.jsx\n* binary-support.jsx\n\nAPI Reference\n------------------\n\n### class FMIndex()\n\nConstructor.\n\n### FMIndex.push(str : string) : void\n\nAppend string.\n\n### FMIndex.contentSize()\n\nReturn total length of pushed string. It is available before `build()`.\n\n### FMIndex.build(ddic : int, maxChar : int = 65535) : void\n\nBuild search index. `ddic` is a cache density. `(1 / ddic) * 100` % is a actual cache rate.\nIf ddic == 1, densty = 100%, it provides maximum speed but it use match memory and storage.\nInitial recommendation value is 50.\n\n`maxChar` is a maximum character code. If you reduce this, you can save memory.\n\n### FMIndex.size()\n\nReturn contetn size. It is available after `build()`.\n\n### FMIndex.search(keyword : string) : int[]\n\nReturn position list that includes `keyword`.\n\n### FMIndex.getSubstring(pos : int, len : int) : string\n\nReturn original document content.\n\n### FMIndex.dump(output : BinaryOutput) : void\n\nExport bit-vector.\n\n### FMIndex.load(input : BinaryInput) : void\n\nImport bit-vector.\n\nDevelopment\n-------------\n\n## JSX\n\nDon't be afraid [JSX](http://jsx.github.io)! If you have an experience of JavaScript, you can learn JSX\nquickly.\n\n* Static type system and unified class syntax.\n* All variables and methods belong to class.\n* JSX includes optimizer. You don't have to write tricky unreadalbe code for speed.\n* You can use almost all JavaScript API as you know. Some functions become static class functions. See [reference](http://jsx.github.io/doc/stdlibref.html).\n\n## Setup\n\nTo create development environment, call following command:\n\n```sh\n$ npm install\n```\n\n## Repository\n\n* Repository: git://github.com/shibukawa/fm-index.jsx.git\n* Issues: https://github.com/shibukawa/fm-index.jsx/issues\n\n## Run Test\n\n```sh\n$ grunt test\n```\n\n## Build\n\n```sh\n$ grunt build\n```\n\n## Generate API reference\n\n```sh\n$ grunt doc\n```\n\nAuthor\n---------\n\n* shibukawa / yoshiki@shibu.jp\n\nLicense\n------------\n\nMIT\n\nComplete license is written in `LICENSE.md`.\n","readmeFilename":"README.md","_id":"fm-index.jsx@0.2.6","dist":{"shasum":"1f11fe8c68affba124e605f59d38aab1bb67ba79","tarball":"https://registry.npmjs.org/fm-index.jsx/-/fm-index.jsx-0.2.6.tgz","integrity":"sha512-PPdaOOqTkOhlN6Z6Z1kKKkDnyeS6UCE+p/2EBjlQB/RlQFxI3NvblZuRZvyVLV20gGBlJAzhTmr6PjkXGFj18g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWqT/jXBNB0at6CJgcA/Je6IVjCTb3bYyCXpLsH1hthgIhAPW59LlLkKbzAxvgaoo4OIjbTSU01gy4zNY/HTOZ420Y"}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"shibu","email":"yoshiki@shibu.jp"},"maintainers":[{"name":"shibu","email":"yoshiki@shibu.jp"}]},"0.3.0":{"name":"fm-index.jsx","version":"0.3.0","description":"FM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.","scripts":{"build":"./node_modules/.bin/grunt build","test":"./node_modules/.bin/grunt test","doc":"./node_modules/.bin/grunt doc"},"engines":{"node":">=0.8.0"},"keywords":["jsx","altjs","lib","js","amd","commonjs","nodejs","browser","nlp","search"],"main":"./lib/fm-index.jsx","homepage":"https://github.com/shibukawa/fm-index.jsx","bugs":{"url":"https://github.com/shibukawa/fm-index.jsx/issues"},"directories":{"doc":"./doc","lib":"./lib","test":"./test"},"repository":{"type":"git","url":"git://github.com/shibukawa/fm-index.jsx.git"},"devDependencies":{"grunt-contrib-watch":"~0.5.3","grunt":"~0.4.1","grunt-jsx":">=0.1.5","grunt-cli":"~0.1.10","burrows-wheeler-transform.jsx":"~0.3.0","wavelet-matrix.jsx":"~0.3.0","binary-io.jsx":"~0.3.0","binary-support.jsx":"~0.2.0","bit-vector.jsx":"~0.4.0"},"peerDependencies":{"burrows-wheeler-transform.jsx":"~0.3.0","wavelet-matrix.jsx":"~0.3.0","binary-io.jsx":"~0.3.0","binary-support.jsx":"~0.2.0","bit-vector.jsx":"~0.4.0"},"author":{"name":"shibukawa"},"license":"MIT","readme":"fm-index.jsx\n===========================================\n\n[![Build Status](https://travis-ci.org/shibukawa/fm-index.jsx.png)](https://travis-ci.org/shibukawa/fm-index.jsx)\n\nSynopsis\n---------------\n\nFM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.\n\nMotivation\n---------------\n\nFM-index is the alternate search algorithm of an inverse index algorithm. FM-index has the following advantages:\n\n1. It doesn't need to split word (like N-gram). It is good for CJK languages.\n2. It can recreate original document from the index file\n3. Index file is compressed.\n4. Easy to control the performance and the index file size.\n\nCode Example\n---------------\n\n### Use from JSX\n\n```js\nimport \"fm-index.jsx\";\n\nclass _Main {\n    static function main(argv : string[]) : void\n    {\n        var fm = new FMIndex();\n        fm.push(\"hello\");\n        fm.push(\"world\");\n        this.fm.build(5);\n        console.log(this.fm.search('world')); // -> [5]\n    }\n}\n```\n\n### Use from node.js\n\n```js\nvar FMIndex = require('fm-index.common.js').FMIndex;\n```\n\n### Use from require.js\n\n```js\n// use fm-index.amd.js\ndefine(['fm-index.amd.jsx'], function (fmindex) {\n\n    var fmindex = fmindex.FMIndex();\n    // Write simple usage here!\n});\n```\n\n### Use via standard JSX function\n\n```html\n<script src=\"fm-index.js\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var FMIndex = JSX.require(\"lib/fm-index.js\").FMIndex;\n});\n</script>\n```\n\n### Use via global variables\n\n```html\n<script src=\"fm-index.global.js\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var fmindex = new FMIndex();\n});\n</script>\n```\n\nInstallation\n---------------\n\n```sh\n$ npm install fm-index.jsx\n```\n\nYou should add the following modules to `package.json` if you want to use from JSX:\n\n* burrows-wheeler-transform.jsx (0.3.x)\n* wavelet-matrix.jsx (0.3.x)\n* binary-io.jsx (0.3.x)\n* bit-vector.jsx (0.4.x)\n* binary-support.jsx (0.2.x)\n\nIf you want to use this library from other JSX project, install like the following:\n\n```sh\n$ npm install fm-index.jsx --save-dev\n```\n\nor add like these lines to your parent project's `package.json`:\n\n```js\n   devDependencies: {\n       \"fm-index.jsx\": \"~0.3.0\"\n   },\n   peerDepenencies: {\n       \"fm-index.jsx\": \"~0.3.0\"\n   }\n```\n\nAnd add `node_modules/fm-index.jsx/src` as a search path.\nYou should add to `peerDepenencies` if your product is library.\n\nAPI Reference\n------------------\n\n### class FMIndex()\n\nConstructor.\n\n### FMIndex.push(str : string) : void\n\nAppend string.\n\n### FMIndex.contentSize()\n\nReturn total length of pushed string. It is available before `build()`.\n\n### FMIndex.build(ddic : int, maxChar : int = 65535) : void\n\nBuild search index. `ddic` is a cache density. `(1 / ddic) * 100` % is a actual cache rate.\nIf ddic == 1, densty = 100%, it provides maximum speed but it use match memory and storage.\nInitial recommendation value is 50.\n\n`maxChar` is a maximum character code. If you reduce this, you can save memory.\n\n### FMIndex.size()\n\nReturn contetn size. It is available after `build()`.\n\n### FMIndex.search(keyword : string) : int[]\n\nReturn position list that includes `keyword`.\n\n### FMIndex.getSubstring(pos : int, len : int) : string\n\nReturn original document content.\n\n### FMIndex.dump(output : BinaryOutput) : void\n\nExport bit-vector.\n\n### FMIndex.load(input : BinaryInput) : void\n\nImport bit-vector.\n\nDevelopment\n-------------\n\n## JSX\n\nDon't be afraid [JSX](http://jsx.github.io)! If you have an experience of JavaScript, you can learn JSX\nquickly.\n\n* Static type system and unified class syntax.\n* All variables and methods belong to class.\n* JSX includes optimizer. You don't have to write tricky unreadalbe code for speed.\n* You can use almost all JavaScript API as you know. Some functions become static class functions. See [reference](http://jsx.github.io/doc/stdlibref.html).\n\n## Setup\n\nTo create development environment, call following command:\n\n```sh\n$ npm install\n```\n\n## Repository\n\n* Repository: git://github.com/shibukawa/fm-index.jsx.git\n* Issues: https://github.com/shibukawa/fm-index.jsx/issues\n\n## Run Test\n\n```sh\n$ grunt test\n```\n\n## Build\n\n```sh\n$ grunt build\n```\n\n## Generate API reference\n\n```sh\n$ grunt doc\n```\n\nAuthor\n---------\n\n* shibukawa / yoshiki@shibu.jp\n\nLicense\n------------\n\nMIT\n\nComplete license is written in `LICENSE.md`.\n","readmeFilename":"README.md","_id":"fm-index.jsx@0.3.0","dist":{"shasum":"3e31f0ce91db6ce60272cd7d08fe7b2a18bab75d","tarball":"https://registry.npmjs.org/fm-index.jsx/-/fm-index.jsx-0.3.0.tgz","integrity":"sha512-KCfT7Sze2tCZWU132PZKoi/0BcQ8pXmHQjnrlXsDDRkH5OtEcHaJetlYuauZAW4pjb1hAhLvKIg/1Qu5dsiZ8g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBKXyJSbIgIOkYpEFPFmllRs0HpKgGVgnVkTg4J4j68tAiEA0PJVWWwQ01BfdaJJ/fFNT434OhXqm5Wi6io7ynNlYU4="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"shibu","email":"yoshiki@shibu.jp"},"maintainers":[{"name":"shibu","email":"yoshiki@shibu.jp"}]}},"readme":"fm-index.jsx\n===========================================\n\nSynopsis\n---------------\n\nFM-index is the fastest full text search algorithm using a compressed index file. This is FM-index for JSX/JS/AMD/Common.js.\n\nMotivation\n---------------\n\nFM-index is the alternate search algorithm of an inverse index algorithm. FM-index has the following advantages:\n\n1. It doesn't need to split word (like N-gram). It is good for CJK languages.\n2. It can recreate original document from the index file\n3. Index file is compressed.\n4. Easy to control the performance and the index file size.\n\nCode Example\n---------------\n\n### Use from JSX\n\n```js\nimport \"fm-index.jsx\";\n\nclass _Main {\n    static function main(argv : string[]) : void\n    {\n        var fm = new FMIndex();\n        fm.push(\"hello\");\n        fm.push(\"world\");\n        this.fm.build(5);\n        console.log(this.fm.search('world')); // -> [5]\n    }\n}\n```\n\n### Use from node.js\n\n```js\nvar FMIndex = require('fm-index.common.js').FMIndex;\n```\n\n### Use from require.js\n\n```js\n// use fm-index.amd.js\ndefine(['fm-index.jsx'], function (fmindex) {\n\n    var fmindex = fmindex.FMIndex();\n    // Write simple usage here!\n});\n```\n\n### Use via standard JSX function\n\n```html\n<script src=\"fm-index.js}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var FMIndex = JSX.require(\"src/fm-index.js\").FMIndex;\n});\n</script>\n```\n\n### Use via global variables\n\n```html\n<script src=\"fm-index.global.js}}\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.onload = function () {\n    var fmindex = new FMIndex();\n});\n</script>\n```\n\nInstallation\n---------------\n\n```sh\n$ npm install fm-index.jsx\n```\n\nYou should add the following modules to `package.json` if you want to use from JSX:\n\n* burrows-wheeler-transform.jsx\n* wavelet-matrix.jsx\n* binary-io.jsx\n* binary-support.jsx\n\nAPI Reference\n------------------\n\n### class FMIndex()\n\nConstructor.\n\n### FMIndex.push(str : string) : void\n\nAppend string.\n\n### FMIndex.contentSize()\n\nReturn total length of pushed string. It is available before `build()`.\n\n### FMIndex.build(ddic : int, maxChar : int = 65535) : void\n\nBuild search index. `ddic` is a cache density. `(1 / ddic) * 100` % is a actual cache rate.\nIf ddic == 1, densty = 100%, it provides maximum speed but it use match memory and storage.\nInitial recommendation value is 50.\n\n`maxChar` is a maximum character code. If you reduce this, you can save memory.\n\n### FMIndex.size()\n\nReturn contetn size. It is available after `build()`.\n\n### FMIndex.search(keyword : string) : int[]\n\nReturn position list that includes `keyword`.\n\n### FMIndex.getSubstring(pos : int, len : int) : string\n\nReturn original document content \n\n### FMIndex.dump(output : BinaryOutput) : void\n\nExport bit-vector.\n\n### FMIndex.load(input : BinaryInput) : void\n\nImport bit-vector.\n\nDevelopment\n-------------\n\n## JSX\n\nDon't be afraid [JSX](http://jsx.github.io)! If you have an experience of JavaScript, you can learn JSX\nquickly.\n\n* Static type system and unified class syntax.\n* All variables and methods belong to class.\n* JSX includes optimizer. You don't have to write tricky unreadalbe code for speed.\n* You can use almost all JavaScript API as you know. Some functions become static class functions. See [reference](http://jsx.github.io/doc/stdlibref.html).\n\n## Setup\n\nTo create development environment, call following command:\n\n```sh\n$ npm install\n```\n\n## Repository\n\n* Repository: git://github.com/shibukawa/fm-index.jsx.git\n* Issues: https://github.com/shibukawa/fm-index.jsx/issues\n\n## Run Test\n\n```sh\n$ grunt test\n```\n\n## Build\n\n```sh\n$ grunt build\n```\n\n## Generate API reference\n\n```sh\n$ grunt doc\n```\n\nAuthor\n---------\n\n* shibukawa / yoshiki@shibu.jp\n\nLicense\n------------\n\nMIT\n\nComplete license is written in `LICENSE.md`.\n","maintainers":[{"name":"shibu","email":"yoshiki@shibu.jp"}],"time":{"modified":"2022-06-18T02:36:38.024Z","created":"2013-10-26T09:15:46.853Z","0.1.0":"2013-10-26T09:15:48.156Z","0.1.1":"2013-10-26T09:20:40.295Z","0.1.2":"2013-10-26T17:52:01.411Z","0.1.3":"2013-10-27T07:11:46.838Z","0.2.0":"2013-10-29T09:44:46.985Z","0.2.1":"2013-10-29T19:15:50.608Z","0.2.2":"2013-10-31T16:39:34.101Z","0.2.3":"2013-11-05T07:32:20.204Z","0.2.4":"2013-11-05T10:01:30.771Z","0.2.5":"2013-11-05T19:03:39.857Z","0.2.6":"2013-11-06T07:00:30.929Z","0.3.0":"2013-11-09T21:28:13.379Z"},"author":{"name":"shibukawa"},"repository":{"type":"git","url":"git://github.com/shibukawa/fm-index.jsx.git"}}