python_vncorenlp
Project description
python-vncorenlp
A Python wrapper for VnCoreNLP using Pyjnius
Table Of Contents
Prerequisites
Installation
You can install this package from PyPI using pip:
$ pip install python-vncorenlp
Example
#!/usr/bin/python
# -*- coding: utf-8 -*-
import python_vncorenlp
python_vncorenlp.install('-Xmx2g')
python_vncorenlp.Package.load_class()
def main():
pipeline = python_vncorenlp.Pipeline()
pipeline.load_model()
print(pipeline.annotate_doc('Tôi là chàng sinh viên Bách Khoa'))
print(pipeline.annotate_docs([
'Tôi là chàng sinh viên Bách Khoa',
'Tôi học Toán tin ứng dụng'
]))
if __name__ == '__main__':
main()
The parameter -Xmx2g
means that the VM can allocate a maximum of 2 GB for the Heap Space. If you want to use all module, set heap space to -Xmx4g
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
python_vncorenlp-0.1.6.tar.gz
(45.9 MB
view hashes)
Built Distribution
Close
Hashes for python_vncorenlp-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73b2d3222938efeff377be2f449f1a2c58337fe149f67ddf3b0cc98d2f926c68 |
|
MD5 | b1fa257d295e824fff2b793832db1a71 |
|
BLAKE2b-256 | b84c63820b80f89254152e4ef09b0ae486db53f0aa5205614f6306cb1999c2dc |