Synonyms Generator

The tool is based on a novel algorithm and datasets, treating synonymy as a fuzzy relation. (See Article).

Extend: Given one or more synonyms the tool extends it with more synonyms.
Evaluate: Given a set of synonyms the tool evaluates how much these synonyms belong to this set.
Try the service (type synonym separated by | or , or ،):


  • Accurecy:


    Filters:




    Level:




    Lemmatization:

  • Download the synonymy tools, which are part of SinaTools.

    Download the benchmark dataset, a set of 500 synsets (extracted from the Arabic Wordnet), each synset is enriched with a list of candidate synonyms. The total number is 3K candidates. Each candidate synonym was annotated with a fuzzy value by four linguists (in parallel).
    The dataset is important for understanding how much linguists (dis/)agree on synonymy (which we found RMSE: 32% and MAE: 27%). In addition, we used the dataset as a baseline to evaluate our algorithm. See the scoring guidelines, figures, and details in section 3.

  • Actors Authenticated user.
    URL schema To extend synonyms: https://{domain}/sina/v2/api/SynonymGenerator/?apikey={key}
    To evaluate synonyms: https://{domain}/sina/v2/api/EvaluateSynset/?apikey={key}
    Pre-conditions The user has registered and provided their API Key.
    API Parameters Each web service receives Synset, lexicons, POS, and level through the body. The boxes below demonstrate how to utilize these services by code using JavaScript and Python.
    1. Synset: mono/multilingual synset
    2. Lexicons: Select one or more of these lexicons (AWN, مكنز بيرزيت, Princeton WordNet, ALECSO, Cairo Academy)
    3. POS: part of speech (noun, verb, Functional word)
    4. Level: Level3 And Level4
    5. apikey: A key to access the API.
    Flow of events
    1. The system checks if the API Key is authenticated or not.
    2. If not authenticated, the system returns (-3) error code in JSON format.
    3. If authenticated, and the access limit is not exceeded (if exceeded returns -1 in JSON format), then the system logs the request.
    4. If so the system extracts the entities from text.
    5. Otherwise, the system returns (-4) error code.
    6. The system returns the results in the specified format.
    Retrieved Data For Extend: Return the candidate synonyms with their fuzzy values.
    For Evaluate: Demonstrate the level of relatedness between the words within the entered synset.
    Python code
       
                                                         from urllib.request import Request, urlopen
     import json
            
     data = {"synset" :["street","road"], "level" :"2", "task":"DB"}
     data = json.dumps(data).encode('utf8')
            
     req = Request(
     url="https://ontology.birzeit.edu/sina/v2/api/SynonymGenerator/?apikey=samplekey",
     data=data,
     headers={'User-Agent': 'Mozilla/5.0', 'Content-Type': 'application/json'},
     method='POST'
     )
     webpage = urlopen(req).read()
     print(webpage.decode())
                                                    
                                                         
                                                        
     from urllib.request import Request, urlopen
     import json
            
     data = {"synset" :["street","road"], "level" :"2", "task":"DB"}
     data = json.dumps(data).encode('utf8')
            
     req = Request(
     url="https://ontology.birzeit.edu/sina/v2/api/EvaluateSynset/?apikey=samplekey",
     data=data,
     headers={'User-Agent': 'Mozilla/5.0', 'Content-Type': 'application/json'},
     method='POST'
     )
     webpage = urlopen(req).read()
     print(webpage.decode())
                                                    
    Javascript code
                                         
     $.ajax({
     url: "https://ontology.birzeit.edu/sina/v2/api/SynonymGenerator/?apikey=sampleKey",
     data: JSON.stringify({"synset" :["street", "road"], "level" : "2", "task": "DB"}),
     type: "POST",
     success: function (data) {
     console.log(data["resp"]);
     }
     });     
                                        
                                        
                                         
     $.ajax({
     url: "https://ontology.birzeit.edu/sina/v2/api/EvaluateSynset/?apikey=sampleKey",
     data: JSON.stringify({"synset" :["street", "road"], "level" : "2", "task": "DB"}),
     type: "POST",
     success: function (data) {
     console.log(data["resp"]);
     }
     });
                                        
                                        
  • Tymaa Hammouda, Mustafa Jarrar, Mohammed Khalilia: SinaTools: Open Source Toolkit for Arabic Natural Language Understanding. In Proceedings of the 2024 AI in Computational Linguistics (ACLING 2024), Procedia Computer Science, Dubai. ELSEVIER.

    Nouran Khallaf, Elin Arfon, Mo El-Haj, Jon Morris, Dawn Knight, Paul Rayson, Tymaa Hammouda, Mustafa Jarrar: Open-source thesaurus development for under-resourced languages: a Welsh case study. The 4th LDK Conference on Language, Data and Knowledge, Vienna, Austria, 12-15 September 2023

    Sana Ghanem, Mustafa Jarrar, Radi Jarrar, Ibrahim Bounhas: A Benchmark and Scoring Algorithm for Enriching Arabic Synonyms. In Proceedings of the Global WordNet Conference (gwc2023), Donostia, January. 2023