Search code examples
c#arabicwordnetsynonym

Arabic word net synonyms c#


I am using Arabic word NET Library to get the synonyms of a given words but i get no result this is the code which i used

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

But there is no result returned. any help??


Solution

  • I solved it as follows

    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]);