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.
|
Flow of events |
|
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. |
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())
$.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