10000 isdigit bug · rocipher/stanford-corenlp-python@66bee40 · GitHub
[go: up one dir, main page]

Skip to content

Commit 66bee40

Browse files
committed
isdigit bug
1 parent e9adaad commit 66bee40

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

server.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ def parse_parser_results(text):
4949
# make [ignore,ignore,a,b,c,d] into [[a,b],[c,d]]
5050
av = zip(*[av[2:][x::2] for x in (0, 1)])
5151
# save as attr-value dict, convert numbers into ints
52-
tmp['words'][av[1]] = dict(map(lambda x: (x[0], x[1].isdigit()
53-
and int(x[1]) or x[1]), av))
52+
tmp['words'][av[1]] = dict(map(lambda x: (x[0], x[1].isdigit() and int(x[1]) or x[1]), av))
5453
state = 3
5554
elif state == 3:
5655
# skip over parse tree

0 commit comments

Comments
 (0)
0