{"name":"parse-english","version":"3.0.0","description":"English natural language parser","license":"MIT","keywords":["nlcst","english","natural","language","parser"],"files":["index.js"],"repository":{"type":"git","url":"git+https://github.com/wooorm/parse-english.git"},"bugs":{"url":"https://github.com/wooorm/parse-english/issues"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"}],"dependencies":{"nlcst-to-string":"^2.0.0","parse-latin":"^3.1.0","unist-util-modify-children":"^1.0.0","unist-util-visit-children":"^1.0.0"},"devDependencies":{"browserify":"^13.0.1","bundle-collapser":"^1.2.1","eslint":"^2.0.0","esmangle":"^1.0.1","istanbul":"^0.4.0","jscs":"^3.0.0","jscs-jsdoc":"^2.0.0","nlcst-test":"^0.2.1","remark-cli":"^1.0.0","remark-comment-config":"^4.0.0","remark-github":"^5.0.0","remark-lint":"^4.0.0","remark-usage":"^4.0.0","remark-validate-links":"^4.0.0","tape":"^4.0.0","unist-util-inspect":"^4.0.0","vfile":"^1.4.0"},"scripts":{"build-md":"remark . --quiet --frail","build-bundle":"browserify index.js -p bundle-collapser/plugin --bare -s ParseEnglish > parse-english.js","build-mangle":"esmangle parse-english.js > parse-english.min.js","build":"npm run build-md && npm run build-bundle && npm run build-mangle","lint-api":"eslint .","lint-style":"jscs --reporter inline .","lint":"npm run lint-api && npm run lint-style","test-api":"node test/index.js","test-coverage":"istanbul cover test/index.js","test":"npm run build && npm run lint && npm run test-coverage"},"gitHead":"abb821893160cd71562d7019affa47414587430e","homepage":"https://github.com/wooorm/parse-english#readme","_id":"parse-english@3.0.0","_shasum":"6eefb85a697c0cccacb80a4d6e9850aa6cb9ff67","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"dist":{"shasum":"6eefb85a697c0cccacb80a4d6e9850aa6cb9ff67","tarball":"http://registry-npm.ywwl.com/parse-english/download/parse-english-3.0.0.tgz","integrity":"sha512-sTZ5QqTd99HdVgEhX9EfGxJ1dihyMIKkG7BzAhd7CeEhqIEp/qcsLdT4+9GEiRJVNKPsPEsrxfvmEwAs53udaQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICLbZ3UXoR+4UIPe0soEUMEBiqzx1fqkIFK4pr6vp/SUAiEAlMRDrmkKHunXB3mV4tLQuCI3HJ2D7lm6xm4GPcCiZBY="}],"size":7049,"noattachment":false,"key":"/parse-english/-/parse-english-3.0.0.tgz"},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/parse-english-3.0.0.tgz_1466542577710_0.45418629166670144"},"directories":{},"readme":"# parse-english\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n\nNatural language parser, for the English language, that produces [nlcst][].\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`ParseEnglish()`](#parseenglish)\n*   [Algorithm](#algorithm)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Security](#security)\n*   [Related](#related)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis package exposes a parser that takes English natural language and produces\na syntax tree.\n\n## When should I use this?\n\nIf you want to handle English natural language as syntax trees manually, use\nthis.\n\nAlternatively, you can use the retext plugin [`retext-english`][retext-english],\nwhich wraps this project to also parse natural language at a higher-level\n(easier) abstraction.\n\nFor Dutch or most Latin-script languages, you can instead use\n[`parse-dutch`][parse-dutch] or [`parse-latin`][parse-latin].\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+), install with [npm][]:\n\n```sh\nnpm install parse-english\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {ParseEnglish} from 'https://esm.sh/parse-english@7'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import {ParseEnglish} from 'https://esm.sh/parse-english@7?bundle'\n</script>\n```\n\n## Use\n\n```js\nimport {ParseEnglish} from 'parse-english'\nimport {inspect} from 'unist-util-inspect'\n\nconst tree = new ParseEnglish().parse(\n  'Mr. Henry Brown: A hapless but friendly City of London worker.'\n)\n\nconsole.log(inspect(tree))\n```\n\nYields:\n\n```txt\nRootNode[1] (1:1-1:63, 0-62)\n└─0 ParagraphNode[1] (1:1-1:63, 0-62)\n    └─0 SentenceNode[23] (1:1-1:63, 0-62)\n        ├─0  WordNode[2] (1:1-1:4, 0-3)\n        │    ├─0 TextNode \"Mr\" (1:1-1:3, 0-2)\n        │    └─1 PunctuationNode \".\" (1:3-1:4, 2-3)\n        ├─1  WhiteSpaceNode \" \" (1:4-1:5, 3-4)\n        ├─2  WordNode[1] (1:5-1:10, 4-9)\n        │    └─0 TextNode \"Henry\" (1:5-1:10, 4-9)\n        ├─3  WhiteSpaceNode \" \" (1:10-1:11, 9-10)\n        ├─4  WordNode[1] (1:11-1:16, 10-15)\n        │    └─0 TextNode \"Brown\" (1:11-1:16, 10-15)\n        ├─5  PunctuationNode \":\" (1:16-1:17, 15-16)\n        ├─6  WhiteSpaceNode \" \" (1:17-1:18, 16-17)\n        ├─7  WordNode[1] (1:18-1:19, 17-18)\n        │    └─0 TextNode \"A\" (1:18-1:19, 17-18)\n        ├─8  WhiteSpaceNode \" \" (1:19-1:20, 18-19)\n        ├─9  WordNode[1] (1:20-1:27, 19-26)\n        │    └─0 TextNode \"hapless\" (1:20-1:27, 19-26)\n        ├─10 WhiteSpaceNode \" \" (1:27-1:28, 26-27)\n        ├─11 WordNode[1] (1:28-1:31, 27-30)\n        │    └─0 TextNode \"but\" (1:28-1:31, 27-30)\n        ├─12 WhiteSpaceNode \" \" (1:31-1:32, 30-31)\n        ├─13 WordNode[1] (1:32-1:40, 31-39)\n        │    └─0 TextNode \"friendly\" (1:32-1:40, 31-39)\n        ├─14 WhiteSpaceNode \" \" (1:40-1:41, 39-40)\n        ├─15 WordNode[1] (1:41-1:45, 40-44)\n        │    └─0 TextNode \"City\" (1:41-1:45, 40-44)\n        ├─16 WhiteSpaceNode \" \" (1:45-1:46, 44-45)\n        ├─17 WordNode[1] (1:46-1:48, 45-47)\n        │    └─0 TextNode \"of\" (1:46-1:48, 45-47)\n        ├─18 WhiteSpaceNode \" \" (1:48-1:49, 47-48)\n        ├─19 WordNode[1] (1:49-1:55, 48-54)\n        │    └─0 TextNode \"London\" (1:49-1:55, 48-54)\n        ├─20 WhiteSpaceNode \" \" (1:55-1:56, 54-55)\n        ├─21 WordNode[1] (1:56-1:62, 55-61)\n        │    └─0 TextNode \"worker\" (1:56-1:62, 55-61)\n        └─22 PunctuationNode \".\" (1:62-1:63, 61-62)\n```\n\n## API\n\nThis package exports the identifier [`ParseEnglish`][api-parse-english].\nThere is no default export.\n\n### `ParseEnglish()`\n\nCreate a new parser.\n\n`ParseEnglish` extends `ParseLatin`.\nSee [`parse-latin`][parse-latin] for API docs.\n\n## Algorithm\n\nAll of [`parse-latin`][parse-latin] is included, and the following support for\nthe English natural language:\n\n*   unit abbreviations (`tsp.`, `tbsp.`, `oz.`, `ft.`, and more)\n*   time references (`sec.`, `min.`, `tues.`, `thu.`, `feb.`, and more)\n*   business Abbreviations (`Inc.` and `Ltd.`)\n*   social titles (`Mr.`, `Mmes.`, `Sr.`, and more)\n*   rank and academic titles (`Dr.`, `Rep.`, `Gen.`, `Prof.`, `Pres.`, and more)\n*   geographical abbreviations (`Ave.`, `Blvd.`, `Ft.`, `Hwy.`, and more)\n*   American state abbreviations (`Ala.`, `Minn.`, `La.`, `Tex.`, and more)\n*   Canadian province abbreviations (`Alta.`, `Qué.`, `Yuk.`, and more)\n*   English county abbreviations (`Beds.`, `Leics.`, `Shrops.`, and more)\n*   common elision (omission of letters) (`’n’`, `’o`, `’em`, `’twas`, `’80s`,\n    and more)\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports no additional types.\n\n## Compatibility\n\nProjects maintained by me are compatible with maintained versions of Node.js.\n\nWhen I cut a new major release, I drop support for unmaintained versions of\nNode.\nThis means I try to keep the current release line, `parse-english@^7`,\ncompatible with Node.js 16.\n\n## Security\n\nThis package is safe.\n\n## Related\n\n*   [`parse-latin`](https://github.com/wooorm/parse-latin)\n    — Latin-script natural language parser\n*   [`parse-dutch`](https://github.com/wooorm/parse-dutch)\n    — Dutch natural language parser\n\n## Contribute\n\nYes please!\nSee [How to Contribute to Open Source][contribute].\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[build-badge]: https://github.com/wooorm/parse-english/workflows/main/badge.svg\n\n[build]: https://github.com/wooorm/parse-english/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/parse-english.svg\n\n[coverage]: https://codecov.io/github/wooorm/parse-english\n\n[downloads-badge]: https://img.shields.io/npm/dm/parse-english.svg\n\n[downloads]: https://www.npmjs.com/package/parse-english\n\n[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=parse-english\n\n[size]: https://bundlejs.com/?q=parse-english\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[typescript]: https://www.typescriptlang.org\n\n[contribute]: https://opensource.guide/how-to-contribute/\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[retext-english]: https://github.com/retextjs/retext/tree/main/packages/retext-english\n\n[nlcst]: https://github.com/syntax-tree/nlcst\n\n[parse-latin]: https://github.com/wooorm/parse-latin\n\n[parse-dutch]: https://github.com/wooorm/parse-dutch\n\n[api-parse-english]: #parseenglish\n","publish_time":1466542580273,"_cnpm_publish_time":1466542580273,"dist-tags":{"0.1.0-rc.1":"0.1.0-rc.1","0.1.0-rc.2":"0.1.0-rc.2","0.1.0-rc.3":"0.1.0-rc.3","0.1.0-rc.4":"0.1.0-rc.4","latest":"7.0.0"}}