Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
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
第二步,下载模型文件
七牛云,当前模型版本 3.4.0
git submodule init
git submodule update
python setup.py bdist_wheel
FAQs
pyltp: the python extension for LTP 3
We found that pyltp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.