Skip to main content

NLPIR-python A python wrapper and toolkit for NLPIR

Project description

NLPIR-python A python wrapper and toolkit for NLPIR

nlpir-python 是一个 NLPIR 的python调用包

nlpir-python is a python wrapper for NLPIR modules.

Documentation Status PyPI version Test

About

本模块提供两种调用方式:

This package includes two level of method:

1. Native call from Dynamic Link Library(DLL) 原生的直接调用DLL的调用方式

These methods are native method directory from DLL, you can easily use them if you are familiar with the NLPIR modules.

原生方法是直接调用的NLPIR中的api,并进行了部分简化处理,和python化.

    from nlpir.native import ICTCLAS
    test_str = "法国启蒙思想家孟德斯鸠曾说过:“一切有权力的人都容易滥用" \
               "权力,这是一条千古不变的经验。有权力的人直到把权力用到" \
               "极限方可休止。”另一法国启蒙思想家卢梭从社会契约论的观点" \
               "出发,认为国家权力是公民让渡其全部“自然权利”而获得的," \
               "他在其名著《社会契约论》中写道:“任何国家权力无不是以民" \
               "众的权力(权利)让渡与公众认可作为前提的”。"
    ictclas = ICTCLAS()
    ictclas.paragraph_process(test_str, 0)
2. High-level pythonic method 整合后的更加Python的调用方式

However, the native methods are not very friendly to the beginners. These methods provide a wrapper and tools for the native call, make it easier to use.

然而,对于一般用户来说,原生api功能强大但是却不是很友好.这里nlpir-python对原生api就行包装, 并提供了一些工具方法,使其更利于使用.

    from nlpir import ictclas, tools
    tools.update_license()
    test_str = "法国启蒙思想家孟德斯鸠曾说过:“一切有权力的人都容易滥用" \
               "权力,这是一条千古不变的经验。有权力的人直到把权力用到" \
               "极限方可休止。”另一法国启蒙思想家卢梭从社会契约论的观点" \
               "出发,认为国家权力是公民让渡其全部“自然权利”而获得的," \
               "他在其名著《社会契约论》中写道:“任何国家权力无不是以民" \
               "众的权力(权利)让渡与公众认可作为前提的”。"

    for word, pos in ictclas.segment(test_str, pos_tagged=True):
        print(word, pos)

NOTE: This module only support python3.6+

NOTE: This repo use the git-lfs, please install lfs when pull this repo

Supported Table

Native Native Doc Native Test High-Level High-Level Doc High-Level Test Tutorial
ICTCLAS
NewWordFinder
KeyExtract
Summary
SentimentNew
SentimentAnalysis
Classify
DeepClassify
Cluster
DocCompare
DocExtractor
DocParser
iEncoder
HTMLParser
KeyScanner
RedupRemover
SpellChecker
SplitSentence
TextSimilarity
Word2vec

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

nlpir_python-0.9.10-py3-none-win_amd64.whl (30.4 MB view details)

Uploaded Python 3 Windows x86-64

nlpir_python-0.9.10-py3-none-macosx_11_0_x86_64.whl (37.0 MB view details)

Uploaded Python 3 macOS 11.0+ x86-64

nlpir_python-0.9.10-py3-none-macosx_10_9_x86_64.whl (37.0 MB view details)

Uploaded Python 3 macOS 10.9+ x86-64

nlpir_python-0.9.10-py3-none-any.whl (84.8 MB view details)

Uploaded Python 3

File details

Details for the file nlpir_python-0.9.10-py3-none-win_amd64.whl.

File metadata

  • Download URL: nlpir_python-0.9.10-py3-none-win_amd64.whl
  • Upload date:
  • Size: 30.4 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.6.13

File hashes

Hashes for nlpir_python-0.9.10-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 412afa9fa432cdb9e45546603b2e64dceb32ec3db4b6004293de0d2ceac6ece2
MD5 9581e8c782329a4f66aed1ad10d2c90c
BLAKE2b-256 7c4b479beeceb561da73f9260139434aa2c7a0fb8ae277a9798d9e2c70cbe518

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.10-py3-none-manylinux2014_x86_64.whl.

File metadata

  • Download URL: nlpir_python-0.9.10-py3-none-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 46.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.6.13

File hashes

Hashes for nlpir_python-0.9.10-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f8d15c419810f995dd52ec9fe91f653bb275b820e7538770d1492a875fa90fe0
MD5 ed8761cdfbd2def8d886a016f7b4dc91
BLAKE2b-256 59db12ba320184ac357e43714ee2f65686fda3cbd96e3715af37649b9069f056

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.10-py3-none-manylinux2014_aarch64.whl.

File metadata

  • Download URL: nlpir_python-0.9.10-py3-none-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 46.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.6.13

File hashes

Hashes for nlpir_python-0.9.10-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 adf6e4c65dd9c40d5d4a95e64f6e5d118a8562d8d6db0aa614236630dd0426a1
MD5 53e67cd5d56c7515d9eeb892936babac
BLAKE2b-256 8cf2eb77f87d3ba80284d3209f0169f435eb27cb9497c012e7993e236d74c075

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.10-py3-none-macosx_11_0_x86_64.whl.

File metadata

  • Download URL: nlpir_python-0.9.10-py3-none-macosx_11_0_x86_64.whl
  • Upload date:
  • Size: 37.0 MB
  • Tags: Python 3, macOS 11.0+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.6.13

File hashes

Hashes for nlpir_python-0.9.10-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 ecfc4f838523b1268b82da5dbba0768bdacc938891b9bccc446c6078eecf81d8
MD5 0e835373276eb94382955861a2643e7e
BLAKE2b-256 752bbf6339bcb3c8a40bace2c5ab9dd56787539246dc796393edbc2156faa934

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.10-py3-none-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: nlpir_python-0.9.10-py3-none-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 37.0 MB
  • Tags: Python 3, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.6.13

File hashes

Hashes for nlpir_python-0.9.10-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 62793ec9e3909c4ddf8f3e1ba36f35819c96c77b1bd178842ab8c31e932c891e
MD5 ec805ad225647dcfdeb7c4a6d7498a47
BLAKE2b-256 40d7ee8fdeb18e99277876d3597374384289915ffd71fddf1e218dc5515dc89d

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.10-py3-none-any.whl.

File metadata

  • Download URL: nlpir_python-0.9.10-py3-none-any.whl
  • Upload date:
  • Size: 84.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.6.13

File hashes

Hashes for nlpir_python-0.9.10-py3-none-any.whl
Algorithm Hash digest
SHA256 d54508ebf0fc258d6f3f972bc5dc767378f1c77133e4fcfc0e1da34d2a32c160
MD5 1d702c1dd5db939778bcca6d4fa831c8
BLAKE2b-256 b5b31bc8105346641dd86672d38f301734a35f66faa8a994ede09e9f4327719d

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