Skip to content

Commit fc494f5

Browse files
docs(README): add getting started section and other details
1 parent 389ee2d commit fc494f5

File tree

1 file changed

+59
-15
lines changed

1 file changed

+59
-15
lines changed

README.md

Lines changed: 59 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,93 @@
11
# winkNLP
22

3-
A new way of doing NLP ✨
3+
#### A new way of doing NLP ✨
44

55
### [![Stability](https://img.shields.io/badge/stability-1--experimental-orange.svg)](https://nodejs.org/api/documentation.html#documentation_stability_index) [![Build Status](https://api.travis-ci.org/winkjs/wink-nlp.svg?branch=master)](https://travis-ci.org/winkjs/wink-nlp) [![Coverage Status](https://coveralls.io/repos/github/winkjs/wink-nlp/badge.svg?branch=master)](https://coveralls.io/github/winkjs/wink-nlp?branch=master) [![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/winkjs/Lobby)
66

77
[<img align="right" src="https://decisively.github.io/wink-logos/logo-title.png" width="100px" >](http://winkjs.org/)
88

99
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.
1010

11-
#### Features
11+
## Features
1212
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):
1313

1414
1. Lossless tokenizer
1515
2. Developer friendly and intuitive API
1616
3. Built-in API to aid text visualization
17-
4. Easy information exrtaction from raw text
17+
4. Easy information extraction from raw text
1818
5. Extensive text pre-processing features
1919
6. Pre-trained models with sizes starting from <3MB onwards
2020
7. Word vector integration
2121
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.
2222

2323

24-
### Installation
24+
## Installation
2525

2626
Use [npm](https://www.npmjs.com/package/wink-nlp) install:
2727

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
3571
- [Concepts](https://winkjs.org/wink-nlp/getting-started.html) — everything you need to know to get started.
3672
- [API Reference](https://winkjs.org/wink-nlp/read-doc.html) — explains usage of APIs with examples.
3773
- [Change log](https://github.com/winkjs/wink-nlp/blob/master/CHANGELOG.md) — version history along with the details of breaking changes, if any.
3874

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).
4185

4286

43-
### About wink
87+
## About wink
4488
[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.
4589

46-
### Copyright & License
90+
## Copyright & License
4791

4892
**Wink NLP** is copyright 2017-20 [GRAYPE Systems Private Limited](http://graype.in/).
4993

0 commit comments

Comments
 (0)