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

Uploaded Python 3 Windows x86-64

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: nlpir_python-0.9.11b1-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.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.11b1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 576f4806a646404b5e310014b5eb21a0f8f76082f6ebd1043480116b21c6186b
MD5 989465f8174a1c3c009d573b1966f498
BLAKE2b-256 5a650102b440e2faabcd73ffa5d8dec0778a209b8707eb1ba246c344de9bc50b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.11b1-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.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.11b1-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a942291397a72931b380bc3ea5c903abab4e44c7c68bc7f1a7a509ead097ce6b
MD5 ff690a1c95fec8dea144a4e0197b6d73
BLAKE2b-256 78823d2ce1779cf9c2cc4cfb544c5020ccea172db641236060c2489b23a71012

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.11b1-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.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.11b1-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6fa994ec704c1adf0de56bd017c846013bdaaf5d0d6720d4b078e5ed8d6a331e
MD5 e8c660e0a24e45b2e7937eb4b0dc2ad1
BLAKE2b-256 d2f8ee151e270c8906b2dd9e5b2dee72a188a6cf30732cbc8b172319c90e50a8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.11b1-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.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.11b1-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 b4722440f021ff76e3b641fb1850a44553a25c570d199a2bbe80720263111e53
MD5 509e3aeabfbed73531b45c31c7314695
BLAKE2b-256 f8f70284d65b138b0e41142603fb604f699693562b6f0b5208f75abef1ac4bd9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.11b1-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.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.11b1-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3ada6e14b09522ced332ff3118a21d9da83ca30e15ca905d661c7d357bfa1ecf
MD5 9d4f51f4a4b585065ffcc716ef834d47
BLAKE2b-256 1c45eea06e128429a8b03b3994c17c9a8137b7a71128299732502f078c305231

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.11b1-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.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.11b1-py3-none-any.whl
Algorithm Hash digest
SHA256 92c5c7900c537461708b953e07f4be8f9334c6f9684fcb385ddf12c236af12c8
MD5 ae13a3de82cd513bc264147b6ff79130
BLAKE2b-256 7393a97af1957e66f5fbd7f4b8995c75941019b46f25f5bc5b410a33a5d668f6

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