dmnapolitano / stanford-thrift

A Stanford CoreNLP server, with example clients, using Apache Thrift.
47 stars 8 forks source link

Split Tregex results at '\n' and return that as the list of results #10

Closed dmnapolitano closed 10 years ago

dmnapolitano commented 11 years ago

Right now we're getting a list containing a single string of results separated by '\n' characters.

dmnapolitano commented 11 years ago

This second line is what evaluate_tregex_pattern() should be returning:

matches = thrift_client.evaluate_tregex_pattern(tree, pattern)
matches = [s.strip() for m in matches for s in m.split("\n") if len(s) > 0]
dmnapolitano commented 10 years ago

Actually, maybe not...closing this for now.