This package contains python bindings for Stanford CoreNLP’s protobuf specifications, as generated by protoc. These bindings can used to parse binary data produced by, e.g., the Stanford CoreNLP server.
Usage:
from corenlp_protobuf import Document, parseFromDelimitedString
# document.dat contains a serialized Document.
with open('document.dat', 'r') as f:
buf = f.read()
doc = Document()
parseFromDelimitedString(doc, buf)
# You can access the sentences from doc.sentence.
sentence = doc.sentence[0]
# You can access any property within a sentence.
print(sentence.text)
# Likewise for tokens
token = sentence.token[0]
print(token.lemma)
See test_read.py for more examples.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
corenlp-protobuf-3.8.0.tar.gz
(19.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file corenlp-protobuf-3.8.0.tar.gz.
File metadata
- Download URL: corenlp-protobuf-3.8.0.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0fb0eff902e2a4cd175d75b4fe4e3ea366a7e5b5646bfe7b799dc6a7072717fb
|
|
| MD5 |
dec4f750f0a28a9333b26b0a93c23668
|
|
| BLAKE2b-256 |
f42a7eda92896cc518aabad31393b02bb27ef774fad729db76165f71969e5bb0
|
File details
Details for the file corenlp_protobuf-3.8.0-py2.py3-none-any.whl.
File metadata
- Download URL: corenlp_protobuf-3.8.0-py2.py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fac9341b41b92c1413dc8847721c0b7d62600f06768b965880390d4a7d455e53
|
|
| MD5 |
673124abcd9b3c88d979c1c2c14c82a5
|
|
| BLAKE2b-256 |
7893cc40d521cf6635fffa400b62799ddc761159302643d400cee72bd910efa9
|