Keywords

1 Introduction

Semantic Textual Similarity (STS) is the task of measuring the degree of semantic equivalence between two textual units (texts, paragraphs or sentences) [1]. STS is a core field of Natural Language Processing (NLP) and plays an important role in several application areas, such as Information Retrieval (IR), Word Sense Disambiguation (WSD), Question Answering (QA), and Text Summarization (TS) among others. There are two known types of STS: monolingual and cross-language [3]. The first one estimates the degree to which the underlying semantics of two textual units written in the same language, are equivalent to each other, while the STS cross-language aims to quantify the degree to which two textual units are semantically related, independent of the languages they are written in [15].

Determining the similarity between sentences has been extensively reviewed in a monolingual domain [4, 20, 37, 43]. While cross-language semantic similarity is relatively more difficult to identify since the relatedness of words are investigated between two different languages [15]. Thus, it is necessary to address this task to enhance the performance in several applications, such as Machine Translation (MT), Cross-Language Plagiarism Detection (CLPD) and Cross-Language Information Retrieval (CLIR).

In this paper we focus our investigation on measuring the semantic similarity between Arabic-English cross-language sentences using machine translation and word embedding representations. We also consider words alignment, term frequency weighting and Part-of-Speech tagging to improve the identification of words that are highly descriptive in each sentence.

The rest of this paper is organized as follows, the next section describes work related to STS cross-language detection and word embedding models. In Sect. 3, we present our proposed cross-language word embedding-based methods. Section 4 describes the experimental results of these systems. Finally, our conclusion and some future research directions are drawn in Sect. 5.

2 Related Work

In this section, we review the most relevant approaches for measuring cross-language semantic textual. Then, we study those dedicated to the Arabic-English semantic similarity. Finally, we recall some concepts related to word embedding.

2.1 Cross-Language Semantic Textual Similarity Detection

In the literature, many approaches are proposed for cross-language textual similarity detection. We can classify them according to the strategy they used to detect such similarity into five classes: Syntax-Based, Dictionary-Based, Parallel and Comparable Corpora-Based and MT-Based Models [10]. Figure 1 shows the taxonomy of different approaches for cross-language similarity detection. In the following, we will review the most commonly used methods.

Fig. 1.
figure 1

Taxonomy of different approaches for cross-language similarity detection [10].

Concerning the syntax-based models, the key idea lies in comparing multilingual texts without translation. For instance, Pouliquen et al. [16] have proposed a “Length Model” to estimate cross-language text similarity. It is mainly based on comparing the texts size. They observed the fact that the length of texts in different languages are closely linked by a factor, and there is a different factor for each language pair. McNamee and Mayfield [22] have introduced Cross-Language Character N-Gram (CL-CNG) model to compare two textual units by using their n-gram vectors representation. This technique achieves a good performance with languages that are close to each other, because of common root words.

In dictionary-based models, the semantic similarity is measured by constructing a vector space model of the textual units. For that, a vector of concepts is built for each textual unit using dictionaries or thesaurus. The similarity between the vectors of concepts can be measured using the Cosine similarity, Euclidean distance, or any other similarity measure. In [15] a Cross-Language Conceptual Thesaurus-Based Similarity model (CL-CTS) is proposed to measure the similarity between textual units written in different languages (Spanish, English and German). CL-CTS is based on the thesaurus concepts vectors presented in EurovocFootnote 1 where a Cosine similarity is computed between these vectors. In the same context, Pataki [32] have proposed a Cross-Language Dictionary-Based Language-Independent (CL-DBLI) model. CL-DBLI considers a translation synonym dictionary to extract the abstract concepts from words in textual units.

