Skip to content

Commit

Permalink
Update readme for custom dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
simondotwhite committed Nov 10, 2016
1 parent 1683c41 commit 797ba6c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ You can register the SentimentAnalysis facade in the `aliases` key of your `app/
## Usage
Sentences can be classified as **negative**, **neutral** or **positive**. The only supported language for the moment is **English**.

## Custom Dictionary
You can provide a custom dictionary by providing the path the folder when you create a new `SentimentAnalysis` object.

`$analysis = new SentimentAnalysis(storage_path('custom_dictionary/'));`

Please look at [the PHPInsight data files](https://github.com/JWHennessey/phpInsight/tree/master/lib/PHPInsight/data) to see how you should name and structure your files.

### SentimentAnalysis::isNegative($sentence)
Returns a boolean telling if the given `$sentence` is classified as negative.

Expand Down

0 comments on commit 797ba6c

Please sign in to comment.