Extracting Synonyms from Bilingual Dictionaries (2021)

Abstract: We present our progress in developing a novel algorithm to extract synonyms from bilingual dictionaries. Identification and usage of synonyms play a significant role in improving the performance of information access applications. The idea is to construct a translation graph from translation pairs, then to extract and consolidate cyclic paths to form bilingual sets of synonyms. The initial evaluation of this algorithm illustrates promising results in extracting Arabic-English bilingual synonyms. In the evaluation, we first converted the synsets in the Arabic WordNet into translation pairs (i.e., losing word-sense memberships). Next, we applied our algorithm to rebuild these synsets. We compared the original and extracted synsets obtaining an F-Measure of 82.3% and 82.1% for Arabic and English synsets extraction, respectively.

## introduction the importance of synonyms is growing in a number of application areas such as computational linguistics, information retrieval, question answering, and machine translation among others. synonyms are also considered essential parts in several types of lexical resources, such as thesauri, wordnets @xcite , and linguistic ontologies @xcite . there are different notions of synonymy in the literature varying from strict to lenient. in ontology engineering (see e.g., @xcite , synonymy is a formal equivalence relation (i.e., reflexive, symmetric, and transitive). two terms are synonyms iff they have the exact same concept (i.e., refer, intentionally, to the same set of instances). thus, @xmath0. in other words, given two terms t1 and t2 lexicalizing concepts c1 and c2, respectively, then t1 and t2 are considered to be synonyms iff @xmath1. a less strict definition of synonymy is used for constructing wordnets, which is based on the substitutionablity of words in a sentence. according to @xcite , "two expressions are synonymous in a linguistic context c if the substitution of one for the other in c does not alter the truth value". others might refer to synonymy to be a "closely-related" relationship between words, as used in distributional semantics, or the so-called word embeddings (see e.g., @xcite . word embeddings are vectors of words automatically extracted from large corpora by exploiting the property that words with a similar meaning tend to occur in similar contexts. but it is unclear what type of similarity word vectors capture. for example, words like red, black and color might appear in the same vector which might be misleading synonyms. extracting synonyms automatically is known to be a difficult task, and the accuracy of the extracted synonyms is also difficult to evaluate @xcite . in fact, this difficulty is also faced when modeling synonyms manually. for example, words like room ( ‫ﻏ‬ ‫ﺮ‬ ‫ﻓ‬ ‫ﺔ‬ ) and hall ( ‫ﻗ‬ ‫ﺎ‬ ‫ﻋ‬ ‫ﺔ‬ ) are synonyms only in some domains like schools and events organization @xcite . indeed, synonymy can be general or domain-specific; and since domains and contexts are difficult to define @xcite , and since they themselves may overlap, constructing a thesaurus needs special attention. another difficulty in the automatic extraction of synonyms is the polysemy of words. a word may have multiple meanings, and its synonymy relations with other words depend on which meaning(s) the words share. assume e1, e2, and e3 are english words, and a1, a2 and a3 are arabic words, we may have e1 participating in different synonymy and translation sets, such as, {e1, e2}={a2} and {e1, e3}={a3}. for example {table, tabular array}={ ‫ﺟ‬ ‫ﺪ‬ ‫و‬ ‫ل‬ } and {river, stream}={ ‫ﺟ‬ ‫ﺪ‬ ‫و‬ ‫ل‬ }. in this paper, we present a novel algorithm to automatically extract synonyms from a given bilingual dictionary. the algorithm consists of two phases. first, we build a translation graph and extract all paths that form cycles; such that, all nodes in a cycle are candidate synonyms. second, cyclic paths are consolidated, for refining and improving the accuracy of the results. to evaluate this algorithm, we conducted an experiment using the arabic wordnet (awn) @xcite . more specifically, we built a flat bilingual dictionary, as pairs of arabic-english translations from awn. then, we used this bilingual dictionary as input to our algorithm to see how much of awn's synsets we can rebuild. although the algorithm is language-independent and can be reused to extract synonyms from any bilingual dictionary, we plan to use it for enriching the arabic ontology -an arabic wordnet with ontologically clean content @xcite . the idea is to extract synonyms, and thus synsets, from our large lexicographic database which contains about 150 arabic-multilingual lexicons @xcite . this database is available through a public lexicographic search engine @xcite , and represented using the w3c lemon model @xcite . this paper is structured as follows: section 2 overviews related work, section 3 presents the algorithm, and section 4 presents its evaluation. finally, section 5 outlines our future directions. ## related work synonyms extraction was investigated in the literature mainly for constructing new wordnets or within the task of discovering new translation pairs. in addition, as overviewed in this section, some researchers also explored synonymy graphs for enhancing existing lexicons and thesauri. a wordnet, in general, is a graph where nodes are called synsets and edges are semantic relations between these synsets @xcite . each synset is a set of one, or more synonyms, which refers to a shared meaning (i.e., signifies a concept). semantic relations like hyponymy and meronymy are defined between synsets. after developing the princeton wordnet (pwn), hundreds of wordnets have been developed for many languages and with different coverage (see globalwordnet.org). many researchers proposed to construct wordnets automatically using the available linguistic resources such as dictionaries, wiktionaries, machine translation, corpora, or using other wordnets. for example, @xcite proposed to build a portuguese wordnet automatically by building a synonymy graph from existing monolingual synonyms dictionaries. candidate synsets are identified first; then, a fuzzy clustering algorithm is used to estimate the probability of each word pair being in the same synset. other approaches proposed to also construct wordnets and lexical ontologies via cross-language matching, see @xcite . a recent approach to expand wordnets, by @xcite , suggests to construct a multilingual translation graph from multiple wiktionaries, and then link this graph with existing wordnets in order to induce new synsets, i.e., expanding existing wordnets with other languages. other researchers suggest to use dictionaries and corpora together, such as @xcite who proposed to extract synonyms from both monolingual dictionaries and bilingual corpora. first, a graph of words is constructed if a word appears in the definition of the other, and then assigned a similarity rank. second, a bilingual english-chinese corpus (pairs of translated sentences) is used to find links between words if they appear in the same pair, with a probability rank. third, a monolingual chinese corpus is used to find words co-occurring in the same context. these three results are then combined together using the ensemble method. a more recent approach, by @xcite , proposed to use an unsupervised method for automated construction of wordnets using pwn, machine translations, and word embeddings. a target word is first translated into english using machine translation, and these translations are used to build a set of candidate synsets from pwn. each candidate synset is then ranked with a similarity score that is calculated using the word embedding-based method. a similar attempt to build arabic and vietnamese wordnets was proposed by @xcite . they proposed a method to automatically construct a new wordnet using machine translation and existing wordnets. given a synset in one or more wordnets, all words in this synset (in multiple languages) are translated using machine translation into the target language. the retrieved translations, which contain wrong translations because of polysemy, are ranked based on their relative frequencies, and the highest ranked translations are retrieved. this approach was extended by al- @xcite by introducing word embeddings to better validate and remove irrelevant words in synsets. other related work to synonymy extraction is the task of finding new translations, such that, given translation pairs between multiple languages, one may discover new translation pairs that are not explicitly stated. for example, @xcite presented an experiment to produce new translations from a translation graph constructed from the apertium dictionaries. given a set of multilingual translation pairs, a translation graph is constructed, from which cycles are extracted. new translation pairs are then identified if they participate in the extracted cycles. the experiment illustrated that some wrong translations might be detected because of polysomy, thus a path density score was assigned to each path, such that low densities are excluded. more recently, @xcite presented three algorithms for automatic discovery of translations from existing dictionaries, namely, cycle-based, path-based, and multi-way neural machine translation. in the cycle-based approach, a translation graph is constructed from a multilingual dictionary, and cycles of length 4 are identified. however, in the path-based approach, a frequency weight is assigned to each path based on the number of translation pairs participating in this path, such that paths of lower length and higher frequency get lower weights. in the third algorithm, multilingual parallel corpora were used to train a multi-way neural machine translation, and continued the training based on the output of the other two algorithms. an experiment by the authors shows a very low recall and a reasonable precision (25-75%) for the three approaches. the main differences between these approaches and our approach, is that we aim at extracting synonyms rather than translation pairs, and that we assume the translation graph to be formed of nodes from two languages only. having two languages in the translation graph produces a different number of paths; thus, different disambiguation complexity. a lexicon-based algorithm called cqc was proposed by @xcite . the algorithm takes a bilingual dictionary as input, then builds a translation graph, from which only cyclic and quasi-cyclic paths are extracted. these paths are then ranked, such that shorter paths are given higher ranks than longer ones. words, and words senses, encountered in the cycles or quasicycles are likely to be synonymy candidates. this approach is mainly used for validating and enriching the ragazzini-biagi english-italian dictionary, but it can be also used for extracting synonyms. the accuracy of this approach depends on the structure of input dictionaries, which is assumed to contain senses, e.g., an english word and its set of equivalent italian translations. this implies that these italian words are themselves synonyms. in our approach, we assume that a word in a given language is translated to only one word in the other language, i.e., only translation pairs, without synonymy relations. in other words, we assume the bilingual input to be the most ambiguous. as will be discussed in section 4, our algorithm does not assume any pre-existing conditions or assumptions about the input data, and does not use part-of-speech or any other morphological features. designing an algorithm without any preexisting assumption, makes the algorithm more reusable @xcite for other languages and other types of lexicons. nevertheless, and as described in the future work section, using linguistic features would improve the algorithm's accuracy. ## our algorithm the problem we aim to tackle in this paper is described as the following: given a set b of bilingual translation pairs of the form (ai, ej), where ai is a word in language l1 and ej is its translation in language l2. our goal is to extract a set r of bilingual synonyms, such that {a1,..,ak} = {e1,..,el} ∈ r. to extract the set r of bilingual synonyms from b, our algorithm performs two steps: ## evaluation and discussion to evaluate the extent to which our synonyms extraction algorithm is able to produce correct results, we used the arabic wordnet (awn). the awn, which is a set of bilingual synsets, is converted into a flat bilingual dictionary (i.e., translation pairs), such that all synonymy links between words are lost. then, we use our algorithm to restore these links (extract bilingual synsets), and compare the extracted with original synsets. our choice of evaluating the algorithm using the awn data is because this resource contains highly polysemous words, and thus evaluates the algorithm in challenging cases. in addition, and in order to evaluate the algorithm in unguided conditions or any pre-existing assumption, and make it reusable for other languages, we did not apply any fine-tuning or language-specific preprocessing or treatment. thus, we assume that the input translation pairs do not have any tag indicating their part of speech (pos) or other morphological features, or whether words are msa or dialect @xcite . we also assume that arabic words with different diacritic signs, even if they are compatible @xcite , are different words. for example ( ‫ﻏ‬ ‫ﺎ‬ ‫ﺑ‬ ‫ﺔ‬ َ َ ) and ( ‫ﻏ‬ ‫ﺎ‬ ‫ﺑ‬ ‫ﺔ‬ َ ) are considered different words because of slightly different diacritics. tuning the algorithm to take into account such morphological features, inflections, and diacritics, would very likely improve the accuracy of the results; but this is not a goal in this paper and is left as a future work. as evaluation metrics, we use the precision, recall and f-measure to compare the extracted synsets with the original awn as the gold standard. we use the cosine similarity to compute the match between two given synsets. for precision, we count the number of correctly extracted synsets divided by all the extracted synsets. in cases of partial match between two synsets x and y, we use the max similarity with all the gold sets as the "correctness" of the extracted synset: tables 1 and 2 show the evaluation metrics when extracting arabic and english synsets, respectively. clearly, the proposed consolidation step has a positive effect on the algorithm by boosting the f-measure from 74.4% to 82.3% and from 70.1% to 82.1% for arabic and english, respectively for a path length @xmath2. the results also show that having longer paths (e.g., @xmath3, which is most likely in case of highly polysemous words, where some irrelevant nodes are generated in longer paths. last but not least, the arabic wordnet contains about 10k synsets, and most of the words in these synsets are, by definition, highly polysemous arabic and english words. this is because these 10k synsets are called common base concepts, and assumed to be frequently used and exist in many languages. as discussed earlier such high polysemy is likely to affect the accuracy; thus, evaluating our algorithm on less polysemous words is likely to produce better accuracy. ## conclusions and future work we presented our progress in developing a novel algorithm to extract synonyms from bilingual dictionaries. although the algorithm was evaluated on extracting english-arabic bilingual synsets, it is reusable for other languages, especially since it does not assume any languagespecific treatment or preprocessing. our choice of using awn in the evaluation, which contains highly polysemous words, illustrates that our algorithm produces realistic results in such challenging cases. we plan to extend our algorithm in different directions. we plan to take into account part of speech tags and other morphological features when generating candidate synonyms. similarly, words with different, but compatible, diacritics, inflections, and forms need a special treatment. such extensions and fine-tunings are very likely to produce higher accuracy.