def _PosTag (_word): tagger = wordtag.WordTagger(); if tagger.is_noun(_word): res=" is noun' "+_word elif tagger.is_verb(_word): res=" is verb' "+_word elif tagger.is_stopword(_word): res=" is stopword'"+_word return res
def __init__(self): self.wordtagger = wordtag.WordTagger() ## Cache for relations betwwen words # I will use it for traning for extracting relations between original words self.syntax_train_enabled = False #~ self.syntax_train_enabled = True #file to use as cache in NoSQL format self.cache = cache.cache() # structure will be: # { "original-word":{ # "nextoriginalword":{relation1:frequncy, relation2:frequency2},}, pass
def __init__(self): self.wordtagger = wordtag.WordTagger() pass