示例#1
0
 def test_subjunctive(self):
     # Assert True for sentences that contain wishes, judgments or opinions.
     from pattern.text.en.modality import subjunctive
     for b, s in ((True, "I wouldn't do that if I were you."),
                  (True, "I wish I knew."),
                  (True, "I propose that you be on time."),
                  (True, "It is a bad idea to be late."),
                  (False, "I will be late.")):
         self.assertEqual(subjunctive(en.Sentence(en.parse(s))), b)
     print "pattern.en.modality.subjunctive()"
示例#2
0
 def test_subjunctive(self):
     # Assert True for sentences that contain wishes, judgments or opinions.
     from pattern.text.en.modality import subjunctive
     for b, s in (
       (True,  "I wouldn't do that if I were you."),
       (True,  "I wish I knew."),
       (True,  "I propose that you be on time."),
       (True,  "It is a bad idea to be late."),
       (False, "I will be late.")):
         self.assertEqual(subjunctive(en.Sentence(en.parse(s))), b)
     print "pattern.en.modality.subjunctive()"