2

Or, The Mystery of Line #2598.

I was trying to run Stanford-NER on a local server. I wrote some scripts, using a bit of PyNER. I then downloaded some of Sherlock Holmes' books off Project Gutenberg, and started running the program. Set up a server on the PC with a 1000MB RAM and used this

tagger = ner.SocketNER(host='192.168.xxx.xxx', port=xxxx)

The code runs smoothly, till it reaches line#2598. After that, without raising any error, or even terminating, the program does not proceed. I thought it would be an issue with the processing capacity/memory of the server, so I set up a friend's PC with the same configurations, and ran the script to hit both the servers alternately.

if count % 2:
                get_entities(str(l), tagger_1)
else:
                get_entities(str(l), tagger_2)

Still, it froze at Line#2598. Not the one to give up, I did this

if count % 2:
                tagger_1 = ner.SocketNER(host='192.168.xxx.xxx', port=xx)#k
                get_entities(str(l), tagger_1)
                del tagger_1
else:
                tagger_2 = ner.SocketNER(host='192.168.xxx.yyy', port=xx)#v
                get_entities(str(l), tagger_2)
                del tagger_2

Still, Line #2598 freezes. On another book, it is line#2212, so it's not the number of times I connect. Neither is it the number of characters. The lack of errors baffles me. Is there an underlying limit enforced on the network? Thank you for any hint. The issue stays the same for IDLE as well as ST3.

Kalpit
  • 891
  • 1
  • 8
  • 24

0 Answers0