For comparable corpora-based models, Gabrilovich and Markovitch [12] have presented a Cross-Language Explicit Semantic Analysis (CL-ESA) model. CL-ESA is based on the Explicit Semantic Analysis (ESA), which represent the meaning of text by a vector of concepts derived from Wikipedia. In a cross-lingual context, Potthast et al. [36] use Wikipedia as comparable corpus to estimate the similarity of two documents by calculating the similarity of their two ESA representations. Another model called Cross-Language Knowledge Graph Analysis (CL-KGA), is introduced for the first time by Franco-Salvador et al. [11]. CL-KGA uses knowledge graphs built from multilingual semantic network (the authors use BabelNet [31]) to represent texts, and then compare them in a common lingual semantic graph space.

Regarding parallel corpora-based models, several approaches are proposed. For instance, Barrón-Cedeño et al. [6] have introduced a Cross-Language Alignment Similarity Analysis (CL-ASA) approach. CL-ASA estimates the similarity between two textual units using bilingual statistical dictionary extracted from parallel corpus. The same idea was used independently by Pinto et al. [34]. A Cross-Language Latent Semantic Indexing model (CL-LSI) is developed by Potthast et al. [35]. CL-LSI uses a parallel corpora with the common Latent Semantic strategy applied in IR systems for term-textual unit association. Another model named Cross-Language Kernel Canonical Correlation Analysis (CL-KCCA) model due to Vinokourov et al. [42], it analyzes the correspondences between two LSI spaces to measure the correlation of the respective projection values.

The main idea of the machine translation-based models consists in using MT tools to translate textual units into the same language (pivot language) in order to apply a monolingual comparison between them [5]. For this purpose, Kent and Salim [18] have used Google Translate API to translate texts, while Muhr et al. [29] replace each word of the original text by its most likely translations in the target language.

2.2 Arabic-English Cross-Language Semantic Similarity

In context of the Arabic-English cross-language semantic similarity, Hattab [17] has used Latent Semantic Indexing (LSI) to build cross-language Arabic-English semantic space (CL-AE-LSI), from which it checks the contextual similarity of two given texts, one in Arabic and the other in English.

Recently, Alzahrani [3] presented two models of Semantic Similarity for Arabic-English Cross-Language Sentences (SS-CL-AES). The first one used a dictionary-based translation, where an Arabic sentence is translated into English terms, then the semantic similarity is computed by using the maximum-translation similarity technique. In the second model, MT is applied on the Arabic sentence. After that, the algorithms proposed by Lee [19], and Liu et al. [21] are used to calculate the semantic similarity.

Alaa et al. [2] are interested in Cross-Language Plagiarism Detection of Arabic-English documents (CL-PDAE). In fact, after a candidate document retrieval step by key phrase extraction, they translate a source text by getting for a word all the available translations of all its available synonyms from WordNet [27], and then they use a combination of monolingual measures (Longest Common Subsequence (LCS), Cosine similarity and N-Gram) to detect similar phrases.

2.3 Word Embedding-Based Models

Recently, Word Embedding (WE) technique has received a lot of attention in the NLP community and has become a core building to many NLP applications. WE represents words as vectors in a continuous high-dimensional space. These representations allow capturing semantic and syntactic properties of the language [23]. In the literature, several techniques are proposed to build word embedding models.

For instance, Collobert and Weston [9] have presented a unified system based on a deep neural network, and jointly trained with many NLP tasks, such as: POS tagging, Semantic Role Labeling and Named Entity Recognition. Their model is stored in a matrix \(M \in R^{d*|D|}\), where D represents the dictionary of all unique words in the training data, and each word in D is embedded into a d-dimensional vector. The sentences are represented using the embeddings of their forming words. A similar idea was independently proposed and used by Turian et al. [41].

Mnih and Hinton [28] have introduced another form to represent words in vector space, named Hierarchical Log-Bilinear Model (HLBL). Like almost all neural language models, the HLBL model is used to represent each word by a real-valued feature vector. HLBL concatenates the (\(n-1\)) first embedding words \((w_{1} \,{\ldots }\, w_{n-1})\) and learns a neural linear model to predicate the last word \(w_{n}\).

