corenlp-protobuf-3.8.0
توضیحات
Python bindings for Stanford CoreNLP protobufs
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | corenlp-protobuf-3.8.0 |
| نام | corenlp-protobuf |
| نسخه کتابخانه | 3.8.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Stanford NLP Group |
| ایمیل نویسنده | chaganty@cs.stanford.edu |
| آدرس صفحه اصلی | https://github.com/stanfordnlp/python-corenlp-protobuf |
| آدرس اینترنتی | https://pypi.org/project/corenlp-protobuf/ |
| مجوز | MIT |
Stanford CoreNLP Python Bindings
================================
.. image:: https://travis-ci.org/stanfordnlp/python-corenlp-protobuf.svg?branch=master
:target: https://travis-ci.org/stanfordnlp/python-corenlp-protobuf
This package contains python bindings for `Stanford
CoreNLP <https://github.com/stanfordnlp/CoreNLP>`_'s protobuf
specifications, as generated by `protoc`. These bindings can used to
parse binary data produced by, e.g., the `Stanford CoreNLP
server <https://stanfordnlp.github.io/CoreNLP/corenlp-server.html>`_.
----
Usage:
.. code-block:: python
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.
نحوه نصب
نصب پکیج whl corenlp-protobuf-3.8.0:
pip install corenlp-protobuf-3.8.0.whl
نصب پکیج tar.gz corenlp-protobuf-3.8.0:
pip install corenlp-protobuf-3.8.0.tar.gz