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
Download python_vncorenlp/data/models folder in this repo.
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('models')
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.3.tar.gz
(45.9 MB
view details)
File details
Details for the file python_vncorenlp-0.1.3.tar.gz
.
File metadata
- Download URL: python_vncorenlp-0.1.3.tar.gz
- Upload date:
- Size: 45.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1093f529943e3fe30e07d5a7457a97acfadc0a24d10983000a0db7c97b189b3 |
|
MD5 | 787c5c63ededb23d519142eec5803266 |
|
BLAKE2b-256 | d9c08e1c1c8156ab7f5a67ccc25082ce608ed9e1910f886fc4c4643711799354 |