Commits

Felix Remmel committed c792ae0

increase timeout to 120 seconds

Comments (0)

Files changed (1)

corenlp/corenlp.py

     def _spawn_corenlp(self):
         if VERBOSE:
             print self.start_corenlp
-        self.corenlp = pexpect.spawn(self.start_corenlp, timeout=60, maxread=8192, searchwindowsize=80)
+        self.corenlp = pexpect.spawn(self.start_corenlp, timeout=120, maxread=8192, searchwindowsize=80)
 
         # show progress bar while loading the models
         if VERBOSE:
         # How much time should we give the parser to parse it?
         # 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, len(to_send) / 3.0)
+        # max_expected_time = max(12.0, len(to_send) / 3.0)
+        max_expected_time = max(1200.0, len(to_send) / 3.0)
 
         # repeated_input = self.corenlp.except("\n")  # confirm it
         t = self.corenlp.expect(["\nNLP> ", pexpect.TIMEOUT, pexpect.EOF,