阿拉伯语单词net同义词c#

时间:2017-09-13 11:44:55

标签: c# arabic wordnet synonym

我使用阿拉伯语单词NET Library来获取给定单词的同义词,但我得不到结果这是我使用的代码

awn = new AWN(@"..\..\awn.xml", true);
List<string> words = new List<string>();
string str = awn.Get_Synset_ID_From_Word_Id("كثير");

但没有结果返回。 任何帮助??

1 个答案:

答案 0 :(得分:0)

我解决了它如下

awn = new AWN(@"..\..\awn.xml", false);
List<string> words = new List<string>();

//get Item Id of the word
List<string> item_id = awn.Get_Item_Id_From_Name("عرض");  

//get the synonyms of the word
words = awn.Get_List_Word_Id_From_Synset_ID(item_id.First());

//get the word value for the first meaning
string s = awn.Get_Word_Value_From_Word_Id(words[0]);
相关问题