| 541 | print "pattern.en.ngrams()" |
| 542 | |
| 543 | def test_command_line(self): |
| 544 | # Assert parsed output from the command-line (example from the documentation). |
| 545 | p = ["python", "-m", "pattern.en", "-s", "Nice cat.", "-OTCRL"] |
| 546 | p = subprocess.Popen(p, stdout=subprocess.PIPE) |
| 547 | p.wait() |
| 548 | v = p.stdout.read() |
| 549 | v = v.strip() |
| 550 | self.assertEqual(v, "Nice/JJ/B-NP/O/O/nice cat/NN/I-NP/O/O/cat ././O/O/O/.") |
| 551 | print "python -m pattern.en" |
| 552 | |
| 553 | #--------------------------------------------------------------------------------------------------- |
| 554 | |