Returns True if the given sentence has a positive sentiment (polarity >= threshold).
(s, threshold=0.1, **kwargs)
| 173 | return sentiment(s, **kwargs)[1] |
| 174 | |
| 175 | def positive(s, threshold=0.1, **kwargs): |
| 176 | """ Returns True if the given sentence has a positive sentiment (polarity >= threshold). |
| 177 | """ |
| 178 | return polarity(s, **kwargs) >= threshold |
| 179 | |
| 180 | #--------------------------------------------------------------------------------------------------- |
| 181 | # python -m pattern.en xml -s "The cat sat on the mat." -OTCL |
no test coverage detected
searching dependent graphs…