| 1016 | print "pattern.en.wordnet.map32" |
| 1017 | |
| 1018 | def test_sentiwordnet(self): |
| 1019 | # Assert SentiWordNet is loaded correctly. |
| 1020 | if en.wordnet.sentiwordnet is None: |
| 1021 | return |
| 1022 | try: |
| 1023 | en.wordnet.sentiwordnet.load() |
| 1024 | except ImportError: |
| 1025 | return |
| 1026 | v = en.wordnet.synsets("anguish")[0] |
| 1027 | self.assertEqual(v.weight, (-0.625, 0.625)) |
| 1028 | v = en.wordnet.synsets("enzymology")[0] |
| 1029 | self.assertEqual(v.weight, (0.125, 0.125)) |
| 1030 | print "pattern.en.wordnet.sentiwordnet" |
| 1031 | |
| 1032 | #--------------------------------------------------------------------------------------------------- |
| 1033 | |