Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
syzer authored Nov 25, 2018
1 parent 0202d01 commit c665847
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ Simple text sentiment analyser.
# Install

```sh
npm install ml-sentiment
npm install --save ml-sentiment
```

### Usage

```js
var ml = require('ml-sentiment')();
const ml = require('ml-sentiment')();
ml.classify('Rainy day but still in a good mood');
//=> 2 ... (overall positive sentiment)
```
Expand All @@ -42,7 +42,7 @@ data. The module is built with the new streaming API from Node.js v0.10.0 but
maintains backwards compatibility to earlier Node.js versions. Listen for
header and line events or pipe the data directly to a readable stream.`

var ml = require('ml-sentiment')();
const ml = require('ml-sentiment')();
ml.classify(longSentence);
//=> 0 ... (very boring encyclopedia like text)

Expand All @@ -53,7 +53,7 @@ ml.classify('Rainy day but still in a good mood');
#### Negations

```js
var ml = require('ml-sentiment')();
const ml = require('ml-sentiment')();
ml.classify(`not awesome`);
//=> -3 (negative)

Expand All @@ -64,7 +64,7 @@ ml.classify(`awesome`);
#### German

```js
var ml = require('ml-sentiment')({lang: 'de'});
const ml = require('ml-sentiment')({lang: 'de'});
ml.classify(`Es ist nicht so toll`);
//=> (negative)
```
Expand Down

0 comments on commit c665847

Please sign in to comment.