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 -*-
from python_vncorenlp import install, Pipeline

install('-Xmx2g')


def main():
    pipeline = 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


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

Uploaded Source

Built Distribution

python_vncorenlp-0.1.8-py3-none-any.whl (46.0 MB view hashes)

Uploaded Python 3

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