---
title: "Testing word embeddings for Polish — Mykowiecka 2017"
description: "This study tests how training data and Polish inflection affect which synonyms and analogies word embeddings can recover."
canonical: "https://research.elamur.ai/free/en/papers/mykowiecka-2017-testing-word-embeddings-polish/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/mykowiecka-2017-testing-word-embeddings-polish/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2017](https://md.research.elamur.ai/free/en/papers/2017/) / Testing word embeddings for Polish

# Testing word embeddings for Polish

Paper · 2017 · Agnieszka Mykowiecka, Małgorzata Marciniak and Piotr Rychlik

**Authors:** Agnieszka Mykowiecka, [Małgorzata Marciniak](https://md.research.elamur.ai/free/en/authors/malgorzata-marciniak/) and Piotr Rychlik · **Year:** 2017 · **Venue:** Cognitive Studies | Études cognitives · **Licence:** [CC BY (OpenAlex best open-access location)](https://creativecommons.org/licenses/by/4.0/)

Cognitive Studies | Études cognitives · [licence](https://creativecommons.org/licenses/by/4.0/)

- [PDF](https://ispan.waw.pl/journals/index.php/cs-ec/article/download/cs.1468/3064)
- [DOI 10.11649/cs.1468](https://doi.org/10.11649/cs.1468)

## Summary

Polish words change shape to express grammatical information. A system that learns from text can give each written form its own representation, or it can gather the different forms under a dictionary headword. That choice changes what the system has a chance to learn. A written form preserves information such as number, case and gender, while a headword brings together evidence that would otherwise be spread across forms. The authors test how this choice affects [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/), which represent words as lists of numbers learned from the contexts in which they occur.

The study trains embeddings on Polish Wikipedia, the National Corpus of Polish, and the combined collection. It compares word2vec’s continuous bag of words approach, which learns by predicting a word from its surroundings, with skip-gram, which learns by predicting surrounding words from a given word. The authors also vary the length of the vectors, the training procedure, and which words the training data retains. They assess the resulting representations by asking whether synonyms appear near a queried word and whether an operation on vectors can recover the missing word in an analogy.

The strongest settings depend on the test. For synonym retrieval, an embedding trained on written forms from the combined corpus, using skip-gram and dropping infrequent forms, attained a reported score of 0.33 on the smaller adjective set. Written forms gave the strongest synonym results overall, while continuous bag of words had a clear advantage within the headword-based comparisons. Headwords were more effective for the general analogy set. Its highest-scoring configuration used continuous bag of words with selected parts of speech from the National Corpus of Polish. Geographic and gender relations were among the easier analogies, with town–river pairs an exception to the geographic pattern.

More text and longer vectors sometimes helped, and the effects depended on what was fed into training. Removing rare forms helped several form-based synonym settings, while the corresponding change left some headword scores about the same and reduced others. Previously released Wikipedia embeddings also performed well against several alternatives, leaving open how much of their advantage came from text preparation. The tests establish which settings recovered the benchmark answers under the paper’s ranking rules. A high rank can also reflect an opposite meaning, a grammatical resemblance or an association with the same subject, so recovering synonyms from these lists still requires a way to tell those relationships apart.

## Deep dive: Testing word embeddings for Polish

This study tests how training data and Polish inflection affect which synonyms and analogies word embeddings can recover. · about 32 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### What word use can reveal

[Distributional semantics](https://md.research.elamur.ai/free/en/concepts/distributional-semantics/) starts from the idea that the places a word occurs provide evidence about its meaning. If words routinely appear with comparable neighbors, their patterns of use can be represented as similar. The authors trace this idea to work by Wittgenstein, Firth and Harris. Harris’s account is especially close to a computational procedure. Collect the environments in which a linguistic element appears, and its distribution becomes something that can be studied by inspecting those environments together.

A corpus makes this approach practical. It supplies occurrences from which a researcher can collect context information. The resulting representation can reflect whether words repeatedly share surroundings, while the choice of texts determines which uses are observed in the first place. The paper emphasizes both the amount of text and its fit to the domain and genre of interest. A large body of text gives more opportunities to see recurring patterns. The value of those opportunities still depends on which usages the collection contains.

The authors place their experiments in a line of work that was gaining practical traction by the late 1990s, as corpora and computing resources became more accessible. The applications they describe include matching human judgments of similarity, finding synonyms, and using distributional evidence for [word sense disambiguation](https://md.research.elamur.ai/free/en/concepts/word-sense-disambiguation/), where the aim is to identify the meaning a word has in a particular occurrence. They also mention experiments on semantic priming and later applications such as word clustering and metaphor recognition. These applications put different demands on the representation. A device for grouping words by subject can take advantage of associations that would complicate an attempt to identify synonyms. [An Enhanced Lesk Word Sense Disambiguation Algorithm](https://md.research.elamur.ai/free/en/papers/basile-2014-enhanced-lesk-word-sense-disambiguation/)

The distinction between similarity and broader relatedness runs through the paper. An opposite can occur in many of the same surroundings as the word it contrasts with. Terms for animals can be related because they name members of the same category. A drink and its usual container can turn up together because they participate in the same activity. A good distributional representation can plausibly place all these pairings close together. The question for evaluation is which kind of relationship a particular test rewards. The authors adopt a broad understanding of relatedness consistent with earlier work on evaluating lexical connections. [Evaluating WordNet-based Measures of Lexical Semantic Relatedness](https://md.research.elamur.ai/free/en/papers/budanitsky-2006-evaluating-wordnet-based-measures-lexical/)

#### From context counts to prediction

One route from a corpus to a numerical representation is to make a matrix with words as rows and contexts as columns. An entry records how often a word occurs in a context. The row then describes that word by its distribution across contexts. A weighting scheme can give greater influence to a shared context that is unusually informative. The paper illustrates the intuition with the difference between sharing a context involving roaring and sharing one involving running. The latter is more commonplace, so sharing it may tell the reader less about what the words have in common.

The paper discusses [TF-IDF](https://md.research.elamur.ai/free/en/concepts/tf-idf/) as an example for term–document matrices. The weight combines a term’s frequency with a factor reflecting how widely it occurs across documents. It also describes pointwise mutual information, which expresses how surprising a co-occurrence is relative to the frequencies of its components. A further step can reduce the dimensionality of a large matrix, keeping a smaller set of dimensions that approximates the information in the original. The paper discusses singular value decomposition in connection with latent semantic analysis and indexing. These methods supply context for understanding what a learned vector is intended to capture. [Word Association Norms, Mutual Information, and Lexicography](https://md.research.elamur.ai/free/en/papers/church-1990-word-association-norms-mutual-information/) · [From Frequency to Meaning](https://md.research.elamur.ai/free/en/papers/turney-2010-frequency-meaning-vector-space-models/)

[GloVe](https://md.research.elamur.ai/free/en/concepts/glove/) offers another way to learn vectors from co-occurrence statistics. In the authors’ account, its starting point is that ratios of co-occurrence probabilities can carry information about meaning. Its training objective brings vector dot products into correspondence with logarithmic co-occurrence information. The experiments in this paper instead follow the predictive approach introduced through word2vec. An occurrence in the corpus supplies an example in which either the surrounding words or the word at the center has to be predicted. The learned vectors are parameters that help with that prediction. [GloVe: Global Vectors for Word Representation](https://md.research.elamur.ai/free/en/papers/pennington-2014-glove-global-vectors-word-representation/) · [Distributed Representations of Words and Phrases and their Compositionality](https://md.research.elamur.ai/free/en/papers/mikolov-2013-distributed-representations-words-phrases-their/)

These approaches share a dependence on the definition of a context. A researcher can collect nearby words, retain only selected grammatical categories, or use linguistic annotation to represent more structured relationships. The paper cites work on general frameworks for corpus-based semantics and on comparisons between count-based and predictive representations. Its own experiments narrow that design space to settings available through word2vec and choices the authors can make in preparing Polish text. [Distributional Memory](https://md.research.elamur.ai/free/en/papers/baroni-2010-distributional-memory-general-framework-corpus/) · [A systematic comparison of context-counting and context-predicting vectors](https://md.research.elamur.ai/free/en/papers/baroni-2014-don-t-count-predict-systematic/)

#### Why the unit matters in Polish

A [word form](https://md.research.elamur.ai/free/en/concepts/word-form/) is the spelling that appears in a text. A [lemma](https://md.research.elamur.ai/free/en/concepts/lemma/) is the headword used to bring related inflected forms together. For a language with substantial inflection, this distinction changes the inventory of things that receive vectors. Training on forms can keep separate evidence about spellings used in different grammatical environments. Training on lemmas gathers occurrences under a common entry, so that information learned from several forms can influence the same vector.

The authors use grammatical agreement to explain why even near synonyms can accumulate different context evidence. Polish nouns have grammatical gender, and adjectives modifying them agree with that gender. Gender can also be visible in a past-tense verb when the subject is in the third person. A sentence about a school being closed and a sentence about a station being closed convey a similar situation, but corresponding forms in the sentences can differ because the nouns have different genders. The neighbors of a noun can therefore reflect both its meaning and the grammatical forms with which it combines. [Morphology](https://md.research.elamur.ai/free/en/concepts/morphology/)

[Lemmatization](https://md.research.elamur.ai/free/en/concepts/lemmatization/) can pool some of this evidence, but it first needs to decide which entry an occurrence belongs to. The paper gives the example of mają, the ordinary form for ‘they have’, which a tagger can assign to maić, a verb about adorning with greenery. The ambiguity matters because the respective evidence goes to different entries. A form-based input can retain the original spelling in such cases. A lemma-based input depends on the tagger’s interpretation, which can simplify genuine variation while introducing occasional new errors.

The paper describes several resources that already existed for Polish. Supermatrix could build a distributional representation from specified features, reduce its dimensionality and calculate similarities. Kędzia and colleagues released Polish skip-gram vectors with 100 dimensions. Rogalski and Szczepaniak reimplemented the predictive method and released embeddings trained on Polish Wikipedia. The authors also mention earlier work on synonyms and lexical variants and a presentation on embeddings for Polish internet text. The study asks how a range of training choices behaves across common tests for the same language, where the unit of representation deserves particular attention.

#### What an evaluation can isolate

The authors distinguish intrinsic evaluation, which checks the representations directly, from extrinsic evaluation, which measures performance when representations are used inside an application. An application score can reflect the quality of many interacting parts. If a synonym-solving system filters candidates or uses an additional rule to select its answer, its score says something about the full system. A direct evaluation can ask whether the information is already accessible through distances or offsets in the embedding space. The authors cite prior work on intrinsic testing, including an approach based on aligning subspaces. [Evaluation of Word Vector Representations by Subspace Alignment](https://md.research.elamur.ai/free/en/papers/tsvetkov-2015-evaluation-word-vector-representations-subspace/)

The paper also recognizes the difficulty of designing a direct test. A synonym resource gives a usable reference list, but its entries follow the choices of its compilers. The choice of words and relations in an analogy set likewise determines what answers the test can recognize. Earlier critiques and proposals inform the authors’ decision to use resources they can obtain and to supplement the synonym task with analogies covering a variety of relations. That design gives them different observations about the same embeddings. One concerns the contents of a word’s neighborhood. The other concerns whether a relationship can be recovered by comparing the positions of several words. [How we BLESSed distributional semantic evaluation](https://md.research.elamur.ai/free/en/papers/baroni-2011-how-we-blessed-distributional-semantic/) · [Problems With Evaluation of Word Embeddings Using Word Similarity Tasks](https://md.research.elamur.ai/free/en/papers/faruqui-2016-problems-evaluation-word-embeddings-word/)

### The method, step by step

#### Preparing and representing the training text

The study’s procedure begins with a corpus and ends with ranked candidates. There is a separate ranking for each synonym query and each analogy question. The authors use the same underlying embeddings in both evaluations, which makes it possible for a training change to help a relation between pairs while having a different effect on an individual word’s neighbors.

From Polish corpora to synonym and analogy scores The steps in order.

The training sources are the full National Corpus of Polish, or NKJP, and a Polish Wikipedia dump from late 2016, or WikiPL. The authors use each collection independently and also join them. They obtained permission to use the full NKJP project data. The openly downloadable portion of NKJP is a smaller collection than the one used for training in these experiments.

Both corpora were annotated with Concraft-pl, a Polish morphosyntactic tagger based on constrained conditional random fields. In this pipeline, tagging provides a grammatical category and a lemma for a token in context. The extraction procedure removes punctuation tokens and tokens containing characters other than letters or digits. Words are converted to lower-case except where the lemma contains capital letters. The written-form input therefore consists of orthographic forms after this preparation, and the lemma input substitutes the tagger’s headwords.

The boundaries supplied by the tagger are part of the input. The paper’s example chciałbym, meaning ‘I would like’, is divided into the past-tense element chciał, the particle by and the agglutinate m. A hyphenated form such as biało-czerwony is also split, with the hyphen represented as a token before punctuation is removed. The contextual evidence collected by word2vec comes from the resulting token sequence. Decisions about what counts as a token can thus affect even a representation that uses written forms.

To study the effect of keeping a narrower set of words, the authors prepare restricted versions of the corpora. They retain nouns, adjectives, adverbs, verb forms and abbreviations. These correspond to 19 of the 34 parts of speech in the NKJP tagset. Other tokens are omitted from the training input, including elements such as by and m in the example that motivated the restriction. Removing a token can change which surviving words appear near each other, as well as which items get a vector. The paper also considers input that combines a lemma with the name of its part of speech, so a lexical entry can carry a grammatical distinction in its representation.

#### Training the vectors

The authors use the word2vec implementation in Gensim. In continuous bag of words, abbreviated CBOW, surrounding tokens provide the information for predicting the token at the center. In skip-gram, the central token supplies the information for predicting nearby tokens. The training signal thus goes in different directions. In both cases, the numbers later used as a word’s embedding are learned through these prediction tasks over occurrences in the corpus.

The paper varies the training procedure between hierarchical softmax and negative sampling. Hierarchical softmax organizes the prediction of a vocabulary item as choices along a hierarchy. Negative sampling trains with observed examples and sampled alternatives, using the alternatives to provide a contrasting signal. These options concern how the prediction is trained. The CBOW and skip-gram choice concerns which side of the prediction supplies the input.

The vector lengths tested are 100 and 300 dimensions. A dimension is a coordinate in the representation, and the coordinates are learned together. A 300-dimensional vector gives the procedure more coordinates with which to represent a word’s distribution. The paper reports a context size of 5, a default minimum occurrence count of 5, and 10 learning steps for the ordinary runs. Selected runs raise the training count to 100. Those settings vary the exposure to the training procedure and the capacity of the vectors independently where the authors compare the same configuration at different settings.

The authors also create selected versions with higher frequency cutoffs. For runs on the combined corpus, the cutoff is 50 occurrences. Selected Wikipedia runs use a cutoff of 30. Raising the minimum can exclude misspellings, fragments and other poorly supported entries, along with rare words that are legitimate vocabulary. The intervention is based on count, so all items below a given cutoff receive the same treatment regardless of why they are infrequent.

The paper’s configuration labels bundle these choices together. For example, `NWfa-3-s-n50`, the label used in the synonym results, refers to the combined NKJP and Wikipedia corpus, written forms without the part-of-speech restriction, 300 dimensions, skip-gram, negative sampling and the more stringent frequency cutoff. `Nlr-3-c-n`, the leading configuration on the main analogy set, uses NKJP, restricted lemmas, 300 dimensions, CBOW and negative sampling. A comparison of labels is informative about a particular training choice when the other relevant parts are held fixed. The two examples above differ on several of those parts.

#### Finding neighbors for the synonym test

The synonym evaluation begins with a test word and asks which other vocabulary entries have vectors closest to it. To rank candidates, the authors use cosine similarity. This quantity compares the directions of two vectors. Its computation divides their dot product by the product of their lengths.

```
cos(u, v) = (u · v) / (‖u‖ × ‖v‖)
```

Here `u` is the queried word’s vector and `v` is a candidate’s vector. `cos(u, v)` is their cosine similarity. The dot `·` denotes the dot product, obtained by multiplying corresponding coordinates and adding the products. The double bars `‖ ‖` give a vector’s length. The multiplication sign `×` combines the lengths, the slash `/` indicates division, the parentheses group the arguments and the numerator, and `=` states the equality. For the ranking, a larger cosine places a candidate ahead of one with a smaller cosine.

The paper compares each ranking with entries from synonym dictionaries. It merges the reference entries across meanings of a headword to match the level of representation in the embeddings. A lemma query can be compared directly with the lemma reference. For written forms, the authors use the Morfeusz 2 morphological analyser and generator to expand noun and adjective synonym entries and the selected query entries into their inflected forms. They leave verbs in the infinitive. Under the written-form protocol, a returned inflection of the query or one of its listed synonyms can count as a hit.

The test words are grouped by part of speech. The candidate rankings are left open across grammatical categories. A close neighbor from a different category can therefore take a place in the list and remain outside the reference matches. Similarly, the scoring procedure leaves room for related words that the chosen dictionary excludes. These details matter because the paper evaluates the raw ranking. Extra rules that decide whether a candidate is actually a synonym would change the object being measured.

The authors check hits in successive prefixes of the ranking, advancing by 10 candidates up to position 50. In a single query, precision at a given cutoff is the share of the inspected candidates that matches the reference under the rules for that representation.

```
P(k) = H(k) / k
```

`P(k)` is precision at cutoff `k`, and `H(k)` is the count of reference hits in the prefix ending at that cutoff. The parentheses indicate which cutoff the quantity depends on. The slash `/` divides the hit count by the number of candidates examined, and `=` defines the score. The paper also reports aggregate results using a reference-size denominator on the smaller dictionary sets. Those entries need to be read with that denominator in mind.

#### Turning an analogy into a ranking

The analogy task poses a different problem. It starts with a pair whose relation is shown by example and supplies the first word of a second pair. The intended completion bears the same relation to the new word. If the first pair connects a country to its capital, the next country is the prompt for another capital. If the first pair connects a season to a characteristic weather phenomenon, the intended completion relates the new season to its own characteristic phenomenon. The test expects a particular completion selected in advance.

The authors construct a Polish list informed by the English analogy questions supplied with word2vec and by additional relationships. An item contains both complete pairs in the reference data, with the last word withheld from the computation. The method treats the move from the first word to the second as a displacement in the vector space. It applies the same displacement to the new starting word and searches for entries near the resulting point.

```
t = (b⃗ + c⃗) − a⃗
```

The arrows mark vectors. `a⃗` represents the first word in the example pair, `b⃗` its counterpart, and `c⃗` the first word in the pair to be completed. The coordinates are added with `+` and subtracted with `−`. The parentheses group the addition, and `=` assigns the resulting vector to `t`, the point used to look up candidates. The vector `d⃗`, for the expected final word, supplies the target for evaluation. It plays no role in computing `t`.

The method checks the nearest 10 candidates for the expected word. An analogy can therefore count as recognized even if a different candidate is closer to the target point. The rationale is geometric. If the relationship in the first pair produces a displacement that also connects the words in the other pair, the intended completion should lie near the calculated position. A hit shows that the target appeared within the search depth under this particular operation.

Some analogy questions explicitly concern a change of inflection. The authors keep these in a separate set and apply it to written-form representations. A question can ask for the form corresponding to a particular case or number, or for the adjective corresponding to a change of degree. The relevant contrast can be expressed by the spelling itself, and pooling spellings under a lemma can collapse the very distinction that defines the question. Separating these items lets the main analogy comparison include both units of representation while the inflection test addresses the one that preserves the target forms.

### Experiments and results

#### Training collections and comparison systems

The corpora differ in the amount of training material available, and the grammatical restriction further changes that amount. The paper’s corpus inventory gives the full NKJP input as 1,482 million tokens, with 9.2 million distinct forms and 8.4 million distinct lemmas. Its restricted counterpart has 1,044 million tokens, with 8.2 million distinct forms and 7.4 million distinct lemmas. Polish Wikipedia supplies the other source and the material added to NKJP in the combined runs. Corpus size and the texts added are linked in this setup, which matters when interpreting comparisons involving the combined collection.

The study compares the authors’ own configurations and includes publicly available embeddings from Rogalski and Szczepaniak as external comparators. The paper calls these `pl-emb-c` and `pl-emb-s`. They use CBOW and skip-gram, respectively, with negative sampling, and both were trained on preprocessed Wikipedia text. Their preprocessing lower-cased the text, separated the digits of numbers and replaced them with words, and removed some non-text material. Their value as comparators comes from being independently prepared Polish vectors built from the same general source as the paper’s Wikipedia-only runs. The preprocessing differences mean the comparison also includes a change to the input.

The authors discuss the earlier vectors released by Kędzia and colleagues but leave them out of the experimental comparisons after encountering technical problems processing them. They also report having insufficient detail about the training corpus and the precise preparation procedure for that resource. The numeric comparisons therefore come from the authors’ training runs and the two Rogalski and Szczepaniak releases.

#### Synonym benchmarks and scoring

The authors draw on two Polish synonym dictionaries. The volunteer-edited resource lists more than 600,000 synonyms across almost 150,000 words. The other, compiled and maintained by Wojciech Broniarek, uses tighter inclusion criteria. The paper illustrates the difference with słowo, the Polish word for ‘word’. The volunteer resource supplies 74 synonyms for it, while Broniarek’s supplies 15. Both sources distinguish meanings and sometimes include multiword expressions. The evaluation pools the listed meanings because a test entry is represented by a vector for a form or lemma.

The queries consist of 50 frequent words in each of the noun, adjective and verb categories, chosen from an NKJP list of forms. The authors try to avoid ambiguity across grammatical categories and avoid nouns that can also be gerunds. This makes the category breakdown easier to interpret while leaving the candidate rankings unfiltered. The benchmark labels refer to the category and dictionary source. N1, A1 and V1 come from the volunteer resource and contain 6709 noun, 7186 adjective and 4107 verb entries in the paper’s test-set inventory. N2 and A2 come from Broniarek’s resource and contain 984 noun and 1326 adjective entries. The study reports no corresponding verb set from that source.

Polish WordNet was considered as a possible reference resource. According to the authors’ findings, over 15% of their chosen words received no synonyms from it. That coverage gap led them to use the two dictionaries for this test. The resulting scores reflect the resources they chose and the test entries those resources could supply.

The full ranking evaluation looks at 50 candidates per query. Across the 50 queries in a category, the number of examined positions can be 2500. The paper reports top-list precision with that denominator for N1, A1 and V1. For N2 and A2 it divides the observed matches by the size of the corresponding reference set, which is smaller. It calls the resulting entries precision in its results table, but the change of denominator makes the most direct comparisons those between configurations on the same test set. The authors leave aggregate recall unreported, citing the effect the short ranking has when the references are large.

The query trudny, meaning ‘difficult’, illustrates how the scoring works. The paper gives a cosine of 0.8114 for niełatwy, which is marked as a match. It also gives a cosine of 0.7364 for łatwy, meaning ‘easy’, which occupies a high position without counting as a match. The list thus contains evidence both of synonymy and of a strong relationship between opposites. Under the dictionary matching rule in the example, precision is 0.6 in the first 10 positions and 0.45 in the first 20. The authors found broadly similar patterns in the placement of matches across configurations and use the results through position 50 for the principal comparisons.

#### Where synonyms appeared most often

The best value reported in the selected synonym results is 0.33 on A2, the smaller adjective reference. It belongs to `NWfa-3-s-n50`, the combined-corpus skip-gram configuration trained on written forms with negative sampling and the higher minimum count. On the larger adjective benchmark A1, the same configuration records 0.30 using the ranking-position denominator. On N2 it records 0.32 with the reference-size denominator. The authors report a statistically significant advantage over other form-based configurations for these three sets.

Selected Polish embeddings on A2 adjective synonyms The frequency-filtered skip-gram embeddings trained on written forms lead the selected settings.

**The numbers**

| System or setting | matched share of the A2 reference |
| --- | --- |
| Combined lemmas, CBOW, higher cutoff | 0.11 |
| Combined forms, skip-gram, default cutoff | 0.14 |
| Published Wikipedia forms, skip-gram | 0.18 |
| Combined lemmas, CBOW, default cutoff | 0.19 |
| Combined forms, skip-gram, higher cutoff (this paper) | 0.33 |

The noun tests show why the choice of reference matters. On N1, the filtered combined-corpus form vectors record 0.25. The published skip-gram embeddings record 0.23, and the authors treat them as statistically comparable on that set. A Wikipedia-only lemma configuration with CBOW and hierarchical softmax also records 0.25 in the table. On N2, the paper’s Wikipedia-only form configuration with CBOW, negative sampling and the higher count cutoff records 0.31. The authors place it among the best on N2 even though it does appreciably worse on other sets. These are examples of a strong result on a smaller corpus for a particular reference.

The verb set has its own pattern. In the reported lemma-based comparisons on V1, the combined-corpus CBOW configuration with 300 dimensions and negative sampling records 0.21 both with the ordinary minimum count and with the higher cutoff. The comparable skip-gram run without the higher cutoff records 0.14. Among the written-form results, the ordinary combined-corpus skip-gram configuration with 300 dimensions and the CBOW configuration with 100 dimensions both record 0.18. The independently released skip-gram embeddings record 0.12, and the selected Wikipedia-only CBOW run with the higher cutoff records 0.13. The paper reports that these Wikipedia comparators are significantly weaker than the other form-based alternatives on that set.

The aggregate comparison favors written forms for synonym retrieval, with the strongest skip-gram configuration making a particularly strong showing on noun and adjective sets. Within lemma-based embeddings, CBOW gives more consistent and higher synonym scores than skip-gram. The results make the distinction between overall comparison and within-unit comparison important. The strongest form-based result and the preferred lemma-based architecture answer different experimental questions.

#### Recovering analogies

The main analogy benchmark has 200 items. Its categories include family relations, occupations, diminutives, animal offspring, food and materials, tools and actions, antonyms, and geographic relationships. The sizes vary considerably. The animal-sex category contains 20 questions, the country–capital category contains 11, and several categories have 1 question. Results for the whole set are counts of questions for which the expected answer is among the nearest 10 candidates.

Across this main set, lemma-based embeddings systematically outperform the corresponding form-based alternatives in the authors’ comparison. Embeddings trained with the combined corpus are often strong, while NKJP alone gives similar performance for some settings. The authors identify `Nlr-3-c-n`, the NKJP configuration with restricted lemmas, CBOW, 300 dimensions and negative sampling, as the best overall. They describe several strong settings as close enough to fall within the margin of error. The paper presents the overall counts in figures and characterizes the ranking and closeness of the leading settings in its discussion.

Wikipedia-only training generally gives weaker analogy results, although the external Wikipedia embeddings do better than several runs trained on the larger NKJP data. They also outperform most of the authors’ Wikipedia form configurations with 100 dimensions and some with 300. The paper identifies its filtered Wikipedia skip-gram configuration with negative sampling and 300 dimensions as reaching results similar to those of the external embeddings. The contrast points to a role for vocabulary filtering or other preprocessing, alongside the differences between independent training procedures.

The additional set has 20 grammatical analogy questions, tested on written forms. Its examples include case and number changes in nouns, changes of gender or degree in adjectives, and tense or number changes in verbs. The best runs return 19 correct answers out of 20 questions according to the paper’s retrieval criterion. Those results come from 300-dimensional embeddings trained either on NKJP or on the combined corpus. The result shows that the written-form representations can make many of the tested contrasts accessible, even though their overall performance is lower on the main analogy set.

The authors break down the leading configuration’s results by relation in the main benchmark. Geographic questions generally work well, apart from the town–river category. Relations involving gender also work well across categories such as family, animals and professions. The authors report no successful answers for the tested relations concerning the material an item is made from or the links between cultural places and their events. The variation across categories is visible, and the small number of questions in many categories limits the conclusions that can be drawn about the relations themselves.

### What the ablations show

#### Training on lemmas or written forms

The paper examines controlled changes to the training settings alongside broader comparisons between complete configurations. Changing the lexical unit is central to the study. The advantage for lemmas on general analogies is visible across counterpart configurations. A plausible interpretation is that pooling occurrences makes lexical relationships easier to recover from the offsets. A country or an occupation can appear in different forms, and a shared lemma collects those contexts in a single representation. The measured result establishes an advantage for lemma inputs on this particular test. The experiments leave the relative contribution of better pooling, differences in the candidate vocabulary, and tagging decisions open.

The form-based advantage on synonymy attaches to a different test. The scoring accepts inflected realizations of a reference entry for nouns and adjectives and can also reward another form of the query. A form-based system therefore has several ways to receive credit from the same lexical family. It also keeps a more specific record of the grammatical environments in which a spelling appears. The paper describes gender patterns in the neighbors of osoba and człowiek, which both refer to people but have different grammatical genders. Their neighbors include many words of the corresponding gender. The example shows that the choice of unit allows different information to influence a neighborhood. It supplies a mechanism worth considering alongside the different matching conventions.

The grammatical analogy set helps explain the practical importance of keeping the test and the unit aligned. A form such as kotom carries the plural and dative contrast required by a question based on kot. A vector for a shared headword offers no separate target for that form in the vocabulary as defined by the lemma representation. The high score shown for selected written-form settings establishes that the needed forms can participate in useful offsets on the chosen examples. The experiment addresses a different relationship from the lexical analogies for which lemmas are strongest.

#### Changing the prediction direction

Holding the representation unit fixed clarifies the comparison between CBOW and skip-gram. On synonymy, the authors report a significant advantage for CBOW when comparing combined-corpus lemma vectors with 300 dimensions and negative sampling. The raw scores on the larger noun, adjective and verb sets are all higher for CBOW in that pairing. The clear within-lemma result can coexist with the leading form-based skip-gram setting, which uses a stricter occurrence threshold and benefits strongly from it.

Selected combined-corpus lemma runs on V1 verb synonym precision CBOW leads the comparable skip-gram run, and the higher count cutoff leaves the leading score unchanged.

**The numbers**

| System or setting | precision through rank 50 |
| --- | --- |
| Skip-gram, 300 dimensions, default cutoff | 0.14 |
| CBOW, 100 dimensions, default cutoff | 0.17 |
| CBOW, 300 dimensions, default cutoff (this paper) | 0.21 |
| CBOW, 300 dimensions, higher cutoff | 0.21 |

The analogous architecture comparison is less uniform for the general analogy task. CBOW typically performs better with lemmas, while skip-gram commonly does better with written forms. The authors find a clearer pattern in the comparison of negative sampling with hierarchical softmax. Negative sampling tends to perform better on analogies, consistent with the earlier work they cite. These findings apply to the combinations tested. The leading architecture on any one task also depends on the unit, training procedure and data preparation.

#### Removing rare items

The change in minimum word count gives one of the clearest examples of a setting helping some conditions and hurting others. For written forms from the combined corpus, compare `NWfa-3-s-n` with `NWfa-3-s-n50`. Both use skip-gram, negative sampling and 300 dimensions. The higher-cutoff setting scores 0.30 on A1 versus 0.18 for the ordinary setting. On A2 the respective values are 0.33 and 0.14, and on N2 they are 0.32 and 0.18. These comparisons use the same denominator within each benchmark, so a change in the score reflects a change in the retrieved hits under its matching rules.

The lemma-based CBOW comparison has a different shape. On N1, A1 and V1, the authors find no significant benefit from the higher cutoff. On N2, the ordinary setting records 0.20 and the higher-cutoff version 0.11. On A2, the corresponding scores are 0.19 and 0.11. The intervention thus reduces the scores on both smaller references in this pairing. A single recommendation to remove infrequent entries would miss the interaction between the threshold, the unit of representation and the synonym benchmark.

Rare written forms can include spelling errors and poorly supported fragments, which gives the authors a reason to consider a frequency cutoff a kind of cleaning. A rarity filter also removes eligible vocabulary and changes the evidence that remains available for training. The comparison measures the combined effect of enforcing the threshold. It cannot identify which discarded items account for the gain or assign the change entirely to cleaner spelling. The Wikipedia analogy runs provide similar evidence at the level of overall behavior. A filtered run approaches the results of independently released embeddings built with different preprocessing, and the experiments leave the contribution of each preprocessing operation unknown.

#### Restricting grammatical categories

The authors use the restricted corpora to explore whether a narrower grammatical inventory supplies more informative context. For synonym retrieval, the change tends to reduce the quality of lemma-based results and gives a small improvement for written forms. The broad analogy comparison also offers little evidence of a general advantage from restricting the corpus. Effects vary with the training combination, and the paper observes different directions for lemma and form inputs in the detailed comparisons.

Verbs are a case where the authors consider tokenization a possible explanation. A divided verb form can contribute pieces with different grammatical tags. Restricting the grammatical categories changes which pieces remain in the sequence and how the surrounding words are exposed to the training procedure. This makes the restriction more than a decision about the inventory of available answers. It can change the evidence from which other vectors are learned. The observed behavior is consistent with an effect of the split forms, and the paper offers no separate experiment that isolates the effect of keeping or rejoining those pieces.

The best overall analogy configuration happens to use restricted lemmas from NKJP. Elsewhere in the analogy comparisons, the authors describe a substantial deterioration when the part-of-speech restriction is applied to a particular strong lemma-based setting. The two observations belong to different comparisons. A setting can lead a group of configurations even when one feature of that setting has inconsistent effects across the rest of the experiments. The comparisons that change the restriction within the same training recipe are the ones that address its individual effect.

#### Increasing data, dimensions and training steps

Larger training collections often help the general analogy task, particularly in the comparison with Wikipedia-only runs. The authors find that appending Wikipedia to NKJP has little effect on some otherwise comparable lemma settings, and that using both corpora can sometimes produce a worse result. They suggest that NKJP may already contain much of the information sought by the benchmark and leave the declines unexplained. Because the addition changes the mix of texts as well as its size, the experiment bears on the value of this specific addition.

The difference between 100 and 300 dimensions is easier to see in the lemma analogy comparisons, where the larger vectors usually do better. Synonym retrieval shows a more selective benefit. In the table’s combined-corpus, negative-sampling CBOW lemma comparison, for example, 300 dimensions give 0.22 on A1 and 0.21 on V1, compared with 0.19 and 0.17 at 100 dimensions. On N2 the scores are 0.20 at 300 dimensions and 0.23 at 100. The authors identify the larger adjective and verb sets as the ones for which lowering dimensionality worsened results in this comparison.

Longer training also depends on the configuration. In a CBOW run with hierarchical softmax, the authors increased training to 100 steps for vectors with 100 dimensions. The result was stronger on analogies than that of a corresponding 300-dimensional setting with 10 steps. The paper reports no matching improvement for skip-gram with negative sampling. That comparison changes training duration and vector length, and it establishes that the longer-trained smaller vectors can be competitive under one combination. It leaves open how much each change contributes by itself.

#### Looking inside the analogy total

An aggregate analogy count can rise because a setting recovers more instances of common categories, because it begins to recover a wider range of relations, or because of both effects. The authors’ relation breakdown shows that the leading configuration’s success is uneven. Country and capital questions are drawn from relations with a comparatively clear intended completion. Questions involving a material or a cultural event can also have clear reference answers, yet the supplied associations may support several plausible completions in ordinary use. The paper observes failures in those categories and calls for further investigation of the conditions that make analogies recoverable.

Differences in category sizes constrain what this analysis can establish. A category represented by a single question gives one observation under a particular choice of words. A category with many questions has more influence on the total and provides a broader sample of that labeled relation. The breakdown helps identify where hits occurred in the test. It gives a weaker basis for expecting the same relations to stay in the same order of difficulty with a different selection of examples.

### Limitations

#### Limits stated by the authors

The authors describe their synonym test as an indication of which embeddings put more listed synonyms near a query. A full synonym identification procedure would need a way to filter other relations and an evaluation designed to check the resulting decisions. Their test leaves opposites, grammatical relatives, and broad associations in the candidate rankings. It records whether a reference item was retrieved under one protocol. The paper’s finding concerns the availability of those items in a neighborhood.

The authors also identify the mismatch between vectors for words and references arranged by sense. They merge dictionary senses for evaluation, so a synonym of a rare sense remains eligible even when the vector’s closest neighbors come mainly from a common sense. The raw scores can consequently be low in cases where the predominant sense is well represented. A neighbor list can be coherent for one meaning while covering only part of the dictionary entry. The paper’s precision values incorporate this mismatch.

There are limits to the reference resources themselves. The dictionaries vary in their criteria, they can list multiword expressions, and their coverage varies by test category. The final evaluation uses the available entries with fixed list lengths. The authors omit recall because the broad reference sets can exceed what their candidate cutoffs make accessible. They also emphasize the cost of preparing tests that are large, open and carefully checked, which motivates using available dictionaries and a custom collection of analogies.

The authors are especially cautious about conclusions for analogy types. Many relation groups have few questions, and the separate grammatical collection is small by design. The improvement observed for particular settings supports comparisons on the items used. A claim about why certain semantic relations consistently produce useful offsets calls for further investigation. They likewise leave open why adding Wikipedia to NKJP can lead to worse scores for some settings.

#### What the setup leaves unresolved

The synonym evaluation treats the dictionaries as scoring references, and a reference hit is evidence of agreement with an entry under that resource’s rules. The nearest words can be linguistically useful without appearing in the dictionary. Conversely, a hit can represent one relevant meaning among several. On the word-form side, multiple matching forms can occupy several places in a ranking. The score therefore measures retrieved items under an explicitly expanded vocabulary. It leaves open how many of those hits would represent distinct synonym choices after different forms were grouped by headword.

The different denominators add another distinction. On the large synonym sets, the aggregate statistic measures the fraction of inspected ranking positions occupied by matches. On the smaller sets, the reported fraction uses the size of the reference set. A score of 0.33 on A2 thus concerns the amount of that adjective reference retrieved under the paper’s rule. Its numerical relation to the A1 score alone cannot establish how much easier one reference was to satisfy. Differences in synonym coverage, query-level lists and reference conventions all matter for that interpretation.

The selection of frequent and relatively unambiguous queries makes the synonym comparisons easier to run and interpret. It also defines the population represented by the results. Rare words and entries that readily shift grammatical category receive less direct attention. The frequency-filtered setting can improve scores for the chosen queries while leaving the usability of embeddings for excluded words unanswered. A vocabulary threshold has consequences for both retrieval quality and coverage, and the synonym benchmark examines the former on its selected words.

In the analogy experiment, success means that a specified word is among the nearest 10 candidates. This leaves room for other candidates to appear ahead of it, and a plausible completion with a different spelling or a different acceptable association can fail to receive credit. The result measures recovery within a shortlist for a given vocabulary. It leaves the quality of a single-answer selector, the range of other acceptable answers, and the reliability of the operation on new analogy sets untested.

The external Wikipedia vectors are informative comparison points because they come from a separate preparation and training process. Their differences from the authors’ own vectors involve several operations at once. Their strong results support the view that input preparation can matter. They cannot establish whether the key difference was casing, digit handling, removal of non-text material, another implementation detail or an interaction among these choices. The paper also shows how the full NKJP corpus was obtained for the study, so a comparison using only the publicly downloadable portion would start with different training data.

Finally, the evaluation measures two properties of lexical representations under chosen test procedures. The results justify claims about synonym neighborhoods and the recoverability of analogy answers on those benchmarks. An application that uses these embeddings in a larger pipeline may depend on different distinctions, and the study contains no corresponding application scores. The strongest finding is specific enough to guide interpretation of the experiments. The appropriate training choice depends on what is represented and on which retrieval operation the test uses.

### What came after

The later work identified in this line of research is [Wordnet-based Evaluation of Large Distributional Models for Polish](https://md.research.elamur.ai/free/en/papers/piasecki-2018-wordnet-based-evaluation-large-distributional/), a 2018 paper that cites the study and takes a WordNet-based approach to evaluating Polish distributional representations. It continues the focus on evaluating the lexical information those representations make accessible. Its choice of reference is especially relevant because Mykowiecka and colleagues considered Polish WordNet for their own synonym benchmark and judged coverage insufficient for their selected query words.

The connection concerns the design of the evaluation. Mykowiecka and colleagues used synonym dictionaries for direct neighborhood checks and supplied a separate set of analogies to cover relationships beyond synonymy. A WordNet-based evaluation places a lexical network at the center of the measurement. The later paper’s title identifies that basis, while its citation establishes the link to the Polish embedding study. The earlier coverage finding applies to the words chosen for the 2017 synonym test. Whether particular representations retain their ranking under a WordNet-based benchmark depends on the entries, relations and scoring used in that evaluation.

## Cite

Cite as Agnieszka Mykowiecka, Małgorzata Marciniak and Piotr Rychlik. 2017. Testing word embeddings for Polish. Cognitive Studies | Études cognitives.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.11649/cs.1468](https://doi.org/10.11649/cs.1468)

```bibtex
@article{mykowiecka2017testing,
  title = {{Testing word embeddings for Polish}},
  author = {Agnieszka Mykowiecka, Małgorzata Marciniak and Piotr Rychlik},
  journal = {Cognitive Studies | Études cognitives},
  year = {2017},
  doi = {10.11649/cs.1468},
  url = {https://doi.org/10.11649/cs.1468}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
