Based on that, we calculate the similarity score of n-grams x and y in two languages respectively with the marginal-based scoring method (Conneau et al., 2017;Artetxe and Schwenk, 2018).
given the crosslingual embeddings of x and y, denoted as e x and e y , the similarity score is calculated as: cos(e y , e z ) 2n ) (1) where margin(a, b) is a marginal scoring function and NN n (x) denotes x's k-nearest neighbors in the other language.