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

Uploaded Python 3 Windows x86-64

nlpir_python-0.9.7a0-py3-none-macosx_11_0_x86_64.whl (36.9 MB view details)

Uploaded Python 3 macOS 11.0+ x86-64

nlpir_python-0.9.7a0-py3-none-macosx_10_9_x86_64.whl (36.9 MB view details)

Uploaded Python 3 macOS 10.9+ x86-64

nlpir_python-0.9.7a0-py3-none-any.whl (83.2 MB view details)

Uploaded Python 3

File details

Details for the file nlpir_python-0.9.7a0-py3-none-win_amd64.whl.

File metadata

  • Download URL: nlpir_python-0.9.7a0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 30.3 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.11

File hashes

Hashes for nlpir_python-0.9.7a0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 29622ab45743b10b5478d2282f5b3f1083df8bd4ec44dc0033b7c3981eec4fe0
MD5 7356acce7e2a33664e603913a4177020
BLAKE2b-256 4fc9053d0bfd588eb6c964ac4c2c9194ebe549e993789be20ab207792955ee6c

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.7a0-py3-none-manylinux2014_x86_64.whl.

File metadata

  • Download URL: nlpir_python-0.9.7a0-py3-none-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 46.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.11

File hashes

Hashes for nlpir_python-0.9.7a0-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 96ed4b77489ff5425899e8639786bf219f91c975e4323ba3c5c101d3856ab5cf
MD5 fe3f87bdb85641f3154d2b18818f6ea8
BLAKE2b-256 3335766f75ce050285500e492d79fca22d47324914d24e9d83e4742ae9d9be4b

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.7a0-py3-none-manylinux2014_aarch64.whl.

File metadata

  • Download URL: nlpir_python-0.9.7a0-py3-none-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 44.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.11

File hashes

Hashes for nlpir_python-0.9.7a0-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 89f5e8c77318c49ff12b4b043c4e5c2d432b2e012cd5c9588822219ea3d80e7d
MD5 4534a5e7b4b8c519dbf48970d2ee817e
BLAKE2b-256 d1890c789d9f74f2b2869511dc3414dd28bff046b099fe71ae302ae10a6e9648

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.7a0-py3-none-macosx_11_0_x86_64.whl.

File metadata

  • Download URL: nlpir_python-0.9.7a0-py3-none-macosx_11_0_x86_64.whl
  • Upload date:
  • Size: 36.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.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.11

File hashes

Hashes for nlpir_python-0.9.7a0-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 2995b0074394b64fe1adfacdefa8d15f8bc0328aad1d0e156b068a12cb3cc8ba
MD5 91797802772cb757fd4aaa3a4187d711
BLAKE2b-256 1c020b3cc5b4563c43b7d1f24eeba97926d4e0c7478c65bf6abe1d2efefab3ab

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.7a0-py3-none-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: nlpir_python-0.9.7a0-py3-none-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 36.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.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.11

File hashes

Hashes for nlpir_python-0.9.7a0-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 099ff4abbafae7b4d115e930d37b8b7c24a117a0a1b304080a07d52baccab112
MD5 2eb939d2bcbf113e9e9669fbb7da38a3
BLAKE2b-256 a63f9c4493fe38eaa9333649e44294f07306f5dfe56ee4375405be8d904ac4c3

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.7a0-py3-none-any.whl.

File metadata

  • Download URL: nlpir_python-0.9.7a0-py3-none-any.whl
  • Upload date:
  • Size: 83.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.11

File hashes

Hashes for nlpir_python-0.9.7a0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e245d7679bb1aa6229907a4cc8fd9fcd667b9aae4636b4d07ffa2000c8b4f70
MD5 df5adfeac2148fd73d1b0460c15a2816
BLAKE2b-256 da76c78f39edc2f322ce8d6417b4104e82eeb9d6221f87ca37a820d109bbcaee

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