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

Function polarity

pattern/text/en/__init__.py:165–168  ·  view source on GitHub ↗

Returns the sentence polarity (positive/negative) between -1.0 and 1.0.

(s, **kwargs)

Source from the content-addressed store, hash-verified

163 return spelling.suggest(w)
164
165def polarity(s, **kwargs):
166 """ Returns the sentence polarity (positive/negative) between -1.0 and 1.0.
167 """
168 return sentiment(s, **kwargs)[0]
169
170def subjectivity(s, **kwargs):
171 """ Returns the sentence subjectivity (objective/subjective) between 0.0 and 1.0.

Callers 1

positiveFunction · 0.70

Calls 1

sentimentClass · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…