问题描述
WordNet 输入的单词是否需要格式为التُّفَّاحْ",不能指望التفاح"...是否有任何图书馆或服务采用未格式化的阿拉伯语单词返回所有可能的同义词列表.
Is it necessary for the word input to WordNet to be formatted like "التُّفَّاحْ" and can't expect "التفاح"...is there any library or service taking not-formatted Arabic word returning a list of all its possible synonyms.
推荐答案
从 التُّفَّاحْ
到 التفاح
,你只是想删除变音符号,然后你需要一个词汇规范化工具.尝试 Tashaphyne,下载并安装,然后使用 normalize
模块 http://pythonhosted.org/Tashaphyne/Tashaphyne.normalize-module.html:
From التُّفَّاحْ
to التفاح
, you simply want to remove the diacritics then you need a lexical normalization tool. Try Tashaphyne, download and install then use the normalize
module http://pythonhosted.org/Tashaphyne/Tashaphyne.normalize-module.html :
from Tashaphyne import *
text = 'التُّفَّاحْ'
print normalize_hamza(text)
print normalize_lamalef(text)
print normalize_searchtext(text)
这篇关于带有未格式化单词的阿拉伯语 WordNet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!