In Mikolov et al. [26] a recurrent neural network (RNN) [24] is used to build a neural language model. The RNN model encode the context word by word and predict the next word. Afterwards, the weights of the trained network are considered as the word embedding vectors.

Based on the simplified neural language model of Bengio et al. [7], Mikolov et al. [23, 25] presented two other techniques to build a words representations model. In their work, two models are proposed: the continuous bag-of-words (CBOW) model [23], and the skip-gram (SKIP-G) model [25]. The CBOW model, predicts a pivot word according to the context by using a window of contextual words around it. Given a sequence of words \(S=w_{1} , w_{2},. . . , w_{i}\), the CBOW model learns to predict all words \(w_{k}\) from their surrounding words \((w_{k-l}, . . . , w_{k-1}, w_{k+1} , . . . , w_{k+l} )\). The second model, SKIP-G, predicts surrounding words of the current pivot word \(w_{k}\) [25].

Pennington et al. [33] proposed a Global Vectors (GloVe) model to representing words in vector space. GloVe model builds a co-occurrence matrix M using the global statistics of word-word co-occurrence. Afterwards, the matrix M is used to estimate the probability of word \(w_{i}\) to appear in the context of another word \(w_{j}\), this probability \(P(i{\slash }j)\) represents the relationship between words.

In a comparative study conducted by Mikolov et al. [23] all the methods [9, 23, 25, 26, 28, 41] have been evaluated and compared, and they show that CBOW [23] and SKIP-G [25] models are significantly faster to train with better accuracy. For this reason, we have used the CBOW word representations for Arabic model, proposed by Zahran et al. [45]. In order to train this model, they have used a large collection from different sources counting more than 5.8 billion wordsFootnote 2.

In the Arabic CBOW model [45] each word w is represented by a vector v of d-dimension. The similarity between two words \(w_{i}\) and \(w_{j}\) (e.g. synonyms, singular, plural, feminization or closely related semantically) is obtained by comparing their vector representations \(v_{i}\) and \(v_{j}\) respectively [23]. This similarity can be evaluated using the Cosine similarity, Euclidean distance, Manhattan distance or any other similarity measure functions. For example, let “” (university), “” (evening) and “” (faculty) be three words. The similarity between them is measured by computing the cosine similarity between their vector as follows:

figure d

That means that, the words “” (faculty) and “” (university) are semantically closer than “” (evening) and “” (university). In the following, we exploit this property to measure the semantic similarity at sentence level.

3 Proposed Methods

In this section, we present our two proposed methods for Arabic-English cross-language sentence similarity. These methods use Machine Translation-Based Model, followed by a monolingual semantic similarity analysis based on word embedding. They consist of three steps, including translation, preprocessing and similarity score attribution. First, MT is used to translate English sentences into Arabic. Afterwards, our two word embedding-based methods are employed to measure the semantic similarity of Arabic sentences. In the first one, we propose to use the words alignment technique proposed by Sultan et al. [39] with the words weighting methods of Nagoudi and Schwab [30], we call this method Weighting Aligned Words (W-AW). The second generate a Bag-of-Words for the aligned words to construct a vector representation of each sentence. Then the similarity is obtained by comparing the two sentence vectors, we name this method Bag-of-Words Alignment (BoW-A). Figure 2 gives an overview of the proposed methods.

Fig. 2.
figure 2

Overview of the proposed methods

