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

Function positive

pattern/text/fr/__init__.py:211–214  ·  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

209 return sentiment(s, **kwargs)[1]
210
211def positive(s, threshold=0.1, **kwargs):
212 """ Returns True if the given sentence has a positive sentiment (polarity >= threshold).
213 """
214 return polarity(s, **kwargs) >= threshold
215
216#---------------------------------------------------------------------------------------------------
217# python -m pattern.fr xml -s "C'est l'exception qui confirme la règle." -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…