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

If you're not sure about the file name format, learn more about wheel file names.

nlpir_python-0.9.11b2-py3-none-win_amd64.whl (40.3 MB view details)

Uploaded Python 3Windows x86-64

nlpir_python-0.9.11b2-py3-none-macosx_11_0_x86_64.whl (46.9 MB view details)

Uploaded Python 3macOS 11.0+ x86-64

nlpir_python-0.9.11b2-py3-none-macosx_10_9_x86_64.whl (46.9 MB view details)

Uploaded Python 3macOS 10.9+ x86-64

nlpir_python-0.9.11b2-py3-none-any.whl (94.7 MB view details)

Uploaded Python 3

File details

Details for the file nlpir_python-0.9.11b2-py3-none-win_amd64.whl.

File metadata

  • Download URL: nlpir_python-0.9.11b2-py3-none-win_amd64.whl
  • Upload date:
  • Size: 40.3 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.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.6.14

File hashes

Hashes for nlpir_python-0.9.11b2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 b4499de46281f873ce9d45b4ec65399fd35158b8125cb1733177122381042bcf
MD5 6f77967ce2f140a2a144021dbf7e31e9
BLAKE2b-256 6da82af8f5c503b0f01b1dc382a6a9c1f35d617fbf5ea539f4a859361036bc34

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.11b2-py3-none-manylinux2014_x86_64.whl.

File metadata

  • Download URL: nlpir_python-0.9.11b2-py3-none-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 56.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.6.14

File hashes

Hashes for nlpir_python-0.9.11b2-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e7c0459996a28d4a7adc274edd1387656c5c0f9a27a69f81ee9f8b54bb62cc7f
MD5 1fe295cd65dac6dedac7f8d67ba08432
BLAKE2b-256 4da3d3715f22564037bf066439fc959adb3f51c4d3091717d1e58ef2876c988d

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.11b2-py3-none-manylinux2014_aarch64.whl.

File metadata

  • Download URL: nlpir_python-0.9.11b2-py3-none-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 56.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.6.14

File hashes

Hashes for nlpir_python-0.9.11b2-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f06dffa7cce2dbe451ae23cac7a0a09a90d756ac9f6bd0d8a0644a2070d0c3f2
MD5 7c58943f0e52ef23ba09042e0650c85b
BLAKE2b-256 7428df6accdd6eab168c3d727c01c46b8bc9c824ccde6252a6ca5e309e17c46e

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.11b2-py3-none-macosx_11_0_x86_64.whl.

File metadata

  • Download URL: nlpir_python-0.9.11b2-py3-none-macosx_11_0_x86_64.whl
  • Upload date:
  • Size: 46.9 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.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.6.14

File hashes

Hashes for nlpir_python-0.9.11b2-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 d059fdeb019ad075a81d3f128d9a17e7ce37f6e9dee03c61b5089abb1bd43ddc
MD5 74192c6b8d0aa94d73551bca57050d38
BLAKE2b-256 485bf212afc2d6b3c8c0b708c9e7851e6d07d4c2dbe131e68c75a41761e07194

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.11b2-py3-none-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: nlpir_python-0.9.11b2-py3-none-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 46.9 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.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.6.14

File hashes

Hashes for nlpir_python-0.9.11b2-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 07b08fbb07929b5c68496bd445a829224c04a5c26b8508c57715aef99d47140b
MD5 8280bc4e15ccf2af63cb4d585227f9f7
BLAKE2b-256 cb36fdc95527de02727c0e03995a4b9d98ccb7da40ef10206c9f1f088fecb289

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.11b2-py3-none-any.whl.

File metadata

  • Download URL: nlpir_python-0.9.11b2-py3-none-any.whl
  • Upload date:
  • Size: 94.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.6.14

File hashes

Hashes for nlpir_python-0.9.11b2-py3-none-any.whl
Algorithm Hash digest
SHA256 4447f0026d1bec869fce5a87c842b233ec82827f48ff7392f9433b0559659a92
MD5 58a54267899cc3854ed6da5e8a06cf8c
BLAKE2b-256 c573062e83b707a5ba667d99500193a67c4d3a33dfb1cb343182eef9e8e93e90

See more details on using hashes here.

Supported by

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