MCPcopy Create free account
hub / github.com/clips/pattern / positive

Function positive

pattern/text/nl/__init__.py:218–221  ·  view source on GitHub ↗

Returns True if the given sentence has a positive sentiment (polarity >= threshold).

(s, threshold=0.1, **kwargs)

Source from the content-addressed store, hash-verified

216 return sentiment(s, **kwargs)[1]
217
218def positive(s, threshold=0.1, **kwargs):
219 """ Returns True if the given sentence has a positive sentiment (polarity >= threshold).
220 """
221 return polarity(s, **kwargs) >= threshold
222
223#---------------------------------------------------------------------------------------------------
224# python -m pattern.nl xml -s "De kat wil wel vis eten maar geen poot nat maken." -OTCL

Callers

nothing calls this directly

Calls 1

polarityFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…