8000 kraftwerk · TPNguyen/stanford-corenlp-python@25d2187 · GitHub
[go: up one dir, main page]

Skip to content

Commit 25d2187

Browse files
committed
kraftwerk
1 parent a72d88b commit 25d2187

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,24 @@ Produces a list with a parsed dictionary for each sentence:
4545

4646
Result [{"text": "hello world",
4747
"tuples": [("amod", "world", "hello")],
48-
"words": {"world": {"NamedEntityTag": O,
49-
"CharacterOffsetEnd": 11,
48+
"words": {"world": {"NamedEntityTag": "O",
49+
"CharacterOffsetEnd": "11",
5050
"Lemma": "world",
5151
"PartOfSpeech": "NN",
52-
"CharacterOffsetBegin": 6},
53-
"hello": {"NamedEntityTag": O,
54-
"CharacterOffsetEnd": 5,
52+
"CharacterOffsetBegin": "6"},
53+
"hello": {"NamedEntityTag": "O",
54+
"CharacterOffsetEnd": "5",
5555
"Lemma": "hello",
5656
"PartOfSpeech": "JJ",
5757
"CharacterOffsetBegin": 0}}}]
5858

5959

60+
To use it in a regular script or to edit/debug, load the module instead:
61+
62+
from server import *
63+
corenlp = StanfordCoreNLP()
64+
corenlp.parse("Parse an imperative sentence, damnit!")
65+
6066
<!--
6167
## Adding WordNet
6268

0 commit comments

Comments
 (0)
0