Language Technology Platform
Project description
LTP 4
LTP(Language Technology Platform) 提供了一系列中文自然语言处理工具,用户可以使用这些工具对于中文文本进行分词、词性标注、句法分析等等工作。
If you use any source codes included in this toolkit in your work, please kindly cite the following paper. The bibtex are listed below:
@article{che2020n,
title={N-LTP: A Open-source Neural Chinese Language Technology Platform with Pretrained Models},
author={Che, Wanxiang and Feng, Yunlong and Qin, Libo and Liu, Ting},
journal={arXiv preprint arXiv:2009.11616},
year={2020}
}
快速使用
from ltp import LTP
ltp = LTP() # 默认加载 Small 模型
seg, hidden = ltp.seg(["他叫汤姆去拿外衣。"])
pos = ltp.pos(hidden)
ner = ltp.ner(hidden)
srl = ltp.srl(hidden)
dep = ltp.dep(hidden)
sdp = ltp.sdp(hidden)
指标
| 模型 | 分词 | 词性 | 命名实体 | 语义角色 | 依存句法 | 语义依存 | 速度(句/S) |
|---|---|---|---|---|---|---|---|
| LTP 4.0 (Base) | 98.7 | 98.5 | 95.4 | 80.6 | 89.5 | 75.2 | |
| LTP 4.0 (Small) | 98.4 | 98.2 | 94.3 | 78.4 | 88.3 | 74.7 | 12.58 |
| LTP 4.0 (Tiny) | 96.8 | 97.1 | 91.6 | 70.9 | 83.8 | 70.1 | 29.53 |
模型算法
- 分词: Electra Small1 + Linear
- 词性: Electra Small + Linear
- 命名实体: Electra Small + Relative Transformer2 + Linear
- 依存句法: Electra Small + BiAffine + Eisner3
- 语义依存: Electra Small + BiAffine
- 语义角色: Electra Small + BiAffine + CRF
构建 Wheel 包
python setup.py sdist bdist_wheel
python -m twine upload dist/*
作者信息
- 冯云龙 <<ylfeng@ir.hit.edu.cn>>
开源协议
- 语言技术平台面向国内外大学、中科院各研究所以及个人研究者免费开放源代码,但如上述机构和个人将该平台用于商业目的(如企业合作项目等)则需要付费。
- 除上述机构以外的企事业单位,如申请使用该平台,需付费。
- 凡涉及付费问题,请发邮件到 car@ir.hit.edu.cn 洽商。
- 如果您在 LTP 基础上发表论文或取得科研成果,请您在发表论文和申报成果时声明“使用了哈工大社会计算与信息检索研究中心研制的语言技术平台(LTP)”. 同时,发信给car@ir.hit.edu.cn,说明发表论文或申报成果的题目、出处等。
脚注
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
ltp-4.1.2.tar.gz
(41.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
ltp-4.1.2-py3-none-any.whl
(67.6 kB
view details)
File details
Details for the file ltp-4.1.2.tar.gz.
File metadata
- Download URL: ltp-4.1.2.tar.gz
- Upload date:
- Size: 41.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6f8275567897bed67fd597e65968cbe8aea3f16ca5d44bde02871e28632560b
|
|
| MD5 |
94f7b0b65f05b1c2edf7da75c632c342
|
|
| BLAKE2b-256 |
774bdd680c1c7e3ccb10c8a9bbd2bb8587a79c3c41d7e3f7c17c682947f9452c
|
File details
Details for the file ltp-4.1.2-py3-none-any.whl.
File metadata
- Download URL: ltp-4.1.2-py3-none-any.whl
- Upload date:
- Size: 67.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce80a0930bf61c395911b550fc2b57c144e07e7d821cc3c659af92c98124bd73
|
|
| MD5 |
dad2fbc46cd74f174afa3802137abd38
|
|
| BLAKE2b-256 |
7a1258fbc7e648d7bf7e9faa6c159745f0e84220f896f25f78ba3ea01f9e39fd
|