Skip to main content

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('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


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.5.tar.gz (45.9 MB view details)

Uploaded Source

Built Distribution

python_vncorenlp-0.1.5-py3-none-any.whl (46.0 MB view details)

Uploaded Python 3

File details

Details for the file python_vncorenlp-0.1.5.tar.gz.

File metadata

  • Download URL: python_vncorenlp-0.1.5.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.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.8

File hashes

Hashes for python_vncorenlp-0.1.5.tar.gz
Algorithm Hash digest
SHA256 9d5b0fbd395c5d52337a9f9db1e46eb3229dc2354a3df9819b3b005ef046bc14
MD5 fc8f870b7584c8ed5fb4acbaeaa0540f
BLAKE2b-256 2ea4fa99fbe970ef0bc9284ae95eeec8c9a25c280a07de299f554416f35a1631

See more details on using hashes here.

File details

Details for the file python_vncorenlp-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: python_vncorenlp-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 46.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.8

File hashes

Hashes for python_vncorenlp-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f83eb3b03ff0032812524b0a8fa95f5629c88ad6f1b5a10553f8fcf05e4eacf1
MD5 110620403c01d3ec2da26cf15bf34b85
BLAKE2b-256 b67ed334cc8a635f02bb29794aab670d454d0d1a80ab4dcc4309fd758fe87f9c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page