1. Hiroyoshi Komatsu
  2. corenlp-python

Commits

Hiroyoshi Komatsu  committed 8f19638

Adjust timeout parameter

  • Participants
  • Parent commits 81282ee
  • Branches master

Comments (0)

Files changed (2)

File README.md

View file
  • Ignore whitespace
-# A Python wrapper of Stanford Core NLP
+# A Python wrapper of Stanford Core NLP tools
 
 This is a fork of [stanford-corenlp-python](https://github.com/dasmith/stanford-corenlp-python).
 

File corenlp/corenlp.py

View file
  • Ignore whitespace
         # the idea here is that you increase the timeout as a
         # function of the text's length.
         # max_expected_time = max(5.0, 3 + len(to_send) / 5.0)
-        max_expected_time = max(300.0, 3 + len(to_send) / 10.0)
+        max_expected_time = max(300.0, len(to_send) / 2)
 
         # repeated_input = self.corenlp.except("\n")  # confirm it
         t = self.corenlp.expect(["\nNLP> ", pexpect.TIMEOUT], timeout=max_expected_time)