Let \(S_{E}=w_{e_ {1}} , w_{e_ {2}},. . . , w_{e_ {i}}\) and \(S_{A}=w_{a_ {1}} , w_{a_ {2}},. . . , w_{a_ {j}}\) be an English and Arabic sentence, and their word vectors are \((v_{e_ {1}} , v_{e_ {2}},. . ., v_{e_ {i}})\) and \((v_{a_ {1}} , v_{a_ {2}},. . . , v_{a_ {j}})\) respectively. The semantic similarity between \(S_{E}\) and \(S_{A}\) is computed in three steps: translation, preprocessing and a monolingual similarity score attribution.

  1. (1)

    Translation: in this step, we used Google Translate APIFootnote 3 to translate English sentences into Arabic language, we denote the translated sentence \(S_{E'}\). By this translation, the problem is reduced into a mono-lingual semantic similarity one.

  2. (2)

    Preprocessing: in order to normalize the sentences for the similarity evaluation step, a set of preprocessing are performed:

    • Tokenization: input sentences are broken up into words;

    • Removing punctuation marks, diacritics, and non alphanumeric characters;

    • Normalizing to and to , as in the Arabic CBOW model [45];

    • Replacing final followed by by

    At this point we should mention that we will not remove the stop words because they can affect the similarity score, For example: \(S_{E}=\)“Joseph went to university” and \(S_{A} \) = “” (Joseph does not go to university). If we remove the words , and to as a stop words, both sentences become similar, whereas they have contradictory meanings.

  3. (3)

    Sentences similarity: we propose two methods for measuring the semantic similarity between \(S_{E'}\) and \(S_{A}\): Weighting Aligned Words Method (W-AW) and Bag-of-Words Alignment Method (BoW-A). In the following, we develop our proposed methods, and we provide for each one how the semantic similarity is measured.

3.1 Weighting Aligned Words Method (W-AW)

A simple way to compare the translated sentence \(S_{E'}\) and the Arabic one \(S_{A}\) is by summing their words vectors [30]. Then, the similarity is obtained by calculating the Cosine similarity Cos(\(V_{E'}, V_{A}\)), where:

For example, let \(S_{E}\) and \(S_{A}\) be two sentences:

\(S_{E}\,{=}\) “Joseph went to college”.

\(S_{A}\,{=}\) “” (Joseph goes quickly to university).

  • Step 1: Translation

    In this step Google Translate API is used to translate the English sentence \(S_{E}\) into Arabic \(S_{E'}\,{=}\) “”.

  • Step 2: Sum of the word vectors

    figure u
  • Step 3: Similarity Score

    The similarity between \(S_{E'}\) and \(S_{A}\) is obtained by calculating the cosine similarity between the sentence vectors \(V_{E'}\) and \(V_{A}\) as follows:

    $$ Sim(S_{E},S_{A})=Sim(S_{E'},S_{A})=Cos( V_{E'}, V_{A})=0.71 $$

In order to improve the similarity results, we have used the words alignment method presented by Sultan et al. [39], with the difference that we align the words based on their semantic similarity in the word embedding model, and not in a dictionary. We assume also that all words don’t have the same importance for the meaning of the sentences. For that, we use three weighting functions (idf, pos and idf-pos) proposed by Nagoudi and Schwab in [30] for weighting the aligned words. Finally, the similarity between \(S_{E'}\) and \(S_{A}\) is calculated as follows:

$$\begin{aligned} Sim(S_{E'},S_{A})=\frac{1}{2}\left( \frac{\sum _{w \in S_{E'}}^{} WT(w)*BM(w, S_{A})}{ \sum _{w\in S_{E'}}^{}WT(w)}+\frac{\sum _{w \in S_{A}}^{} WT(w)*BM(w, S_{E'})}{ \sum _{w\in S_{A}}^{}WT(w)}\right) \end{aligned}$$
(1)

where WT(w) is the function which return the weight of the word w. WT uses three weighting methods: idf, pos and a mix of both. The \(BM(w,S_{k})\) function represent the Best Match score between w and all words in the sentence \(S_{k}\). Therefore, BM function aligns words based on their semantic similarity included in the word embedding model. The function BM is defined as:

$$\begin{aligned} BM(w,S_{k})=Max\{Cos(v, v_{k} ),\ w_{k}\in S_{k}\} \end{aligned}$$
(2)

For example, let us continue with the same example above, the similarity between \(S_{E'}\) and \(S_{A}\) is obtained in four steps as follows:

  • Step 1: POS Tagging

    Firstly, the POS tagger of Gahbiche-Braham et al. [13] is used to predict the part-of-speech tag of each word \(w_{k}\) in \(S_{k}\).

    $$ \left\{ \begin{array}{l} Pos\_tag( S_{E'}) = verb\ noun\_prop\ noun \\ Pos\_tag( S_{A})= noun\_prop\ verb\ adj\ noun \end{array} \right. $$
  • Step 2: IDF & POS Weighting

    For weighting the descriptive aligned words, we retrieve for each word \(w_{k}\) in the \(S_{k}\) its IDF weight \(idf (w_{k})\), we also use the POS weights proposed in [30].

  • Step 3: Words Alignment

    In this step, we align words that have similar meaning in both sentences. For that, we compute the similarity between each word in \(S_{E'}\) and the semantically closest word in \(S_{A}\) by using the BM function, e.g. BM(, \(S_{E'})= Max\{Cos(\) , \(v_{k}), \ w_{k}\in S_{A}\}\) \(=Cos(v(\) ), v( \()) =0.85\).

  • Step 4: Calculate the similarity

    The similarity between \(S_{E'}\) and \(S_{A}\) is obtained by using the formula (1), which gives us: \(Sim(S_{E'},S_{A})=0.82\).

3.2 Bag-of-Words Alignment Method (BoW-A)

Among the advantages of word embedding is that it allows to retrieve a list of words that are used in the same contexts with respect to a given word w [14]. We named this list of words the k-closest words to w. For example, Table 1 shows the 10-closest words of and in the Arabic CBOW model.

Table 1. 10-closest words of and

We used this property to evaluate the degree of semantic similarity between \(S_{E'}\) and \(S_{A}\), we first proceeded to construct a representation vector RV for each sentence. Let \(RV_{E'}\) and \(RV_{A}\) be the representation vectors of \(S_{E'}\) and \(S_{A}\) respectively, the size of each vector is the number of words in its corresponding sentence. The value of an entry in the representation vector, is determined as follows:

  1. 1.

    For each word w we retrieve its aligned word \(w'\) in the other sentence by using BM function defined by formula (2).

  2. 2.

    We use the embedding model to construct for both w and \(w'\) their Bag-of-Words \(BoW_{w}\) and \(BoW_{w'}\). The \(BoW_{w}\) (\(BoW_{w'}\)) contains the k-closest words to w (\(w'\)) in the embedding model.

  3. 3.

    We compute the Jaccard similarity between \(BoW_{w}\) and \(BoW_{w'}\):

    $$ Jacc(BoW_{w}, BoW_{w'})=\frac{BoW_{w} \cap BoW_{w'}}{BoW_{w} \cup BoW_{w'}} $$
  4. 4.

    The value of the entry RV[w] is set to \(Jacc(BoW_{w}, BoW_{w'})\).

  5. 5.

    This process is applied for all words in both sentences to build \(RV_{E'}\) and \(RV_{A}\).

  6. 6.

    Finally, the similarity between \(S_{E'}\) and \(S_{A}\) is obtained by:

    $$\begin{aligned} Sim(S_{E'},S_{A})=\frac{1}{2}\left( \frac{\sum _{w \in S_{E'}}^{} WT(w)* RV[w]}{ \sum _{w\in S_{E'}}^{}WT(w)}+\frac{\sum _{w \in S_{A}}^{} WT(w)*RV[w']}{ \sum _{w\in S_{A}}^{}WT(w)}\right) \end{aligned}$$
    (3)

4 Experiments and Results

In order to evaluate our systems and monitor their performances, we have used four datasets drawn from the STS shared task SemEval-2017 (Task1: STS Cross-lingual Arabic-English)Footnote 4 [8], with a total of 2412 pairs of sentences. The sentence pairs have been manually labeled by five annotators, and the similarity score is the mean of the five annotators’ judgments. This score is a float number between “0” (indicating that the meaning of sentences are completely independent) to “5” (indicating meaning equivalence). More information about the datasets used is listed in Table 2.

Table 2. Arabic-English evaluation sets.

4.1 Experimental Results

We investigated the performance of both Weighting Aligned Words (W-AW) and Alignment Bag-of-Words (A-BoW) systems with three weighting functions: IDF, POS and mix of both. In addition, for the A-BoW method, we have used four different values of k to generate the 5-closest, 10-closest, 15-closest and 20-closest words. Afterwards, in order to evaluate the accuracy of each method, we calculate the Pearson correlation between our assigned semantic similarity scores and human judgments on the SemEval STS task datasets. Table 3 reports the results of the proposed methods.

Table 3. Our methods vs. human judgments

These results indicate that when the IDF weighting method is used the mean correlation rate does not fall below \(70\%\) in all tested methods. When applying the POS and mixed weighting, the correlation rate of IDF weighting is outperformed in both methods A-AW and A-BoW with a mean of \(+2.35\%\) and \(+3.91\%\) respectively. Interestingly, increasing the parameter k to generate the k-closest words in the A-BoW method, leads each time to an enhancement in the correlation rate. For instance, the use of 15-closest words outperforms the 5-closest system by \(+2.01\%\) of correlation in average. However, when k is raised to 20, the mean correlation rate gets a bit lower. This is due to the rise of the number of words with different meaning in the BoW.

From the above results, we can see that the estimated similarity provided by our approaches is fairly consistent with human judgments. However, the correlation is not good enough when two sentences share nearly the same words, but with a totally different meaning, for example: “” and (Saad reads a book about Omar Ibn Al-Khattab)(Saad reads a book for Omar Ibn Al-Khattab). In this example, the sentences share the same vectors, POS and IDF weights. This fact leads to a high correlation score, which is not the case. This issue is left for future work.

4.2 Comparison with SemEval-2017 Winners

We compared our optimal results with the three best systems proposed in SemEval-2017 Arabic-English cross-lingual evaluation task [8] (ECNU [40], BIT [44] and HCTI [38]) and the baseline system [8]. In this evaluation, ECNU obtained the best performance with a correlation score of \(74.93\%\), followed by BIT and HCTI with \(70.07\%\) and \(68.36\%\) respectively. Table 4 shows a comparison of our best results with those obtained by the three systems were tested on the STS Evaluation DataFootnote 5.

Table 4. Comparison of the correlation results with three best systems in SemEval-2017.

The observed results indicate that our mixed weighted method with \(k=15\) is the best performing method with a correlation rate of \(77.39\%\). The W-BoW-IDF-POS (\(k=15\)) method yields a gain of \(+9.03\%\), \(+7.32\%\) and \(+2.46\%\) on the correlation rate compared with ECNU, BIT and HCTI respectively.

5 Conclusion and Future Work

In this paper, we have presented two methods for measuring the semantic relations between Arabic-English cross-language sentences using Machine Translation (MT) and word embedding representations. The main idea is based on the usage of semantic properties of words included in the word-embedding model. In order to make further progress in the analysis of the semantic sentence similarity, we have used a combination of words alignment, IDF and POS weighting to support the identification of words that are most descriptive in each sentence. Additionally, we evaluated our proposals on the four datasets of the STS shared task SemEval-2017. In the experiments we have shown how the Bag-of-words method clearly enhanced the correlation results. The performance of our proposed methods was confirmed through the Pearson correlation between our assigned semantic similarity scores and human judgments. In fact, we reached the best correlation rate compared to all the participating systems in STS Arabic-English cross-language subtask of SemEval-2017. As future work, we are going to combine these methods with those of other classical techniques in NLP field, including word sense disambiguation, linguistic resources and document fingerprint in order to make more improvement in the cross-language plagiarism detection.