We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cfae0b2 + 20661d7 commit d550768Copy full SHA for d550768
pycorenlp/corenlp.py
@@ -10,6 +10,15 @@ def __init__(self, server_url):
10
def annotate(self, text, properties=None):
11
if not properties:
12
properties = {}
13
+
14
+ # Checks that the Stanford CoreNLP server is started.
15
+ try:
16
+ requests.get(self.server_url).ok == True
17
+ except requests.exceptions.ConnectionError:
18
+ raise Exception('Check whether you have started the CoreNLP server e.g.\n'
19
+ '$ cd stanford-corenlp-full-2015-12-09/ \n'
20
+ '$ java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer')
21
22
r = requests.get(
23
self.server_url, params={
24
'properties': str(properties)
0 commit comments