Пример #1
0
    def test_get_part_of_speech(self):
        dictionary = Dictionary()
        filedir = os.path.dirname(os.path.realpath('__file__'))

        filename = os.path.join(filedir, "tests/dictionary.json")
        dictionary.load_words(filename)

        pos = dictionary.get_part_of_speech("torch")
        self.assertEqual(pos, "noun")