diff --git a/README.md b/README.md index 36aaf87..75b242d 100644 --- a/README.md +++ b/README.md @@ -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) ``` @@ -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) @@ -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) @@ -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) ```