python - Trying to train a neural network to recognize if something is a proper sentence? -
for example, want 'the cat brown' return true , 'the cat ink brown' return false. trying use nltk package in python so. far have:
sentence='i hope sentence'.split() rules = nltk.data.load('grammars/large_grammars/atis.cfg', 'text') grammar = cfg.fromstring(rules) parser = nltk.parse.bottomupchartparser(grammar)
but not sure next step should or if right way approach problem. advice appreciated.
thanks!
wiki
Comments
Post a Comment