MCPcopy Create free account
hub / github.com/awslabs/gap-text2sql / annotate

Method annotate

rat-sql-gap/seq2struct/resources/corenlp.py:25–35  ·  view source on GitHub ↗
(self, text, annotators=None, output_format=None, properties=None)

Source from the content-addressed store, hash-verified

23 self.client.stop()
24
25 def annotate(self, text, annotators=None, output_format=None, properties=None):
26 try:
27 result = self.client.annotate(text, annotators, output_format, properties)
28 except (corenlp.client.PermanentlyFailedException,
29 requests.exceptions.ConnectionError) as e:
30 print('\nWARNING: CoreNLP connection timeout. Recreating the server...', file=sys.stderr)
31 self.client.stop()
32 self.client.start()
33 result = self.client.annotate(text, annotators, output_format, properties)
34
35 return result
36
37
38_singleton = None

Callers 5

annotateFunction · 0.95
tokenizeMethod · 0.80
tokenize_for_copyingMethod · 0.80
normalize_toksMethod · 0.80
normalize_toksMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected