(self)
| 936 | print "pattern.en.subjectivity()" |
| 937 | |
| 938 | def test_sentiwordnet(self): |
| 939 | # Assert < 0 for negative words and > 0 for positive words. |
| 940 | try: |
| 941 | from pattern.text.en.wordnet import SentiWordNet |
| 942 | lexicon = SentiWordNet() |
| 943 | lexicon.load() |
| 944 | except ImportError, e: |
| 945 | # SentiWordNet data file is not installed in default location, stop test. |
| 946 | print e; return |
| 947 | self.assertTrue(lexicon["wonderful"][0] > 0) |
| 948 | self.assertTrue(lexicon["horrible"][0] < 0) |
| 949 | print "pattern.en.sentiment.SentiWordNet" |
| 950 | |
| 951 | #--------------------------------------------------------------------------------------------------- |
| 952 |
nothing calls this directly
no test coverage detected