{'fraction_non_alphanumeric': 0.03689338320173616, 'fraction_numerical': 0.0233642702128642, 'mean_word_length': 4.800214247455812, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
SuperSim: a test set for word similarity and relatedness in Swedish

Language models are notoriously difficult to evaluate. We release SuperSim, a large-scale similarity and relatedness test set for Swedish built with expert human judgements. The test set is composed of 1,360 word-pairs independently judged for both relatedness and similarity by five annotators. We evaluate three different models (Word2Vec, fastText, and GloVe) trained on two separate Swedish datasets, namely the Swedish Gigaword corpus and a Swedish Wikipedia dump, to provide a baseline for future comparison. We will release the fully annotated test set, code, models, and data.


Introduction
It is said that a cup and coffee are not very similar while car and train are much more so given that they share multiple similar features. Instead, cup and coffee are highly related, as we typically enjoy the one in the other. Of course, an immediate question that arises is whether we have words that are similar but not related? Existing similarity datasets have tended to rate words for their similarity, relatedness, or a mixture of both, but not either or. However, without both kind of information, we cannot know if words are related but not similar, or similar but not related.
The most common motivation for using word similarity datasets, such as SimLex-999 (Hill et al., 2015) and WordSim353 (Finkelstein et al., 2001), is for use as a quality check for word embedding models. The aim of most embedding models is to capture a word's semantic relationships, such that words that are similar in meaning are placed close in the semantic space; foods with other foods, technical terms together and separated from the musical instruments, to give an example. However, the optimal performance of such a semantic space is judged by whether or not one wishes to capture similarity of words, or relatedness. It seems obvious that presenting cup as a query reformulation for coffee in information retrieval seems off, while presenting lamborghini when searching for ferrari can be completely acceptable. Inversely, in places where relatedness is needed, offering a cup when one asks for a coffee is correct.
While the first word similarity datasets appeared for English, in the past few years we have seen datasets for a range of different languages (see Section 2). For Swedish, there exists one automatically-created resource based on an association lexicon by Fallgren et al. (2016). However, there are to date no test sets that are (1) expertly-annotated, (2) comparable to other international test sets, and (3) annotated for both relatedness and similarity. And because we cannot know which motivation lies behind creating a vector space, and because both relatedness and similarity seem equally valid, we have opted to create SuperSim. The SuperSim test set is a largerscale similarity and relatedness set for Swedish, consisting of 1,301 words and 1,360 pairs rated by 5 expert annotators. The pairs are based on SimLex-999 and WordSim353, and can be used to assess the performance of word embedding models, but also answer questions as to whether words are likely to be similar but not related.

Related Work
Several works aim to provide test sets to assess the quality of word embedding models. Most of them tackle English (Rubenstein and Goodenough, 1965;Miller and Charles, 1991;Agirre et al., 2009;Bruni et al., 2012;Hill et al., 2015). Russian, Italian and German are cov-ered by Leviant and Reichart (2015) who translated the pairs in WordSim353 and SimLex-999, and asked crowdworkers to judge them on a 0-10 scale. The SemEval-2017 Task 2 on Multilingual and Cross-lingual Semantic Word Similarity (Camacho-Collados et al., 2017) provides pairs in 5 languages: English, Farsi, German, Italian and Spanish. Ercan and Yıldız (2018) provide 500 word pairs in Turkish annotated by 12 humans for both similarity and relatedness on a scale ranging from 0 to 10, while Finnish is covered in Venekoski and Vankka (2017). More recently, Multi-SimLex (Vulić et al., 2020) (Borin et al., 2013), a large lexical-semantic resource that differs much from Wordnet (Fellbaum, 1998) insofar as it organises words mainly with the 'association' relation. The authors use SALDO's 'supersenses' to adapt 's QVEC-CCA intrinsic evaluation measure to Swedish. Still on evaluating Swedish language models, Adewumi et al. (2020b) propose an analogy test set built on the one proposed by Mikolov et al. (2013), and evaluate common architectures on downstream tasks. The same authors further compare these architectures on models trained on different datasets (namely the Swedish Gigaword corpus (Rødven-Eide et al., 2016) and the Swedish Wikipedia) by focusing on Swedish and utilising their analogy test set (Adewumi et al., 2020a). Finally, for Swedish, SwedishGLUE/SuperLim 3 (Adesam et al., 2020) is currently being developed as a benchmark suite for language models in Swedish, somewhat mirroring English counterparts (Wang et al., 2018(Wang et al., , 2019. Whether similarity test sets actually allow to capture and evaluate lexical semantics is debatable Schnabel et al., 2015). Nonetheless, they have the advantage of providing a straightforward way of optimising word embeddings (through hyper-parameter search, at the risk of overfitting), or to be used more creatively in other tasks (Dubossarsky et al., 2019) where "quantifiable synonymy" is required. Finally, task-specific evaluation (as recommended by ) is, for languages other than English, more than often nonexistent -making test sets such as the one presented in this work a good alternative.
Our dataset differs from previous work in the sense that it provides expert judgments for Swedish for both relatedness and similarity, and hence comprises two separate sets of judgments, as done by skilled annotators. 4 A description of the procedure is available in Section 3.

Relatedness and Similarity
Our work heavily draws from Hill et al. (2015), who made a large distinction between relatedness and similarity. Indeed, the authors report that previous work such as Agirre et al. (2009) or Bruni et al. (2012 do not consider relatedness and similarity to be different. Words like coffee and cup, to reuse the example by Hill et al. (2015), are obviously related (one is used to drink the other, they can both be found in a kitchen, etc.) but at the same time dissimilar (one is (...usually) a liquid and the other is a solid, one is ingested and not the other, etc.).
All pairs in SuperSim are independently judged for similarity and relatedness. To explain the concept of similarity to annotators, we have reused the approach of Hill et al. (2015) who introduced it via the idea of synonymy, and in contrast to association: "In contrast, although the following word pairs are related, they are not very similar. The words represent entirely different types of things." They further give the example of "car / tyre." We use this definition embedded in the SimLex-999 guidelines to define relatedness according to the following: "In Task 2, we also ask that you rate the same word pairs for their relatedness. For this task, consider the inverse of similarity: car and tyre are related even if they are not synonyms. However, synonyms are also related."

Dataset description
While the WordSim353 pairs were chosen for use in information retrieval and to some extent mix similarity and relatedness, the original SimLex-999 pairs were chosen with more care. They were meant to measure the ability of different models to capture similarity as opposed to association, contain words from different part-of-speech (nouns, verbs, and adjectives), and represent different concreteness levels. Despite the risks of losing some intended effect in translation, we opted to base Su-perSim on both of these resources rather than start from scratch.

Methodology
We machine-translated all words in WordSim353 and SimLex-999 to Swedish. The translations were manually checked by a semanticist who is a native speaker of Swedish, holds an MA in linguistics, and is currently working towards obtaining a PhD in linguistics. The semanticist was presented a list of words, out of context, decoupled from the pairs they were parts of. Where needed, translations were corrected. Pairs were reconstructed according to the original datasets, except for the few cases where the translation process would create duplicates. In a few cases where one single translation was not obvious -i.e. cases where either Google Translate or the semanticist would output two (equally likely) possible Swedish translations for the same English word -, two pairs were constructed: one with each possible translation. For example, the presence of 'drug' led to pairs with both the läkemedel (a medical drug aimed at treating pathologies) and drog (a narcotic or stimulant substance, usually illicit) translations.
We selected 5 annotators (4F/1M) who are native speakers of Swedish and all have experience working with annotation tasks. One of the annotators was the same person who manually checked the correctness of the translations. The other 4 annotators can be described as follows: • holds an MA in linguistics and has experience in lexicography, • holds an MA in linguistics, • holds BAs in linguistics and Spanish and is studying for an MSc in language technology, • holds a BA in linguistics and has extensive work experience with different language-related tasks such as translation and NLP (on top of annotation).
Annotators were each given (i) the original SimLex-999 annotation instructions containing examples illustrating the difference between relatedness and similarity; (ii) one file for the relatedness scores; and (iii) one file for the similarity scores. They were instructed to complete the annotation for similarity before moving on to relatedness, and complied. The annotation took place, and was monitored, on Google Sheets. Annotators did not have access to each others' sheets, nor were they aware of who the other annotators were.
To allow for a finer granularity as well as to echo previous work, annotators were tasked with assigning scores on a 0-10 scale, rather than 1-6 as in SimLex-999. Unlike the procedure for Simlex, where sliders were given (and hence the annotators could choose real values), our annotators assigned discrete values between 0-10. This procedure resulted in pairs with the same score, and thus many rank ties.

SuperSim stats
The entire SuperSim consists of 1,360 pairs. Out of these, 351 pairs stem from WordSim353 and 997 pairs from SimLex-999. Pairs where both words translate into one in Swedish are removed from the SimLex-999 and WordSim353 subsets, thus resulting in fewer pairs than the original datasets: for example, 'engine' and 'motor' are both translated as motor and therefore the 'motor' -'engine' pair is removed. The SuperSim set consists of both sets, as well as of a set of additional pairs where multiple translations were used (see the läkemedel and drog example above). The full set of 1,360 pairs is annotated for both similarity and relatedness separately, resulting in a total of 2 * 1,360 gold scores, and thus 13,600 individual judgments. An example of relatedness judgments for two pairs is available in table form in Table 1.
We release two tab-separated files (one for relatedness, one for similarity) containing judgments from all annotators as well as the mean gold score. We additionally release all baseline models, code, and pre-processed data where permissible. The data is freely available for download at https: //zenodo.org/record/4660084.

Intra-rater agreement
For quality control, annotation files contained a total of 69 randomly sampled duplicate pairs, in addition to the 1,360 true pairs. 5 These duplicates allowed us to calculate every annotator's consistency, and to judge how difficult each task was in practice. Table 2 illustrates the consistency of every annotator in the similarity and relatedness tasks for our 69 control pairs. 'Disagreement' indicates two different values for any given pair and 'hard disagreement' two values with an absolute difference higher than 2 (on the scale of 0-10). On average, the hard disagreements differed by 4.3 points for relatedness, and by 3.0 for similarity, and there were more disagreements (both kinds) for relatedness, indicating that for humans, relatedness is the harder task. In addition, we indicate the computed self-agreement score (Krippendorff's alpha, Krippendorff 2018) for every annotator for both tasks. Despite annotators disagreeing somewhat with themselves, Krippendorff's alpha indicates they annotated word pairs consistently.
Out of the 69 control pairs, 4 were inconsistently annotated by four annotators for similarity, while 12 pairs were inconsistently annotated by four or more annotators for relatedness: 3 by all five annotators, and 9 by four. The three "hardest" pairs to annotate for relatedness are lycklig-arg 'happy-angry,' sommarnatur 'summer-nature,' tillkännagivande-varning 'announcement-warning.'

Inter-rater agreement
Following Hill et al. (2015), we use the average Spearman's ρ for measuring inter-rater agreement by taking the average of pairwise Spearman's ρ correlations between the ratings of all respondents. 6 For the original SimLex-999, over-5 SuperSim includes the values for the first seen annotation of a duplicate pair. To illustrate: if a control pair was annotated first to have a score of 3 and then to have a score of 6, the first score of 3 is kept. 6 We use the scipy.stats.mstats spearmanr (Virtanen et al., 2020) implementation with rank ties. all agreement was ρ = 0.67 as compared to Word-Sim353 where ρ = 0.61 using the same method. Spearman's ρ for our similarity rankings is 0.67. In addition, we have a Spearman's ρ for our relatedness rankings of 0.73. 7 It is unclear how the background of our annotators affects the quality of their annotation. In another semantic annotation study, although on historical data, Schlechtweg et al. (2018) show a larger agreement between annotators sharing a background in historical linguistics than between a historical linguist and a 'non-expert' native speaker. It is, however, fully possible that the linguistic expertise of the annotators affects the similarity and relatedness judgments in a negative way. We leave this investigation for further work.

Model evaluation
To provide a baseline for evaluation of embedding models on SuperSim, we trained three different models on two separate datasets.

Training data
We use two datasets. The largest of the two comprises the Swedish Culturomics Gigaword corpus (Rødven-Eide et al., 2016), which con-7 These results are opposing those of the disagreements which indicate that similarity is easier than relatedness for our annotators. We postulate that this can be due to the many rank ties we have in the similarity testset (where many pairs have 0 similarity). If we use the Pearson's ρ, we get values of ρ = 0.722 for relatedness, and ρ = 0.715 for similarity bringing the two tasks much closer.  tains a billion words 9 in Swedish from different sources including fiction, government, news, science, and social media. The second dataset is a recent Swedish Wikipedia dump with a total of 696,500,782 tokens. 10 While the Swedish Gigaword corpus contains text from the Swedish Wikipedia, Rødven-Eide et al. (2016) precise that about 150M tokens out of the 1G in Gigaword (14.9%) stem from the Swedish Wikipedia. In that respect, there is an overlap in terms of content in our baseline corpora. However, as the Swedish Wikipedia has grown extensively over the years and only a sub-part of it was used in in Rødven-Eide et al. (2016), the overlap is small and we thus have opted to also use the Gigaword corpus as it is substantially larger and contains other genres of text.
The Wikipedia dump was processed with a version of the Perl script released by Matt Mahoney 11 9 1,015,635,151 tokens in 59,736,642 sentences, to be precise.
It effectively only keeps what should be displayed in a web browser modified to account for specific non-ASCII characters (äåöé) and to transform digits to their Swedish written form (eg: 2 → två). 12 All baseline models are trained on lowercased tokens with default hyperparameters. 13

Results
An overview of the performance of the three baseline models is available in Table 3 and Table 4. In both tables we show model performance on similarity and relatedness judgments. We split the results into three sets, one for the entire Super-Sim, and two for its subsets: WordSim353 and SimLex-999. For each model and dataset, we present Spearman's rank correlation ρ between the ranking produced by the model compared to the gold ranking in each testset (relatedness and similarity). As fastText uses subword information to build vectors, it deals better with out-ofvocabulary words, hence the higher number of and removes tables but keeps image captions, while links are converted to normal text. Characters are lowercased. 12 '1', which can be either en or ett in Swedish, was replaced by 'ett' every time. 13 Except for sg = 1, min count = 100 and seed = 1830. To provide a partial reference point, Hill et al. (2015) report, for Word2Vec trained on English Wikipedia, ρ scores of 0.655 on WordSim353, and 0.414 on SimLex-999.
From the results in Table 3 and 4, it appears that fastText is the most impacted by the size of the training data, as its performance when trained on the smaller Wikipedia corpus is 'much' lower than on the larger Gigaword: 0.349 vs 0.550 for SuperSim relatedness and 0.365 vs 0.528 for Supersim similarity -both tasks where fastText actually performs best on Gigawords out of the three models tested. We find that all models perform better when trained on Gigaword as compared to Wikipedia. Contrary to results on the analogy task reported by Adewumi et al. (2020a), our experiments on SuperSim seem to confirm the usual trope that training on more data indeed leads to overall better embeddings, as the higher scores, in terms of absolute numbers, are all from models trained on the larger Gigaword corpus. Nonetheless, the discrepancy between our results and theirs might be due to a range of factors, including pre-processing and hyperparameter tuning (which we did not do). 14 Note that for similarity, Word2Vec trained on Gigaword performs slightly better on the translated SimLex-999 pairs (0.436) than Word2Vec does on English SimLex-999 (0.414) but substantially lower for WordSim (0.436 vs 0.655) (Hill et al., 2015). We make the comparison for Gigaword, rather than Wikipedia because of the com- 14 The effect of the benefits of more training data is confounded with the broader genre definitions in Gigaword that could be an indication of the advantage of including e.g., fiction and social media text in defining for example emotions. We leave a detailed investigation into this for future work. parable size, rather than the genre. This effect could be due to different pre-processing and model parameters used, but it could also be an effect of the multiple ties present in our test set. We do, however, consistently confirm the original conclusion: SimLex-999 seems harder for the models than WordSim353.
GloVe is the clear winner on the smaller Wikipedia dataset, where it outperforms the other two models for all test sets, and is on par with Word2Vec for Gigaword.
Overall, our results indicate that for the tested models relatedness is an easier task than similarity: every model -aside from fastText on Su-perSim -performs better (or equally well) on relatedness on the whole test set, as well as on its subparts, compared to similarity.

Conclusions and future work
In this paper, we presented SuperSim, a Swedish similarity and relatedness test set made of new judgments of the translated pairs of both SimLex-999 and WordSim353. All pairs have been rated by five expert annotators, independently for both similarity and relatedness. Our inter-annotator agreements mimic those of the original test sets, but also indicate that similarity is an easier task to rate than relatedness, while our intra-rater agreements on 69 control pairs indicate that the annotation is reasonably consistent.
To provide a baseline for model performance, we trained three different models, namely Word2Vec, fastText and GloVe, on two separate Swedish datasets. The first comprises a general purpose dataset, namely the The Swedish Culturomics Gigaword Corpus with different genres of text spanning 1950-2015. The second comprises a recent Swedish Wikipedia dump. On the Gigaword corpus, we find that fastText is best at capturing both relatedness and similarity while for Wikipedia, GloVe performs the best.
Finally, to answer the question posed in the introduction: it is common to have words that are highly related, but not similar. To give a few examples, these are pairs with relatedness 10 and similarity 0: bil-motorväg 'carhighway,' datum-kalender 'date-calendar,' ordordbok 'word-dictionary,' skola-betyg 'schoolgrade,' and tennis-racket 'tennis-racket.' The opposite however, does not hold. Only four pairs have a similarity score higher than the relatedness score, and in all cases the difference is smaller than 0.6: bli-verka 'become-seem,' rörcigarr 'pipe-cigarr,' ståltråd-sladd 'wire-cord,' tillägna sig-skaffa sig 'get-acquire. ' For future work, the SuperSim testset can be improved both in terms of added annotations (more annotators), and with respect to more fine-grained judgements (real values in contrast to discrete ones currently used) to reduce the number of rank ties.