language_identification / language_identification.md
HoneyTian's picture
update
820797e
|
raw
history blame
431 Bytes

Language Identification

lanid

langid 识别 97 种语言。 https://github.com/saffsd/langid.py

原理:

https://github.com/saffsd/langid.py/tree/master/langid/train

1. 分词.
2. 计算 `字符ngram` 或 `词ngram` 特征.
3. 计算 item 的文档频率.
4. 计算 IG weights 信息增益权重, 提取重要特征.
4. 训练 NB (Naive Bayes) 概率模型, 即每个 item 对每个类型的概率贡献.