用于文本清理、NLP 预处理的包装库
项目描述
马里奥
用于 NLP 中的文本清理、预处理和 POS 标记的包装库
文档
https://jakartaresearch.github.io/maleo/
功能概述
- Scanner : get insight about your text dataset (ex: number of chars, words, emojis, etc)
- Remove hyperlink, punctuation, stopword, emoticon, etc
- Extract hashtags, price from text
- Convert email, phone number, date to <TAG>
- Convert Indonesian slang to formal word
- Convert emoji to word or <TAG>
- Convert word to number
- Predict Part-of-Speech (POS) tags
安装
pip install maleo
入门
from maleo.wizard import Wizard
from maleo.pos_tag import POS
wiz = Wizard()
pos = POS()
wiz.scanner(df, 'text')
wiz.emoji_to_word(df.text)
wiz.slang_to_formal(df.text)
pos.predict('saya mau pergi beli makan siang dulu', output_pair=False)
通用 POS 标签
https://universaldependencies.org/u/pos/index.html
贡献者:
- 鲁本·史蒂芬努斯