Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 66ee1f1

Browse files
Fix README
1 parent db6c699 commit 66ee1f1

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

‎README.rst

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,27 @@ The package also contains a base class to expose a python-based annotation
1212
provider (e.g. your favorite neural NER system) to the CoreNLP
1313
pipeline via a lightweight service.
1414

15+
To use the package, first download the `official java CoreNLP release
16+
<https://stanfordnlp.github.io/CoreNLP/#download>`_, unzip it, and define an environment
17+
variable :code:`$CORENLP_HOME` that points to the unzipped directory.
18+
1519
----
1620

1721
Annotation Server Usage
1822
-----------------------
1923

2024
.. code-block:: python
2125
22-
from corenlp import CoreNLPClient
26+
import corenlp
2327
2428
text = "Chris wrote a simple sentence that he parsed with Stanford CoreNLP."
2529
26-
# We assume that you've defined a variable $JAVANLP_HOME
27-
# that points to a Stanford CoreNLP checkout.
30+
# We assume that you've downloaded the Stanford CoreNLP package from
31+
# `https://stanfordnlp.github.io/CoreNLP/` and defined an environment
32+
# variable $CORENLP_HOME that points to the unzipped directory.
2833
# The code below will launch StanfordCoreNLPServer in the background
2934
# and communicate with the server to annotate the sentence.
30-
with CoreNLPClient(annotators="tokenize ssplit".split()) as client:
35+
with corenlp.CoreNLPClient(annotators="tokenize ssplit".split()) as client:
3136
ann = client.annotate(text)
3237
3338
# You can access annotations using ann.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /