A dictionary of words (adjectives) and polarity scores (positive/negative). The value for each word is a dictionary of part-of-speech tags. The value for each word POS-tag is a tuple with values for polarity (-1.0-1.0), subjectivity (0.0-1.0) and intensity (0.5-
(self, path="", language=None, synset=None, confidence=None, **kwargs)
| 1500 | class Sentiment(lazydict): |
| 1501 | |
| 1502 | def __init__(self, path="", language=None, synset=None, confidence=None, **kwargs): |
| 1503 | """ A dictionary of words (adjectives) and polarity scores (positive/negative). |
| 1504 | The value for each word is a dictionary of part-of-speech tags. |
| 1505 | The value for each word POS-tag is a tuple with values for |
| 1506 | polarity (-1.0-1.0), subjectivity (0.0-1.0) and intensity (0.5-2.0). |
| 1507 | """ |
| 1508 | self._path = path |
| 1509 | self._language = None |
| 1510 | self._confidence = None |
| 1511 | self._synset = synset |
| 1512 | self._synsets = {} |
| 1513 | self.tokenizer = kwargs.get("tokenizer", find_tokens) |
| 1514 | self.negations = kwargs.get("negations", ("no", "not", "n't", "never")) |
| 1515 | self.modifiers = kwargs.get("modifiers", ("RB",)) |
| 1516 | self.modifier = kwargs.get("modifier" , lambda w: w.endswith("ly")) |
| 1517 | |
| 1518 | @property |
| 1519 | def path(self): |