From cdf0afe6d9ae64c6ebeac3ca9de68372c3615dfd Mon Sep 17 00:00:00 2001 From: Yong Zhun Hung Date: Sat, 9 Nov 2019 10:50:26 +0800 Subject: [PATCH] Update README.md --- README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e9ef677..2c1ca44 100644 --- a/README.md +++ b/README.md @@ -32,15 +32,25 @@ Example use (list of strings or pandas Series): >>> from sentistrength import PySentiStr >>> senti = PySentiStr() >>> str_arr = ['What a lovely day', 'What a bad day'] ->>> result = senti.getSentiment(str_arr) +>>> result = senti.getSentiment(str_arr, score='scale') >>> print(result) ... [0.25,-0.25] -# OR, if want binary scoring (a score each for positive rating and negativing rating) instead of scale ->>> result = senti.getSentiment(str_arr, score='binary') +# OR, if you want dual scoring (a score each for positive rating and negative rating) +>>> result = senti.getSentiment(str_arr, score='dual') >>> print(result) ... [(2, -1), (1, -2)] +# OR, if you want binary scoring (1 for positive sentence, -1 for negative sentence) +>>> result = senti.getSentiment(str_arr, score='dual') +>>> print(result) + +... [1, -1] +# OR, if you want trinary scoring (a score each for positive rating, negative rating and neutral rating) +>>> result = senti.getSentiment(str_arr, score='trinary') +>>> print(result) + +... [(2, -1, 1), (1, -2, -1)] ``` ## Path Setup