8000 removed dict bug/ETA statement · aayn/stanford-corenlp-python@5b5b70b · GitHub
[go: up one dir, main page]

Skip to content

Commit 5b5b70b

Browse files
committed
removed dict bug/ETA statement
1 parent 6d4b285 commit 5b5b70b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

server.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +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() and int(x[1]) or x[1]), av))
52+
tmp['words'][av[1]] = dict(av)
5353
# the results of this can't be serialized into JSON?
5454
# tmp['words'][av[1]] = dict(map(lambda x: (x[0], x[1].isdigit() and int(x[1]) or x[1]), av))
5555
state = 3
@@ -106,16 +106,15 @@ def __init__(self):
106106

107107
print "Starting the Stanford Core NLP parser."
108108
# show progress bar while loading the models
109-
self.state = "State of the parser"
110109
widgets = ['Loading Models: ', Fraction(), ' ',
111110
Bar(marker=RotatingMarker()), ' ', self.state ]
111+
self.state = "plays hard to get, smiles from time to time"
112112
pbar = ProgressBar(widgets=widgets, maxval=5, force_update=True).start()
113113
self._server.expect("done.", timeout=20) # Load pos tagger model (~5sec)
114114
pbar.update(1)
115115
self._server.expect("done.", timeout=200) # Load NER-all classifier (~33sec)
116116
pbar.update(2)
117117
self._server.expect("done.", timeout=600) # Load NER-muc classifier (~60sec)
118-
self.state = "Loading CoNLL classifier"
119118
pbar.update(3)
120119
self._server.expect("done.", timeout=600) # Load CoNLL classifier (~50sec)
121120
pbar.update(4)

0 commit comments

Comments
 (0)
0