pyltp: the python extension for LTP 3
Project description
pyltp
pyltp 是 语言技术平台(Language Technology Platform, LTP)的 Python 封装。
在使用 pyltp 之前,您需要简要了解 语言技术平台(LTP) 能否帮助您解决问题。
目前基于Pytorch的LTP4 已经发布,而PyLTP将会只有非常有限的维护,请大家移步使用[LTP 4](LTP 4)
依赖支持情况
Python 2.7, 3.x, and PyPy (PyPy2.7 >= 5.7)
一个简单的例子
下面是一个使用 pyltp 进行分词的例子
# -*- coding: utf-8 -*-
from pyltp import Segmentor
segmentor = Segmentor("/path/to/your/cws/model")
words = segmentor.segment("元芳你怎么看")
print("|".join(words))
segmentor.release()
除了分词之外,pyltp 还提供词性标注、命名实体识别、依存句法分析、语义角色标注等功能。
详细使用方法可以参考 example
安装
-
第一步,安装 pyltp
使用 pip 安装
$ pip install pyltp
或从源代码安装
$ git clone https://github.com/HIT-SCIR/pyltp $ cd pyltp $ git submodule init $ git submodule update $ python setup.py install
- Mac系统出现版本问题使用 MACOSX_DEPLOYMENT_TARGET=10.7 python setup.py install
- 编译时间较长(约5分钟左右),请耐心等待
-
第二步,下载模型文件
七牛云,当前模型版本 3.4.0
制作安装包
git submodule init
git submodule update
python setup.py bdist_wheel
版本对应
- pyltp 版本:0.4.0
- LTP 版本:3.4.0
- 模型版本:3.4.0
作者
- 冯云龙 << ylfeng@ir.hit.edu.cn >> 2020-7-30 重写代码,换用 Pybind11
- 徐梓翔 << zxxu@ir.hit.edu.cn >> 2015-01-20 解决跨平台运行问题
- 刘一佳 << yjliu@ir.hit.edu.cn >> 2014-06-12 重组项目
- HuangFJ << biohfj@gmail.com >> 本项目最初作者
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyltp-0.4.0.tar.gz
(4.3 MB
view hashes)
Built Distributions
pyltp-0.4.0-cp310-cp310-win_amd64.whl
(564.7 kB
view hashes)
pyltp-0.4.0-cp39-cp39-win_amd64.whl
(564.9 kB
view hashes)
pyltp-0.4.0-cp38-cp38-win_amd64.whl
(564.7 kB
view hashes)
pyltp-0.4.0-cp37-cp37m-win_amd64.whl
(564.9 kB
view hashes)
pyltp-0.4.0-cp36-cp36m-win_amd64.whl
(564.9 kB
view hashes)
Close
Hashes for pyltp-0.4.0-pp39-pypy39_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7f76dff2bac2178e0b5a3767260174edec04c669f318d299f5a827308e42647 |
|
MD5 | 55408309bf07b9a1358b376649bc979d |
|
BLAKE2b-256 | 6e4eebdceb27e980a9cf643260037ce264f133672eca193c1cd21edf6228049a |
Close
Hashes for pyltp-0.4.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd783f2536d801efee1725e2795e6d8c9cd8977fef428db7f68e3d517b0cc179 |
|
MD5 | a72fec47807520a6a3a9a34c38c419bd |
|
BLAKE2b-256 | 7801905fa8c16fd6b4aecf44009e83213a5e7be75c48ebcc21fe9a02c8abff1f |
Close
Hashes for pyltp-0.4.0-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a07acbbd4c7872e3576ae78ad3d4307279c40e8b118c0a3f92decef42cb0713c |
|
MD5 | d2fe3483df2c071527ff4ed60c3fe125 |
|
BLAKE2b-256 | 1403d23330b5e715a314ba63180206cb312da0327bf06be1a78313bab4fcb6e9 |
Close
Hashes for pyltp-0.4.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9110ff01b5e62ebab5574df97f398ea00d6c69421c3e53bd48743e3c64f0683 |
|
MD5 | f20a9058ca2b7800cc3a8faf4d3837ec |
|
BLAKE2b-256 | c8ec3777150e82f354a66821786a1636511145cb343fcb6b70292b9b59e1ae73 |
Close
Hashes for pyltp-0.4.0-pp38-pypy38_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88996fd75d71e103130c256c22b1b2d2c900438822744d247606d707a0361db0 |
|
MD5 | 23dae601b04dcaa214233be7992fde4a |
|
BLAKE2b-256 | ea69b75034f46c6eecc135d2e08737d20741ff5b16a8d01d6028712f8ff81fde |
Close
Hashes for pyltp-0.4.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98cde7167c085b57527fda25a3a267c4a4a5d15e944a84bbfee10eb6d39ecb13 |
|
MD5 | 749acb1c2bab77449cbe4a94903d626e |
|
BLAKE2b-256 | 5a73c56b654d7853b57f0edc7de584b0d9a7aa30f93d1f64ef273cbb249cfc4d |
Close
Hashes for pyltp-0.4.0-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aadab6d1a5f1dc16a28e5b66b6e1a1212bbdbe3467b26ce449b23d7940fc5bf3 |
|
MD5 | 66633ece6dd011f2820ec39a083d643d |
|
BLAKE2b-256 | a456d861ad4824d18b629aaf05698b773b3409fe86ea2b1fdc4638578c8c4006 |
Close
Hashes for pyltp-0.4.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c216dd3e2672404d7b5563c352fb87e2b21b014e03c1496ea559ee53524f25f |
|
MD5 | 75a14e8759100f6ed024c349064be310 |
|
BLAKE2b-256 | 0111df465637382e299813c7722d14b46fbaf328fe250ffa0b145c3f980fbae8 |
Close
Hashes for pyltp-0.4.0-pp37-pypy37_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4dbd3e7a08a27e16dcf4c1b5e053d1b74e3a2c1a20ae1fe7e0a941311198c7b |
|
MD5 | d0cedc47e20f178999ecc067227812e1 |
|
BLAKE2b-256 | 5efce55600c45cedadadc3860c74b1fda6276a710cd7ee05cb60b2633a153535 |
Close
Hashes for pyltp-0.4.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 789b855f47ecb058624ee03327135f8fa968f60ced85ef0ec896447c01eec27d |
|
MD5 | ee950b45e4312f67087fce64015dcd1a |
|
BLAKE2b-256 | 31021751255f2873fb1560b5b32fa2bd6a94008cb653b49f5b696975dff799a2 |
Close
Hashes for pyltp-0.4.0-pp37-pypy37_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1c868b14ae0b46636b1dcb8ed67df997f9f16a8656290cdc3d9dc137742ce7c |
|
MD5 | f4d956a3b636964786943b8a92faaac4 |
|
BLAKE2b-256 | 65b0c5dbcb89d182a348d76eb20a412ad98a3a3b6baf6d6e214c16f9b9872730 |
Close
Hashes for pyltp-0.4.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e67d1c3ae227b8cd60b487d1d0b18c3a56849b4a16b1e02d43b8ed15b4561224 |
|
MD5 | 385dbe14d3be52c6863f8e765b40027b |
|
BLAKE2b-256 | 013b9ee19ee7ac3051c03fe53387218dd8f3c0843cf01988f426d1ccebc71cc1 |
Close
Hashes for pyltp-0.4.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 707ee0924de5aa45635596ffc8049ad0717ed165f778e53b4c992c587b050dec |
|
MD5 | f9fff075c0bf5b96ec47ae656d10e7b5 |
|
BLAKE2b-256 | e74098563ad39be93d4a4ca339911da302ac34d12ae779db1dae62992770c866 |
Close
Hashes for pyltp-0.4.0-cp310-cp310-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47d1f37cc475a561be526fe87dc658823ba277213a93ea42ce078148cf924794 |
|
MD5 | ab19eac95745f16b684188bdb0e59a5c |
|
BLAKE2b-256 | aaf11301352bb0b820e23356299c3262ed27067208d8d1fb17432ba253a01403 |
Close
Hashes for pyltp-0.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 318b5c25702c0f25697675012add7b875a6cf9509a4342f6dcb819e181953ecb |
|
MD5 | 4c5eea5e139aee72816f6f92cdebb6c3 |
|
BLAKE2b-256 | 6d0035a440fefce5162d5e352e342e19a1a452395b6868b4adc752084f77cdab |
Close
Hashes for pyltp-0.4.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c24bf2b33e43bec1b07855c0ebd7761fde0fea3066a05e46dfc6ef30aa72d103 |
|
MD5 | c37aee53a0f7b71e5e4a8508d508504a |
|
BLAKE2b-256 | 8570f224dafa3d390ae949db6fe0b25c9757fd40cb67a12ababb61a97ca2b464 |
Close
Hashes for pyltp-0.4.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da713d1827bd3f71aa2293158781593f14ff5ba153b51de63da7e8bf29a83e6e |
|
MD5 | f6e1b36dd8b6a92a560aee7c36606d61 |
|
BLAKE2b-256 | 30d6770faee2e596f9b918b92c3ac8c4c2b181294fbf875077aef4303308c008 |
Close
Hashes for pyltp-0.4.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3585c7c1a9a0ed6d3e3ac7a040fb4f6f6037f0c560590bb926b9623b2b85b80 |
|
MD5 | 2ab27b0ed6308461064691c2f524c945 |
|
BLAKE2b-256 | 268f41ee306cdffff35f430c8b3368305c9e39e4218caa9b238bc6b084971314 |
Close
Hashes for pyltp-0.4.0-cp39-cp39-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1d5d28919cc9af2cec98585b6abaa5ffa1ee1bd3b764983301cd97e1d50e6fb |
|
MD5 | 6ab89f6e0821610bdaa4b44de4b1f420 |
|
BLAKE2b-256 | 21307589e606fcaa3e87ab5efac9adde3412f2a8f65d7d31925d0c04c2e5e724 |
Close
Hashes for pyltp-0.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b4ece60672cf9a55173aabce731bbf090429a9d98e3bee282bc537e3227c19f |
|
MD5 | 8d7bdfa7981d95f0ad279323e128882c |
|
BLAKE2b-256 | 77880667df1d06102d3eac68cb76399e588127b706d097a04e27ef902f0d7e62 |
Close
Hashes for pyltp-0.4.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c231922192a0a4e29eb3bd50bf39788fea78c32ffa5863a045197670899ebf72 |
|
MD5 | 2a881f11b8c83d2ffd281b944363ed18 |
|
BLAKE2b-256 | fd1e2f4bf230ce87d7eca2a9fc2d16b43a00089b0faab9f471c132a3d03e3739 |
Close
Hashes for pyltp-0.4.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f24e072776f35a178fa3a1c280b830f02d3a5aa5af35e74a75b6a522b8354f2 |
|
MD5 | 0b45b4a20c617f5b5c44c4522431709d |
|
BLAKE2b-256 | 40506213b4f7d7b630c960977a1e952637022d2acdd731bfa8837b9c327e50b4 |
Close
Hashes for pyltp-0.4.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 270ec53cf15b7e4a4a8e938f76d8f5b2eb28300c5fdb8f0512cee4c2b5b96214 |
|
MD5 | 5c7f00c9e2ff93e1ef11012e7760d451 |
|
BLAKE2b-256 | 0274f3f3a5dd704978c0a42f577225c51d18551c801715c2d54144fb4a67c0dd |
Close
Hashes for pyltp-0.4.0-cp38-cp38-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca9dfc3e9f4f3d7625a29bc9b0280c038cc989dfe9b69e10f84a406726420e8d |
|
MD5 | c377c2227dcab22eaec38a7c72d57ec8 |
|
BLAKE2b-256 | 77eb0362559673b31ef1c6b8a88ca5bfb7826cf94c7c434d2872be396a9aee7d |
Close
Hashes for pyltp-0.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b46d821cc3550a03fce5b5b624d4a4a755cdd68cc178d86ccabb4bc32e081d89 |
|
MD5 | eab4c5d3946daa78dee4e0abe1516639 |
|
BLAKE2b-256 | 5b0093fcb7d62eff1ba577eb86af8ba26a512a0e8a930a1ff3bc29c4aa030dc7 |
Close
Hashes for pyltp-0.4.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b6abc3974c455b2f7004225fb43d70565c524bd1491f89f6f339cef0cfb08ba |
|
MD5 | 8e1bf7561f9eecb62499d98f80815d19 |
|
BLAKE2b-256 | 0338a7c88762f4737b26355f1e171f1628b30145429e68535d2a8f490cad3d6b |
Close
Hashes for pyltp-0.4.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96f7a1bb283d04b46f099c67332480da736bcbd3a87abe0caa97067f87848972 |
|
MD5 | a6842366187d9643880df397904e8c7a |
|
BLAKE2b-256 | c0fe438c64ae1ef0a90ec789c3c28878faa6b1d83474d4da92e6468bf007d591 |
Close
Hashes for pyltp-0.4.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ab88e4a00d7c6b06b684bac177bd50b179684bc4c23487ac14ad94f7f18248d |
|
MD5 | 68561c9b53bc43a2a8373da75afc6615 |
|
BLAKE2b-256 | f6eed33a93ba1ddf10923b895d304cf100c39f404237bb4583505f2d902e6c45 |
Close
Hashes for pyltp-0.4.0-cp37-cp37m-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4857eb247e147e7a136a848e0664fb0133908ba89c6d2065caaeecf87f2f521a |
|
MD5 | 933d3606c8ff3a9f81359139aa893fe8 |
|
BLAKE2b-256 | 75370a02d20554cf69a223c38bd03e2e49fbadfb74ac00c20a8a857a3eca79e7 |
Close
Hashes for pyltp-0.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad4f08f30b8f1eb1e4c9e5e26b51c93b3e84870f41fa435a6c26cb6df6c07ca0 |
|
MD5 | cb7dc9e853a971d56215f963b89f8c17 |
|
BLAKE2b-256 | 90baf51732dd36e884152c4b3e0f8c54f54fdab910224a17d3d4a56876faea84 |
Close
Hashes for pyltp-0.4.0-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7bd4f5fee052c0d613ea0996bcc972159f8630dff4d47ce83daa3fb7f79f6ed |
|
MD5 | 542df9583d777ab6b8d55dddc0e29865 |
|
BLAKE2b-256 | e13ea148a094ba00baca1b8989a311dbeb8f72a89c450093fcc730c0dcdefab2 |
Close
Hashes for pyltp-0.4.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4e206f73ffa42a0bccfac4c817353a1061ca6cef86b73085f6d3d724e03ae1b |
|
MD5 | 949a0ef9c52687532ce17f04ce907ff7 |
|
BLAKE2b-256 | 6070b77cc2470e1b431f778c3e346f69ac1dcc2772e07752375049688d951b06 |
Close
Hashes for pyltp-0.4.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8dc31da56a97d72ddef33bd5a347f7afaa43433f651465fb8793a021ae12e29 |
|
MD5 | 7150ec3f94e6fdc49f5a4869a267a10e |
|
BLAKE2b-256 | 36cdb75f7dbf4e9b685e754f0ba0ec9ff38f6b25ceb9cb299de0f2bdd6854e4e |
Close
Hashes for pyltp-0.4.0-cp36-cp36m-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52d95f6af1beecb26d1946566c47a425cba6cf0095ab73286121796782a5503e |
|
MD5 | dce53b6cd6d30c8f25b7c3f86240ce75 |
|
BLAKE2b-256 | b8219637188180e0dac5648283a77c66fc1737638cde5c3b954e946d80644c90 |
Close
Hashes for pyltp-0.4.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62f8ffbf4c6a69c7eb176ea951a6d43bb8600111711332d7704f753439983c7a |
|
MD5 | c371d1640ba8ba294cfe229e5254731b |
|
BLAKE2b-256 | 2b46e3d85377d622792080529523acd00c08ec66945325b111e1b9709f959e63 |
Close
Hashes for pyltp-0.4.0-cp36-cp36m-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 257809dfb1e1d1ac875b926dec838a21b15e73eaac49959fc41f3918960811f2 |
|
MD5 | bc5d1c51fa1758004e9773d048db08c9 |
|
BLAKE2b-256 | b9f76894b949c2bd95a34214be90bfb2e1ac1fb1e7624ffc38b29a1da683c5cf |
Close
Hashes for pyltp-0.4.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 317271fab0d7d57a7550c579edae751909bac8c5c3e313cc0a604bb698f9f139 |
|
MD5 | 911e6bc3d58d5ca09b922fe2caa1edd2 |
|
BLAKE2b-256 | 4182b27849e554b056b4b106bb7a5b319bfe8eafc5c068be74d056de8395cb6b |