Skip to main content

pyltp: the python extension for LTP

Project description

pyltp

PyPI Status Readthedocs Build Status Build status PyPI Downloads

pyltp 是 语言技术平台(Language Technology Platform, LTP)的 Python 封装。

在使用 pyltp 之前,您需要简要了解 语言技术平台(LTP) 能否帮助您解决问题。

一个简单的例子

下面是一个使用 pyltp 进行分词的例子

# -*- coding: utf-8 -*-
from pyltp import Segmentor
segmentor = Segmentor()
segmentor.load("/path/to/your/cws/model")
words = segmentor.segment("元芳你怎么看")
print "|".join(words)
segmentor.release()

除了分词之外,pyltp 还提供词性标注、命名实体识别、依存句法分析、语义角色标注等功能。

详细使用方法请参考 在线文档

安装

  • 第一步,安装 pyltp

    使用 pip 安装

     $ pip install pyltp
    

    或从源代码安装

     $ git clone https://github.com/HIT-SCIR/pyltp
     $ git submodule init
     $ git submodule update
     $ python setup.py install # Mac系统出现版本问题使用 MACOSX_DEPLOYMENT_TARGET=10.7 python setup.py install
    
  • 第二步,下载模型文件

    七牛云,当前模型版本 3.4.0

版本对应

  • pyltp 版本:0.2.0
  • LTP 版本:3.4.0
  • 模型版本:3.4.0

作者

Download files

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

Source Distribution

pyltp-binary-0.2.1.0.tar.gz (5.5 MB view details)

Uploaded Source

Built Distributions

pyltp_binary-0.2.1.0-cp39-cp39-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.9 Windows x86-64

pyltp_binary-0.2.1.0-cp38-cp38-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.8 Windows x86-64

pyltp_binary-0.2.1.0-cp38-cp38-manylinux1_x86_64.whl (42.8 MB view details)

Uploaded CPython 3.8

pyltp_binary-0.2.1.0-cp38-cp38-macosx_10_12_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.8 macOS 10.12+ x86-64

pyltp_binary-0.2.1.0-cp37-cp37m-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.7m Windows x86-64

pyltp_binary-0.2.1.0-cp36-cp36m-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.6m Windows x86-64

pyltp_binary-0.2.1.0-cp36-cp36m-manylinux1_x86_64.whl (31.7 MB view details)

Uploaded CPython 3.6m

File details

Details for the file pyltp-binary-0.2.1.0.tar.gz.

File metadata

  • Download URL: pyltp-binary-0.2.1.0.tar.gz
  • Upload date:
  • Size: 5.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3

File hashes

Hashes for pyltp-binary-0.2.1.0.tar.gz
Algorithm Hash digest
SHA256 4ecedd74fd6a704a8b7c2623952b2bb1f7750e2f030f19d6814d3adb2da28ad8
MD5 571cfed63b7edbdd2078ad1cf3e2a5b7
BLAKE2b-256 04e7278852feda07f03ff9bfec0c1d8a138512cfe9ed8a20df9888438ce0ab4f

See more details on using hashes here.

File details

Details for the file pyltp_binary-0.2.1.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pyltp_binary-0.2.1.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.4.2 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for pyltp_binary-0.2.1.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3409c3032e7a829230cc964dc331767aff04b0352a6c7260de5cc504248a6476
MD5 64ec150295b6f13a0bded7b5613d4d32
BLAKE2b-256 e402029b212756f0e4def1f0c04a55e6eb3d46f189150f8ea95cc1ff8d7e3ec8

See more details on using hashes here.

File details

Details for the file pyltp_binary-0.2.1.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pyltp_binary-0.2.1.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3

File hashes

Hashes for pyltp_binary-0.2.1.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 ed14b660a09b0bdc06b115b510cb8ccccb03bb9914316715a3ea4a888a5fd555
MD5 9a2d7e22b1818e1f276f0cb8c4d53249
BLAKE2b-256 2450acfe16c72438f3d921dbede86970cf8b384c0f6ad16479ce56d953482d33

See more details on using hashes here.

File details

Details for the file pyltp_binary-0.2.1.0-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: pyltp_binary-0.2.1.0-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 42.8 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

File hashes

Hashes for pyltp_binary-0.2.1.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 20fcf0d89005072f3d41c76dd38d8ee80898ca3637df62fa4b263815cd81e79d
MD5 e615e0c2c0750b5a7b3a0bac4dc0e3dc
BLAKE2b-256 080c6b9c37748a594ec03f6ec19ca6c1d11a7a1faa3ddf513ded9c4b121468ba

See more details on using hashes here.

File details

Details for the file pyltp_binary-0.2.1.0-cp38-cp38-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: pyltp_binary-0.2.1.0-cp38-cp38-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: CPython 3.8, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3

File hashes

Hashes for pyltp_binary-0.2.1.0-cp38-cp38-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 51f6496e784b5a7129461e24520e60dd34d9eb5856a0b83012ccbf6bf45ff11c
MD5 d56ca1e3397d020afcd1e0e7cb60fbdc
BLAKE2b-256 b3bdcf732f3cb5c45f80c7333781b662b1d67f301f77eb694744692af03d6857

See more details on using hashes here.

File details

Details for the file pyltp_binary-0.2.1.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pyltp_binary-0.2.1.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.4.2 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for pyltp_binary-0.2.1.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 dbdba2ebb65d4482a4fedd8c0605378604b622658753f25902c60e4d07c400a4
MD5 2206119d2b0d9b6fb0c529b7857a4ab7
BLAKE2b-256 13ea2cebbcf0416ba9587bc81640340ec7c48e0c0faff5d2d9bb154b967fd8ac

See more details on using hashes here.

File details

Details for the file pyltp_binary-0.2.1.0-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: pyltp_binary-0.2.1.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.4.2 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for pyltp_binary-0.2.1.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 ba526829789bd386eff20a974a9f8097cf3c0ecf0475ef922ec435f18f11f734
MD5 9b43b7a5c1a97ac67b48e7142c25824c
BLAKE2b-256 7ddf2cc65175d1086493846c4d97dcb8214ed8bbe530d00786a53f1ffd64daa1

See more details on using hashes here.

File details

Details for the file pyltp_binary-0.2.1.0-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pyltp_binary-0.2.1.0-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 31.7 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.8

File hashes

Hashes for pyltp_binary-0.2.1.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d3dc4fb41b74af63e766a81f2eed40e55c871d05b8885757578ade27b0f46951
MD5 f5f064b8ef2f16590450645c5c929a73
BLAKE2b-256 89d9a57d3a3ac6b5fd98c4a9aceb70038ead430be72f0c964b51342cdcba3b04

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