|
1 | 1 | # winkNLP |
2 | 2 |
|
3 | | -A new way of doing NLP ✨ |
| 3 | +#### A new way of doing NLP ✨ |
4 | 4 |
|
5 | 5 | ### [](https://nodejs.org/api/documentation.html#documentation_stability_index) [](https://travis-ci.org/winkjs/wink-nlp) [](https://coveralls.io/github/winkjs/wink-nlp?branch=master) [](https://gitter.im/winkjs/Lobby) |
6 | 6 |
|
7 | 7 | [<img align="right" src="https://decisively.github.io/wink-logos/logo-title.png" width="100px" >](http://winkjs.org/) |
8 | 8 |
|
9 | 9 | winkNLP is a JavaScript library for Natural Language Processing (NLP). Designed specifically to make development of NLP solutions **easier** and **faster**, winkNLP is optimized for the right balance of performance and accuracy. The package can handle large amount of raw text at speeds over **500,000 tokens/second**. And with a test coverage of ~100%, winkNLP is a tool for building production grade systems with confidence. |
10 | 10 |
|
11 | | -#### Features |
| 11 | +## Features |
12 | 12 | It packs a rich feature set into a small foot print codebase of [under 1500 lines](https://coveralls.io/github/winkjs/wink-nlp?branch=master): |
13 | 13 |
|
14 | 14 | 1. Lossless tokenizer |
15 | 15 | 2. Developer friendly and intuitive API |
16 | 16 | 3. Built-in API to aid text visualization |
17 | | -4. Easy information exrtaction from raw text |
| 17 | +4. Easy information extraction from raw text |
18 | 18 | 5. Extensive text pre-processing features |
19 | 19 | 6. Pre-trained models with sizes starting from <3MB onwards |
20 | 20 | 7. Word vector integration |
21 | 21 | 8. Comprehensive NLP pipeline covering tokenization, sentence boundary detection, negation handling, sentiment analysis, part-of-speech tagging, named entity extraction, custom entities detection and pattern matching. |
22 | 22 |
|
23 | 23 |
|
24 | | -### Installation |
| 24 | +## Installation |
25 | 25 |
|
26 | 26 | Use [npm](https://www.npmjs.com/package/wink-nlp) install: |
27 | 27 |
|
28 | | - npm install wink-nlp --save |
29 | | - |
30 | | -You will also need the English lite model: |
31 | | - |
32 | | - npm install https://github.com/winkjs/wink-eng-lite-model/releases/download/0.2.0/wink-eng-lite-model-0.2.0.tgz --save |
33 | | - |
34 | | -### Documentation |
| 28 | +```shell |
| 29 | +npm install wink-nlp --save |
| 30 | +``` |
| 31 | + |
| 32 | +In order to use winkNLP after its installation, you also need to install a language model. The following command installs the latest version of default language model — the light weight English language model called `wink-eng-lite-model`. |
| 33 | + |
| 34 | +```shell |
| 35 | +node -e "require( 'wink-nlp/models/install' )" |
| 36 | +``` |
| 37 | +Any required model can be installed by specifying its name as the last parameter in the above command. For example: |
| 38 | +```shell |
| 39 | +node -e "require( 'wink-nlp/models/install' )" wink-eng-lite-model |
| 40 | +``` |
| 41 | + |
| 42 | +## Getting Started |
| 43 | +The "Hello World!" in winkNLP is given below. As the next step, we recommend a dive into [winkNLP's concepts](https://winkjs.org/wink-nlp/getting-started.html). |
| 44 | + |
| 45 | +```javascript |
| 46 | +// Boilerplate Code. |
| 47 | +// Load wink-nlp package. |
| 48 | +var winkNLP = require( 'wink-nlp' ); |
| 49 | +// Load "its" helper to extract item properties. |
| 50 | +const its = require( 'wink-nlp/src/its.js' ); |
| 51 | +// Load english language model — light version. |
| 52 | +var model = require( 'wink-eng-lite-model' ); |
| 53 | +// Instantiate winkNLP. |
| 54 | +var nlp = winkNLP( model ); |
| 55 | + |
| 56 | +// NLP Code. |
| 57 | +var text = 'Hello World🌎! How are you?'; |
| 58 | +var doc = nlp.readDoc( text ); |
| 59 | +console.log( doc.out() ); |
| 60 | +// -> Hello World🌎! How are you? |
| 61 | +console.log( doc.sentences().out() ); |
| 62 | +// -> [ 'Hello World🌎!', 'How are you?' ] |
| 63 | +console.log( doc.entities().out( its.detail ) ); |
| 64 | +// -> [ { value: '🌎', type: 'EMOJI' } ] |
| 65 | +console.log( doc.tokens().out() ); |
| 66 | +// -> [ 'Hello', 'World', '🌎', '!', 'How', 'are', 'you', '?' ] |
| 67 | +``` |
| 68 | + |
| 69 | + |
| 70 | +## Documentation |
35 | 71 | - [Concepts](https://winkjs.org/wink-nlp/getting-started.html) — everything you need to know to get started. |
36 | 72 | - [API Reference](https://winkjs.org/wink-nlp/read-doc.html) — explains usage of APIs with examples. |
37 | 73 | - [Change log](https://github.com/winkjs/wink-nlp/blob/master/CHANGELOG.md) — version history along with the details of breaking changes, if any. |
38 | 74 |
|
39 | | -### Need Help? |
40 | | -If you spot a bug and the same has not yet been reported, raise a new [issue](https://github.com/winkjs/wink-nlp/issues) or consider fixing it and sending a pull request. |
| 75 | +## Need Help? |
| 76 | + |
| 77 | +### Usage query 👩🏽💻 |
| 78 | +Please ask at [Stack Overflow](https://stackoverflow.com/) or discuss it at [Wink JS Gitter Lobby](https://gitter.im/winkjs/Lobby). |
| 79 | + |
| 80 | +### Bug report 🐛 |
| 81 | +If you spot a bug and the same has not yet been reported, raise a new [issue](https://github.com/winkjs/wink-nlp/issues) or consider fixing it and sending a PR. |
| 82 | + |
| 83 | +### New feature ✨ |
| 84 | +Looking for a new feature, request it via a new [issue](https://github.com/winkjs/wink-nlp/issues) or consider becoming a [contributor](https://github.com/winkjs/wink-nlp/blob/master/CONTRIBUTING.md). |
41 | 85 |
|
42 | 86 |
|
43 | | -### About wink |
| 87 | +## About wink |
44 | 88 | [Wink](http://winkjs.org/) is a family of open source packages for **Natural Language Processing**, **Machine Learning**, and **Statistical Analysis** in NodeJS. The code is **thoroughly documented** for easy human comprehension and has a **test coverage of ~100%** for reliability to build production grade solutions. |
45 | 89 |
|
46 | | -### Copyright & License |
| 90 | +## Copyright & License |
47 | 91 |
|
48 | 92 | **Wink NLP** is copyright 2017-20 [GRAYPE Systems Private Limited](http://graype.in/). |
49 | 93 |
|
|
0 commit comments