8000 first element is always the pronoun · TPNguyen/stanford-corenlp-python@c286d62 · GitHub
[go: up one dir, main page]

Skip to content

Commit c286d62

Browse files
committed
first element is always the pronoun
1 parent 1845ca4 commit c286d62

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

corenlp.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,7 @@ def parse_imperative(self, text, verbose=True):
201201
result[0]['text'] = text
202202
result[0]['tuples'] = filter(lambda x: not (x[1] == used_pronoun or x[2]
203203
== used_pronoun), result[0]['tuples'])
204-
result[0]['words'] = filter(lambda x: not x.has_key(used_pronoun),
205-
result[0]['words'])
204+
result[0]['words'] = result[0]['words'][1:]
206205
return dumps(result)
207206
else:
208207
# if there's a timeout error, just return it.

0 commit comments

Comments
 (0)
0