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.9-py3-none-win_amd64.whl (30.4 MB view details)

Uploaded Python 3 Windows x86-64

nlpir_python-0.9.9-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.9-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.9-py3-none-any.whl (84.8 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nlpir_python-0.9.9-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.9-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 64a998d617b61aceccc88590e6d24cf0527bc2bf25bdfa1fef0c42b01aba9b9f
MD5 93369bb57a80da4a49e1adbb78668cfe
BLAKE2b-256 0f1bfabdee48504d3781340637840f9bc417055a1053a75657a78cde4a31be40

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.9-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.9-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d23d6a8f7eab7686c150d5d3cceaa25bf3bd4002132f32e03472d2f704c553a5
MD5 073c9f689dcd622cb7e04d4ccf4077ea
BLAKE2b-256 766db2b8855a0919e22f6403903684fc8d0d9fcac511e1d79b80eabc54e38603

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.9-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.9-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 cde7ab5655cb5c5797890271220e5d50a9ab3985c2c320e320dc8322cf8b693e
MD5 19a4fe544dcf0b01c35a8ebf793c4e13
BLAKE2b-256 4d6f1d231c15081789ca587ba80527edd54ab80562d78a48d1e336ed36eee5e4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.9-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.9-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 200301b7d0a060e662f67b3cb95f575ceed8ee499b00c8a1ed85eb9f1a6ddebb
MD5 c5c3b9b57754ea1c3a172bd9e0464275
BLAKE2b-256 a84faa901bfab67877ab6bd209e95982f64a718930c852a15aff7c1af7d50136

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.9-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.9-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7e40f2d2de67a6ba830206692bf47fd4be3ded9e403cb28b806d91f710ba40c3
MD5 9b94d4d2e0e23ebdb911dd4ba57847e5
BLAKE2b-256 afb1613c8a09239e274c53a0863a04b7ecb183b8003e47e7d105fdecb1fd588b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.9-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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 3a2c3c1a6912d35117569f97b8f3ef57af2ae3b1692c7de40af096c2cee3bbd3
MD5 d63ef8941c0d1a0b48e831a205aa72a3
BLAKE2b-256 a878a29529883f9762f38313bd634314898bcbc520d10126cfd1710d5642e525

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