return word.count("-") == 0 and word or word[0:word.rindex("-")]
+ """ This is the nasty bit of code to interact with the command-line
+ interface of the CoreNLP tools. Takes a string of the parser results
+ and then returns a Python list of dictionaries, one for each parsed
+ Command-line interaction with Stanford's CoreNLP java utilities.
+ Can be run as a JSON-RPC server or imported as a module.
Checks the location of the jar files.
This is a hacky way to deal with imperative statements.
It an imperative, adds a personal pronoun, parses it,
+ an imperative, adds a personal pronoun, parses it,
and then removes it in the resulting parse.
e.g. "open the door" gets parsed as "you open the door"