# pyltp
[![PyPI Status](https://badge.fury.io/py/pyltp.svg)](https://badge.fury.io/py/pyltp)
[![Readthedocs](https://readthedocs.org/projects/pyltp/badge/?version=latest)](http://pyltp.readthedocs.io/)
[![Build Status](https://travis-ci.org/HIT-SCIR/pyltp.svg?branch=master)](https://travis-ci.org/HIT-SCIR/pyltp)
[![Build status](https://ci.appveyor.com/api/projects/status/kp2kjujo4amunyvr/branch/master?svg=true)](https://ci.appveyor.com/project/Oneplus/pyltp/branch/master)
[![PyPI Downloads](https://img.shields.io/pypi/dm/pyltp.svg)](https://pypi.python.org/pypi/pyltp)
pyltp 是 [语言技术平台(Language Technology Platform, LTP)](https://github.com/HIT-SCIR/ltp)的 Python 封装。
在使用 pyltp 之前,您需要简要了解 [语言技术平台(LTP)](http://ltp.readthedocs.org/zh_CN/latest/) 能否帮助您解决问题。
**目前基于Pytorch的LTP4 已经发布,而PyLTP将会只有非常有限的维护,请大家移步使用**[LTP 4]([LTP 4](https://github.com/HIT-SCIR/ltp))
## 依赖支持情况
Python 2.7, 3.x, and PyPy (PyPy2.7 >= 5.7)
## 一个简单的例子
下面是一个使用 pyltp 进行分词的例子
```python
# -*- coding: utf-8 -*-
from pyltp import Segmentor
segmentor = Segmentor("/path/to/your/cws/model")
words = segmentor.segment("元芳你怎么看")
print("|".join(words))
segmentor.release()
```
除了分词之外,pyltp 还提供词性标注、命名实体识别、依存句法分析、语义角色标注等功能。
详细使用方法可以参考 [example](example/example.py)
## 安装
* 第一步,安装 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分钟左右),请耐心等待
* 第二步,下载模型文件
[七牛云](http://ltp.ai/download.html),当前模型版本 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 >> 本项目最初作者
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Pyltp模块.rar (35个子文件)
Pyltp模块
pyltp_binary-0.2.1.0-cp37-cp37m-win_amd64.whl 1.16MB
pyltp-0.2.1-cp36-cp36m-win_amd64.whl 1.16MB
pyltp-master
MANIFEST.in 665B
.gitmodules 159B
example
example.py 3KB
lexicon.txt 10B
pyproject.toml 0B
CHANGES.rst 126B
.github
PULL_REQUEST_TEMPLATE.md 1KB
ISSUE_TEMPLATE.md 2KB
workflows
python-package.yml 2KB
python-publish.yml 2KB
src
pyltp.cpp 12KB
doc
api.rst 11KB
conf.py 9KB
make.bat 7KB
install.rst 940B
intro.rst 248B
changelog.rst 126B
Makefile 8KB
start.rst 0B
index.rst 344B
setup.py 4KB
.gitignore 352B
CMakeLists.txt 620B
.travis
install.sh 613B
README.md 2KB
pyltp.egg-info
PKG-INFO 4KB
not-zip-safe 2B
SOURCES.txt 200B
top_level.txt 6B
dependency_links.txt 1B
pybind11
ltp
pyltp-master.zip 27KB
pyltp_binary-0.2.1.0-cp39-cp39-win_amd64.whl 1.16MB
pyltp_binary-0.2.1.0-cp38-cp38-win_amd64.whl 1.16MB
共 35 条
- 1
浪荡子爱自由
- 粉丝: 153
- 资源: 18
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于html实现蛋糕店网站页面源码.zip
- 疫情数据查看(sping boot)
- c++0101生日快乐
- 1碳交易机制下考虑需求响应的优化运行(20).zip
- 基于C/C++开发的单目控制机械臂的上位机程序+视觉识别和关节角反解+源码(高分优秀项目)
- 学生课设,C++数据结构实验,队列的实现,vs2022完整项目,包含完整代码,开箱即用
- max111111111
- 基于streamlit实现的企业物流分析平台功能物流数据可视化物流费用测算求解商品最优补货路径源码.zip
- 基于matlab仿真的puma560机械臂RRT路径规划算法+源码(高分优秀项目)
- RedisClient1.5版本,带jdk
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
- 6
前往页