小编Ste*_*lla的帖子

使用 textblob 或 spacy 更正法语拼写

我想更正法语文本中拼写错误的单词,似乎 spacy 是最准确、最快速的软件包,但它很复杂,我尝试使用 textblob,但我没有设法用法语单词完成

它在英语中完美运行,但是当我尝试用法语做同样的事情时,我得到了相同的拼写错误

#english words 
from textblob import TextBlob
misspelled=["hapenning", "mornin", "windoow", "jaket"]
[str(TextBlob(word).correct()) for word in misspelled]

#french words
misspelled2=["resaissir", "matinnée", "plonbier", "tecnicien"]
[str(TextBlob(word).correct()) for word in misspelled2]
Run Code Online (Sandbox Code Playgroud)

我明白了:

英语:['发生','早上','窗口','夹克']

法语:['resaissir'、'matinnée'、'plonbier'、'tecnicien']

python nlp textblob spacy

3
推荐指数
1
解决办法
3586
查看次数

标签 统计

nlp ×1

python ×1

spacy ×1

textblob ×1