The part of the library that I wrote seems to do this. It identifies what parts the words belong to (NOUN, ADVERB, etc.), and correctly understands:
import cortecx.construction.cxsession as cxsession from cortecx.construction.materials import Parser from pprint import pprint cxsession.Session().start() parser = Parser() parser.include('chunks') pprint(parseronie('When did Nixon die?'))
and here is the JSON output:
{'analysis': [{'when': {'chunk': 'B-ADVP'}}, {'did': {'chunk': 'O'}}, {'nixon': {'chunk': 'B-NP'}}, {'die': {'chunk': 'B-ADVP'}}, {'?': {'chunk': 'O'}}]}
The library can also do POS, NER, etc. .... if you want to play with it yourself, it is worth checking out at https://www.cerybra.com/
Lleyton ariton
source share