{"id":13591806,"url":"https://github.com/HIT-SCIR/pyltp","last_synced_at":"2025-04-08T18:30:47.838Z","repository":{"id":17840509,"uuid":"20752487","full_name":"HIT-SCIR/pyltp","owner":"HIT-SCIR","description":"pyltp: the python extension for LTP","archived":false,"fork":true,"pushed_at":"2022-07-24T04:04:34.000Z","size":9188,"stargazers_count":1523,"open_issues_count":15,"forks_count":353,"subscribers_count":70,"default_branch":"master","last_synced_at":"2024-05-07T18:17:21.115Z","etag":null,"topics":["chinese-nlp","python"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"HuangFJ/pyltp","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HIT-SCIR.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-12T02:53:42.000Z","updated_at":"2024-04-26T16:35:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/HIT-SCIR/pyltp","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HIT-SCIR%2Fpyltp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HIT-SCIR%2Fpyltp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HIT-SCIR%2Fpyltp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HIT-SCIR%2Fpyltp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HIT-SCIR","download_url":"https://codeload.github.com/HIT-SCIR/pyltp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247901950,"owners_count":21015367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chinese-nlp","python"],"created_at":"2024-08-01T16:01:02.255Z","updated_at":"2025-04-08T18:30:47.332Z","avatar_url":"https://github.com/HIT-SCIR.png","language":"C++","readme":"﻿# pyltp\n\n[![PyPI Status](https://badge.fury.io/py/pyltp.svg)](https://badge.fury.io/py/pyltp)\n[![Readthedocs](https://readthedocs.org/projects/pyltp/badge/?version=latest)](http://pyltp.readthedocs.io/)\n[![Build Status](https://travis-ci.org/HIT-SCIR/pyltp.svg?branch=master)](https://travis-ci.org/HIT-SCIR/pyltp)\n[![Build status](https://ci.appveyor.com/api/projects/status/kp2kjujo4amunyvr/branch/master?svg=true)](https://ci.appveyor.com/project/Oneplus/pyltp/branch/master)\n[![PyPI Downloads](https://img.shields.io/pypi/dm/pyltp.svg)](https://pypi.python.org/pypi/pyltp)\n\npyltp 是 [语言技术平台（Language Technology Platform, LTP）](https://github.com/HIT-SCIR/ltp)的 Python 封装。\n\n在使用 pyltp 之前，您需要简要了解 [语言技术平台（LTP）](http://ltp.readthedocs.org/zh_CN/latest/) 能否帮助您解决问题。\n\n**目前基于Pytorch的LTP4 已经发布，而PyLTP将会只有非常有限的维护，请大家移步使用**[LTP 4]([LTP 4](https://github.com/HIT-SCIR/ltp))\n\n## 依赖支持情况\n\nPython 2.7, 3.x, and PyPy (PyPy2.7 \u003e= 5.7)\n\n## 一个简单的例子\n\n下面是一个使用 pyltp 进行分词的例子\n\n```python\n# -*- coding: utf-8 -*-\nfrom pyltp import Segmentor\nsegmentor = Segmentor(\"/path/to/your/cws/model\")\nwords = segmentor.segment(\"元芳你怎么看\")\nprint(\"|\".join(words))\nsegmentor.release()\n```\n除了分词之外，pyltp 还提供词性标注、命名实体识别、依存句法分析、语义角色标注等功能。\n\n详细使用方法可以参考 [example](example/example.py)\n\n## 安装\n\n* 第一步，安装 pyltp\n\n\t使用 pip 安装\n\n\t```\n\t$ pip install pyltp\n\t```\n\t或从源代码安装\n\n\t```\n\t$ git clone https://github.com/HIT-SCIR/pyltp\n\t$ cd pyltp\n\t$ git submodule init\n\t$ git submodule update\n\t$ python setup.py install\n\t```\n\n\t+ Mac系统出现版本问题使用 MACOSX_DEPLOYMENT_TARGET=10.7 python setup.py install\n\t+ 编译时间较长（约5分钟左右），请耐心等待\n\n* 第二步，下载模型文件\n\n\t[七牛云](http://ltp.ai/download.html)，当前模型版本 3.4.0\n\n## 制作安装包\n\n```\ngit submodule init\ngit submodule update\npython setup.py bdist_wheel\n```\n\n## 版本对应\n\n* pyltp 版本：0.4.0\n* LTP 版本：3.4.0\n* 模型版本：3.4.0\n\n## 作者\n\n* 冯云龙 \u003c\u003c ylfeng@ir.hit.edu.cn \u003e\u003e 2020-7-30 重写代码，换用 Pybind11\n* 徐梓翔 \u003c\u003c zxxu@ir.hit.edu.cn \u003e\u003e 2015-01-20 解决跨平台运行问题\n* 刘一佳 \u003c\u003c yjliu@ir.hit.edu.cn \u003e\u003e 2014-06-12 重组项目\n* HuangFJ \u003c\u003c biohfj@gmail.com \u003e\u003e 本项目最初作者\n","funding_links":[],"categories":["C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHIT-SCIR%2Fpyltp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHIT-SCIR%2Fpyltp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHIT-SCIR%2Fpyltp/lists"}