Esempio n. 1
0
 def _get_head_word(self, question):
     parser = StanfordParser.get_instance()
     processed_text = parser.process(question)
     tree = Tree(processed_text)
     return self._extract_head_word(tree)
Esempio n. 2
0
def clean():
    StanfordNER.disconnect_all()
    StanfordParser.disconnect_all()