pythainlp.sentiment¶
The romanization.sentiment
is sentiment analysis.
-
pythainlp.sentiment.
sentiment
(text, engine='old')[source]¶ - Parameters
- Returns
pos or neg
- Example::
>>> from pythainlp.sentiment import sentiment >>> text="วันนี้อากาศดีจัง" >>> sentiment(text) 'pos' >>> sentiment(text,'ulmfit') 'pos' >>> text="วันนี้อารมณ์เสียมาก" >>> sentiment(text) 'neg' >>> sentiment(text,'ulmfit') 'neg'