{"id":14363441,"url":"https://github.com/parmentf/node-sentence-tokenizer","last_synced_at":"2025-04-12T05:29:58.307Z","repository":{"id":6116240,"uuid":"7344143","full_name":"parmentf/node-sentence-tokenizer","owner":"parmentf","description":"Tokenize paragraphs into sentences, and smaller tokens.","archived":false,"fork":false,"pushed_at":"2023-07-02T18:43:36.000Z","size":163,"stargazers_count":48,"open_issues_count":9,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-06T16:40:04.879Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parmentf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-12-27T18:25:04.000Z","updated_at":"2025-03-24T15:40:44.000Z","dependencies_parsed_at":"2024-06-18T17:11:05.555Z","dependency_job_id":null,"html_url":"https://github.com/parmentf/node-sentence-tokenizer","commit_stats":{"total_commits":39,"total_committers":4,"mean_commits":9.75,"dds":"0.17948717948717952","last_synced_commit":"07d3254b05818b1c0ed6ee679604d54527412bb1"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parmentf%2Fnode-sentence-tokenizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parmentf%2Fnode-sentence-tokenizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parmentf%2Fnode-sentence-tokenizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parmentf%2Fnode-sentence-tokenizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parmentf","download_url":"https://codeload.github.com/parmentf/node-sentence-tokenizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248523086,"owners_count":21118434,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-27T17:01:12.818Z","updated_at":"2025-04-12T05:29:58.273Z","avatar_url":"https://github.com/parmentf.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Sentence Tokenizer [![Build Status](https://secure.travis-ci.org/parmentf/node-sentence-tokenizer.png)](http://travis-ci.org/parmentf/node-sentence-tokenizer) [![NPM version](https://badge.fury.io/js/sentence-tokenizer.png)](http://badge.fury.io/js/sentence-tokenizer)\n\nTokenize paragraphs into sentences, and smaller tokens.\n\n## Installation\n\nUse [npm](http://npmjs.org):\n\n```bash\nnpm install sentence-tokenizer\n```\n\n## How to\n\nRequire the module:\n\n```js\nvar Tokenizer = require('sentence-tokenizer');\n```\n\nInstanciate a tokenizer, with the name of the utterer:\n\n```js\nvar tokenizer = new Tokenizer('Chuck');\n```\n\nSet the entry to work on:\n\n```js\ntokenizer.setEntry(\"This is an entry. Possibly composed of several sentences.\");\n```\n\nGet the sentences:\n\n```js\nconsole.log(tokenizer.getSentences());\n```\n\nWhich should produce:\n\n```js\n[ 'This is an entry.',\n  'Possibly composed of several sentences.' ]\n```\n\nIf you want word-level tokens, use:\n\n```js\nconsole.log(tokenizer.getTokens());\n```\n\nYielding:\n\n```js\n[ 'This',\n  'is',\n  'an',\n  'entry.' ]\n```\n\nTo get the second sentence, use:\n\n```js\nconsole.log(tokenizer.getTokens(1));\n```\n\n## Warning\n\nAs this package is made for a [conversational bot](https://github.com/parmentf/node-ector), the Tokenizer class get two parameters (`username` and `botname`), which have default values (`Guy`, and `ECTOR`).\n\nWhen these are present in the entry, they are replaced with `{botname}` and `{yourname}` respectively.\nIf you don't want to use this functionality, pass two unlikely parameters (`kjsdfgiurbybuq`, for example).\n\n## Also\n\n* [https://github.com/chrisumbel/natural](https://github.com/chrisumbel/natural)\n* [https://github.com/Floby/node-tokenizer](https://github.com/Floby/node-tokenizer)\n\n## License\n\n(The MIT License)\n\nCopyright 2012 François Parmentier. All rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparmentf%2Fnode-sentence-tokenizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparmentf%2Fnode-sentence-tokenizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparmentf%2Fnode-sentence-tokenizer/lists"}