8000 updated README · rocipher/stanford-corenlp-python@6026558 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6026558

Browse files
committed
updated README
1 parent 0f51765 commit 6026558

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,28 @@ That will run a public JSON-RPC server on port 3456.
3333

3434
Assuming you are running on port 8080, the code in `client.py` shows an example parse:
3535

36-
port jsonrpc
36+
import jsonrpc
3737
server = jsonrpc.ServerProxy(jsonrpc.JsonRpc20(),
3838
jsonrpc.TransportTcpIp(addr=("127.0.0.1", 8080)))
3939

4040
result = server.parse("hello world")
4141
print "Result", result
4242

4343

44-
Produces:
45-
46-
Result [{"text": "hello world", "tuples": [["amod", "world", "hello"]], "words": {"world": {"NamedEntityTag": "O", "CharacterOffsetEnd": "11", "Lemma": "world", "PartOfSpeech": "NN", "CharacterOffsetBegin": "6"}, "hello": {"NamedEntityTag": "O", "CharacterOffsetEnd": "5", "Lemma": "hello", "PartOfSpeech": "JJ", "CharacterOffsetBegin": "0"}}}]
44+
Produces a list with a parsed dictionary for each sentence:
45+
46+
Result [{"text": "hello world",
47+
"tuples": [["amod", "world", "hello"]],
48+
"words": {"world": {"NamedEntityTag": "O",
49+
"CharacterOffsetEnd": "11",
50+
"Lemma": "world",
51+
"PartOfSpeech": "NN",
52+
"CharacterOffsetBegin": "6"},
53+
"hello": {"NamedEntityTag": "O",
54+
"CharacterOffsetEnd": "5",
55+
"Lemma": "hello",
56+
"PartOfSpeech": "JJ",
57+
"CharacterOffsetBegin": "0"}}}]
4758

4859

4960
<!--

0 commit comments

Comments
 (0)
0