---
title: "NPVec1 — paper by Koirala and Niraula (2021)"
description: "NPVec1 builds Nepali word embeddings from a shared corpus and tests how spelling, suffix handling, and training choices affect their performance."
canonical: "https://research.elamur.ai/free/en/papers/koirala-2021-npvec1-word-embeddings-nepali-construction/"
---
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/koirala-2021-npvec1-word-embeddings-nepali-construction/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2021](https://md.research.elamur.ai/free/en/papers/2021/) / NPVec1: Word Embeddings for Nepali - Construction and Evaluation

# NPVec1: Word Embeddings for Nepali - Construction and Evaluation

Paper · 2021 · Pravesh Koirala and Nobal B. Niraula

**Authors:** Pravesh Koirala and Nobal B. Niraula · **Year:** 2021 · **Venue:** Proceedings of the 6th Workshop on Representation Learning for NLP (RepL4NLP-2021) · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

Proceedings of the 6th Workshop on Representation Learning for NLP (RepL4NLP-2021) · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2021.repl4nlp-1.18/)
- [PDF](https://aclanthology.org/2021.repl4nlp-1.18.pdf)
- [DOI 10.18653/v1/2021.repl4nlp-1.18](https://doi.org/10.18653/v1/2021.repl4nlp-1.18)

## Summary

When Nepali words are written with different spellings or used with different endings, a computer can treat those forms as unrelated entries. That spreads the evidence for each word across the training text, which makes it harder to learn a useful representation. NPVec1 examines what happens when spelling and word structure are handled in different ways before training. Its authors assemble a corpus from online news, Nepali Wikipedia, and the web collection OSCAR, remove repeated sentences, and prepare versions of the text with different combinations of preprocessing. The base corpus contains 279M word tokens. The resulting public release contains 25 sets of [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/), which represent words with numerical vectors learned from text.

The authors train Word2Vec, fastText, and GloVe on every corpus variant. These methods ordinarily give a word form a representation that stays the same across sentences. They also train a smaller Nepali BERT on the version that normalizes spelling and separates selected suffixes. BERT can represent a word differently depending on the surrounding text. The study tests these representations in two ways. An intrinsic evaluation asks whether the vectors naturally group handpicked Nepali words by topic or sentiment. An extrinsic evaluation asks whether the vectors help a news classifier learn from scarce labeled data. It compares each pretrained option with a classifier that learns its own word representations from the labeled articles.

The answers depend on the test. On the Relatedness Set, all three fixed-vector methods reach a clustering purity of 1 with spelling normalization and suffix splitting. On the Sentiment Set, the best purity is 0.69, obtained by GloVe under that same preprocessing scheme. Words with opposite meanings can appear in much the same surroundings, which helps explain why separating positive and negative words proved harder than grouping kitchen and nature vocabulary. The classifier favors a different setup. Word2Vec trained on the base corpus reaches the highest news test macro F1, at 0.79, against 0.69 for the corresponding baseline. The smaller BERT is competitive on the news task within its preprocessing scheme, where it reaches 0.76 macro F1. Across the experiments, the choices that produce the cleanest groups of isolated words differ from those that produce the strongest document classification.

## Deep dive: NPVec1: Word Embeddings for Nepali - Construction and Evaluation

NPVec1 builds Nepali word embeddings from a shared corpus and tests how spelling, suffix handling, and training choices affect their performance. · about 33 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

#### Learning from unlabeled Nepali text

A word embedding makes a word usable as a numerical input. Each entry in its vector is a learned value. The overall pattern of values can put words with similar distributional behavior near one another, allowing a system to reuse evidence across words it has encountered in different places. This is the intuition behind learning meaning-related information from the surroundings in which words occur. The relevant distinction for NPVec1 is between having a vocabulary of word forms and having enough examples of those forms in use to learn stable relationships among them. [Distributional semantics](https://md.research.elamur.ai/free/en/concepts/distributional-semantics/)

The paper motivates this approach through the cost of building features for language applications by hand. A feature is an input signal that a system can use to make a decision. If people must design those signals individually, the work takes engineering time as well as linguistic knowledge. A collection of pretrained vectors offers another source of features. The vectors can be learned from ordinary text without anyone labeling each example for a particular application. A separate system can then use them when learning to classify a document or assign a label to a word. The authors situate their work in [natural language processing](https://md.research.elamur.ai/free/en/concepts/natural-language-processing/).

The difficulty is that unlabeled training still requires data. The paper describes Nepali as Nepal’s official language and de facto common language, spoken by more than 20 million people. It also describes Nepali as low-resource because assembling a sufficiently large training collection is difficult. The first point concerns the language’s use. The second concerns what researchers can obtain and prepare for computation. NPVec1 addresses the resource problem by pooling text that was collected for different purposes and making the trained representations available for subsequent use. [Low-resource languages](https://md.research.elamur.ai/free/en/topics/low-resource-languages/)

The collection problem continues after the documents have been gathered. Nepali can attach multiple meaningful endings to nouns and pronouns, and verbs can have a range of inflected forms. Spelling can also vary where written distinctions correspond to pronunciations the authors describe as indistinguishable. A count of exact strings consequently tells only part of the story. Some distinct entries may carry related evidence that a preprocessing rule could bring together. Other distinctions may matter precisely because they help tell one grammatical form or meaning from another. The paper makes these decisions part of the experiment by working with several versions of the corpus. [Morphology](https://md.research.elamur.ai/free/en/concepts/morphology/)

#### What researchers already had

The authors place NPVec1 in a field where pretrained vectors were widely available for well-resourced languages such as English and Chinese. They also point to efforts for Portuguese, Arabic, and Bengali. Within their account, the availability of general-purpose training algorithms made it feasible to extend the approach across languages, provided that a usable corpus could be built. That qualification matters. The same training procedure can be applied to two languages while the material available for it differs substantially in size, subject matter, and preparation.

Nepali already had pretrained word vectors. The multilingual effort by Grave and colleagues used Wikipedia and Common Crawl to train vectors for 157 languages, including Nepali. The other Nepali effort discussed in the paper, by Lamsal, trained Word2Vec on news. The collection maintained by the University of Oslo illustrates a different effort to make word vectors reusable. The paper reports that this repository contained 209 pretrained sets and did not include Nepali. The multilingual release supplied a resource for Nepali even where that other repository offered no counterpart. [Learning Word Vectors for 157 Languages](https://md.research.elamur.ai/free/en/papers/grave-2018-learning-word-vectors-157-languages/)

The authors identify several gaps in the earlier Nepali resources. Each used a narrower collection of sources than NPVec1, and the paper describes their training corpora as smaller. The earlier work also offered limited preprocessing and did not report evaluations of the Nepali vectors. These gaps concern different questions. Corpus size and source mix concern the evidence available during training. Preprocessing concerns the representation of that evidence. Evaluation concerns what has actually been demonstrated after training. The study compares its own variants under shared tests to address the latter questions directly.

The paper distinguishes two broad kinds of representation already available to researchers. A context-independent method associates a familiar word with a fixed vector. The vector summarizes patterns across uses, so a downstream system receives the same word representation when that form appears in different sentences. A context-dependent method computes a representation from the text around the occurrence. When a form has several meanings, the surrounding sentence can help determine which features in its representation become most prominent. The authors describe both the forward and backward recurrent processing used by ELMo and the attention-based architecture used by BERT as ways to learn contextual representations. [Deep Contextualized Word Representations](https://md.research.elamur.ai/free/en/papers/peters-2018-deep-contextualized-word-representations/)

The distinction also creates a practical question about how to evaluate the two kinds of representation together. A list of isolated words gives a fixed-vector system its ordinary input. It gives a context-dependent system much less information than a sentence can supply. Conversely, a document classifier can provide surrounding text, but its architecture determines how much of what the encoder computes can reach the final decision. NPVec1 approaches quality through both kinds of test. The resulting measurements concern a representation, an input format, and a way of reading the representation together.

### The method, step by step

#### Building the common corpus

The process begins with a collection of documents and ends with two kinds of evidence about the trained vectors. The authors first clean a shared pool of text. They prepare alternative inputs by changing how the same material is written and segmented. They then train the fixed-vector methods on each version and the contextual encoder on a single version. Once those representations exist, the intrinsic evaluation uses them to group words, and the extrinsic evaluation uses them as inputs for a supervised classifier.

From Nepali source text to embedding evaluation The steps in order.

The largest individual source is the authors’ own news collection. They report crawling Nepali news outlets for over a year and gathering more than 700,000 unique articles, with a reported size of ∼ 3GB. Its topics include politics, sports, technology, and society. The corpus inventory assigns this collection 216M tokens and 3.3M types. A token is an occurrence in the text. A type is a distinct form among those occurrences. The two counts describe different properties of the material. A repeated form increases the token count each time it appears while continuing to occupy the same place in the list of types.

A second news collection comes from Lamsal’s dataset on IEEE DataPort. The paper gives its size as 1.7GB and lists 58.8M tokens and 1.2M types. The distinction between the two news sources matters because each was gathered separately, making it possible for sentences to recur across collections even when the articles were acquired in different ways. The contents also share a broad genre. Pooling them adds material from news, while the other sources supply text drawn from outside that genre.

OSCAR supplies the Nepali portion of a multilingual collection built by identifying languages and filtering Common Crawl material. The authors use a shuffled version distributed in deduplicated form, reported at 1.2GB. Their inventory gives OSCAR 71.8M tokens and 2.2M types. The remaining source is the Nepali Wikipedia collection obtained from Kaggle. It comprises 39k articles, occupies 83MB, and is listed at 5.1M tokens and 0.3M types. The authors classify OSCAR and Wikipedia as mixed-genre material in their corpus inventory.

The source inventory and the prepared corpora describe different stages. The inventory identifies the material the study draws on. The prepared corpus counts reflect a common cleaning process and, where applicable, further changes to the units that training sees. The news collections also give relevant context for the downstream experiment. An article classifier is evaluated in a genre that forms a major part of the pretraining material. Wikipedia and OSCAR extend the range of contexts available during training, but the downstream test continues to be a news experiment.

#### Removing repetition and preparing the base text

Pooling sources brings together texts that may contain identical sentences. Repeated boilerplate creates another source of duplication. The authors compute a hash for each sentence and keep the sentence when they encounter a hash they have not recorded before. A hash serves as a compact identifier for comparing a sentence with those already seen. The authors report removing ∼ 22% of the sentences as duplicates. Applying this check to the pooled material matters even though the OSCAR contribution came in an already deduplicated form. A check carried out inside one source cannot establish whether its sentences are repeated in another source.

The authors then discard sentences with fewer than 10 characters, on the grounds that the shortest strings contribute little context for learning word representations. They remove punctuation and replace numbers with the token `NN`. This replacement lets the surrounding text retain an indication that a number occurred without assigning every written quantity a separate entry. The resulting base is therefore the starting point for testing the optional language-specific operations. Its description as raw text in the comparison means that it has received none of those optional operations. The shared corpus preparation precedes that comparison.

#### Changing spelling and word boundaries

Normalization gives alternative spellings a common written representation. The paper illustrates the problem with forms pronounced the same way although their written vowels differ. When the forms are kept separate, surrounding words observed with one spelling are gathered under a different entry from those observed with the other. Mapping the alternatives to the same written form lets training collect those observations together. The aim is to consolidate evidence affected by spelling variation while retaining the words that the documents contain.

The operation the authors call tokenization is a specific treatment of Nepali endings. It splits selected postpositions and agglutinative suffixes away from nouns and pronouns. A postposition serves a grammatical function after its associated expression. An agglutinative suffix contributes information that can be added to a base form, sometimes with other endings. The paper uses forms of the word for Nepalese to illustrate the procedure. A form carrying a plural ending and a form expressing possession can both yield the same base token, alongside different tokens for their respective endings. [Tokenization](https://md.research.elamur.ai/free/en/concepts/tokenization/)

The retained endings are important to understanding what this operation changes. A source word that once occupied a single position can yield a base token and a separate marker. The base recurs across more contexts, and the marker keeps a place in the token sequence. That can reduce the variety of distinct forms even as the number of token occurrences grows. It also changes which items sit next to one another in the sequence from which vectors are learned. When a downstream classifier averages vectors for all the retained tokens, the split marker contributes to the article representation as well.

Stemming combines another set of forms, including inflected verbs, under a common base. The paper gives several forms of the verb meaning “eat,” including forms glossed as “ate,” “eating,” and “after eating.” The stemmer is intended to make occurrences of the common base easier to accumulate across those variants. The operation is more compressive than suffix splitting as used in this study. Once an inflected form has been reduced, a distinction conveyed by the discarded ending may no longer be present as its own token. The authors adapted preprocessing procedures from earlier work by Koirala and Shakya. [Stemming](https://md.research.elamur.ai/free/en/concepts/stemming/)

These three operations can be applied independently or in combination. The authors name the shared base `B` and use `N`, `T`, and `S` for normalization, suffix splitting, and stemming. Thus `BN` applies normalization alone, `BT` applies splitting alone, and `BS` applies stemming alone. `BNT` combines normalization and splitting. `BNS` combines normalization and stemming. `BTS` combines splitting and stemming. `BNTS` applies all three. Keeping the base in every label makes it possible to describe a comparison precisely. `BT` and `BNT`, for instance, share the splitting operation and differ in whether normalization is enabled.

The resulting counts show the difference between consolidating forms and creating token positions. `B` contains 279M tokens and 3.14M types. `BN` also contains 279M tokens, with 2.6M types, while `BS` contains 279M tokens and 2.5M types. Combining normalization and stemming in `BNS` keeps the token count at 279M and yields 2.04M types. These are counts of the prepared corpora. The vocabulary a training method can use may be further limited by its own frequency or tokenizer settings.

The schemes with suffix splitting have larger token counts. The paper lists 357M tokens and 1.8M types for `BT`, and 357M tokens and 1.4M types for `BTS`. `BNT` contains 360M tokens and 1.4M types. `BNTS` contains 359M tokens and 1.09M types. The pattern is consistent with breaking attached forms into more positions while reusing a smaller stock of distinct units. It also explains why the paper can describe the base corpus as containing 279M tokens and give a larger training word count for the contextual encoder. The encoder sees the version in which the authors have already split selected endings.

#### Training the fixed vectors

Word2Vec, fastText, and GloVe are each trained on every corpus scheme. A shared setting gives all their vectors 300 dimensions, so each represented word is described by 300 learned values. The paper reports 5 for the minimum word frequency, the context window size, and the negative sampling size in its account of the fixed-vector setup. These settings address different parts of training. The frequency threshold concerns which words get entries. The window determines which neighboring positions count as local context. Negative sampling provides examples against which observed word and context combinations can be distinguished in the methods that use it.

The authors run Word2Vec in its skip-gram form through Gensim. Skip-gram uses a focus word to learn about neighboring words. A change to the training sequence consequently changes the evidence available to it. For instance, a suffix that becomes its own position can now be observed as a neighbor. The scheme’s effect also extends to the types eligible for the vocabulary if several previously separate forms now contribute to one entry. The paper’s comparison holds the training approach fixed while changing those aspects of the input. [Distributed Representations of Words and Phrases and their Compositionality](https://md.research.elamur.ai/free/en/papers/mikolov-2013-distributed-representations-words-phrases-their/)

The fastText experiments also use skip-gram and Gensim. The distinctive feature the paper draws on is that fastText can use pieces of a word in its representation. A form absent as a complete vocabulary entry can still share pieces with forms encountered during training. This is relevant for Nepali because several forms can share a base while differing in their endings. It also gives fastText a way to produce representations for some out-of-vocabulary inputs, a practical difference from the ordinary lookup used for Word2Vec and GloVe. [Enriching Word Vectors with Subword Information](https://md.research.elamur.ai/free/en/papers/bojanowski-2017-enriching-word-vectors-subword-information/)

The authors train GloVe with the StanfordNLP implementation. Its name refers to global vectors, and it learns from word co-occurrence statistics. A co-occurrence records that words have been observed near one another. The three fixed-vector methods receive versions of the same Nepali material, and their training procedures use distributional evidence in different ways. Accordingly, a result shared by all three provides different evidence from a ranking that appears only for one method on one preprocessing scheme. [GloVe](https://md.research.elamur.ai/free/en/concepts/glove/)

There are 24 fixed-vector sets in the release. Keeping a family name and a preprocessing code together is essential when identifying any individual result. The GloVe vectors trained on `BNT` and those trained on `BNTS`, for example, use the same general learning method on text with different treatments of inflected forms. A statement about the family without its code can conceal the comparison the authors set out to make.

#### Training the contextual encoder

The BERT branch uses `BNT`, the corpus version with spelling normalization and suffix splitting. The authors chose it because the fixed-vector systems had done well on the intrinsic tests under that scheme. They use Hugging Face’s Transformers library and train under a smaller configuration because of computing constraints. This creates an intentionally uneven comparison across methods. The fixed-vector families have counterparts for each corpus treatment. The BERT run has a counterpart only under `BNT`. [Transformers](https://md.research.elamur.ai/free/en/papers/wolf-2020-transformers-state-art-natural-language/)

The encoder has 6 hidden layers, 6 attention heads, and a hidden dimension of 300. A hidden layer updates internal representations of the input. In a layer, attention heads provide separate ways to combine information from positions in the sequence. Hidden dimension is the width of the internal representation at a position. The comparison configuration in the paper, BERT-base, has 12 hidden layers, 12 attention heads, and a hidden dimension of 768. The Nepali encoder has 22.5M parameters, the adjustable values learned during training, while the cited BERT-base configuration has 110M. [Transformer and attention](https://md.research.elamur.ai/free/en/concepts/transformer/)

The authors set the maximum sequence size to 512 and the maximum WordPiece vocabulary to 30,000. WordPiece can represent an input form through smaller units available in its vocabulary. This is a distinct operation from the Nepali suffix splitting that produced `BNT`. The corpus operation uses rules about which attached elements to separate. WordPiece supplies the units the encoder consumes. A word in an intrinsic probe can pass through both parts of that input pipeline before the authors derive the single vector used for clustering. [Subword tokenization](https://md.research.elamur.ai/free/en/concepts/subword-tokenization/)

The encoder is trained for a single epoch, a pass through the training data, using masked language modeling. The task hides input units and uses the surrounding sequence to predict them. The study uses this objective alone. The earlier BERT training procedure described in the paper also included next sentence prediction, an objective that involves pairs of sentences. The paper’s Nepali implementation therefore changes both the size of the encoder and the pretraining setup. [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/)

A contextual encoder returns hidden states, the intermediate numerical representations computed for input positions. To extract a vector, the authors average the states from the last two hidden layers. For intrinsic evaluation, they feed the probe words individually, so the surrounding sentence information that BERT could use is absent. The paper also describes using the average of the corresponding vectors for out-of-vocabulary forms in fastText and BERT. The resulting vector can be compared with a fixed vector in the clustering procedure even though it was obtained differently. In the news experiment the authors again take representations from the last two layers, this time for article input.

#### Turning the representations into measurements

For the intrinsic test, the authors assemble reference groups and apply K-means to the word vectors. K-means forms groups around centers, using the positions of the vectors to assign words to groups. The reference categories supply the requested number of groups and the labels used to score them. The words’ individual labels are not given to K-means when it makes its assignments. The paper gives the clustering setting as follows.

```
K = 2
```

`K` denotes the number of groups the clustering procedure is asked to produce. The equals sign sets that number to `2`, corresponding to the category count in each word set. One set contrasts kitchen and nature vocabulary. The other contrasts positive and negative vocabulary. The evaluator compares each resulting cluster with its reference labels to see how coherently the vectors group the words.

The paper reports purity as the score for this comparison. For each cluster, the majority reference label determines which members count as consistent with that cluster. Purity expresses how much of the clustered material is accounted for by those majority labels. The endpoints stated in the paper are `0` for bad clustering and `1` for perfect clustering, with higher values indicating better recovery under this measure. A strong result therefore concerns the homogeneity of the particular groups the authors supplied for comparison.

For the extrinsic test, the authors build a feed-forward classifier in Keras. Given a news article, it uses the first five hundred tokens and obtains vectors for those tokens from the representation under evaluation. An averaging layer pools the sequence to an article vector. In effect, each dimension of that vector summarizes the corresponding dimension across the supplied tokens. The rest of the classifier receives this pooled representation. The averaging step helps explain why changes to token boundaries can matter downstream. When a rule changes the tokens present, it can change the set of vectors contributing to the pool.

The pooled vector goes to a hidden layer with 64 units using ReLU, an activation that keeps positive inputs and suppresses negative ones. The output layer has 10 units, one per news category, with sigmoid activations that give each unit its own bounded score. The authors use binary crossentropy to measure how closely the output scores match the labels and train each classifier for 60 epochs. The optimization procedure adjusts the trainable parameters in response to that loss. [Adam](https://md.research.elamur.ai/free/en/papers/kingma-2014-adam-method-stochastic-optimization/)

The baseline adds a trainable Keras embedding layer at the input. It learns its word vectors from the labeled training examples available to that classifier. In the other conditions, the input representations come from the corpus-trained vectors or the BERT encoder. The downstream comparison asks what pretraining contributes when the classifier has few labeled examples from which to learn. It gives that question a reference point that already has the capacity to learn word representations from the task itself. [Text classification](https://md.research.elamur.ai/free/en/concepts/text-classification/)

### Experiments and results

#### What the isolated words test

The paper explains that word analogy benchmarks are a common form of intrinsic evaluation, but that the authors had no such dataset for Nepali. They adopted a clustering approach used in earlier work on Arabic and assembled word lists by hand. This changes the question being asked. An analogy test would ask whether a relation transfers from one pair of terms to another. A clustering test asks whether a collection of vectors has enough structure to recover reference categories using their positions. The categories in NPVec1 were chosen to expose a difference between topical association and separation by sentiment.

The Relatedness Set is described as having twenty one examples per topic. Its kitchen vocabulary includes words for sugar, salt, and a pot. Its nature vocabulary includes words for a mountain, a hill, and a river. Members of a group can have different functions or denote different things while belonging to the same setting. A river and a hill can appear in much the same descriptions. Sugar and a pot both fit a cooking context even though one is an ingredient and the other is a utensil. A vector space can exploit those shared surroundings to recover the chosen grouping.

The Sentiment Set is described in the prose as containing nineteen examples in each polarity group. The positive group includes words glossed as “good,” “big,” and “justice.” Their opposites appear among the negative terms, including “bad,” “small,” and “injustice.” The authors use this list to probe a distinction they draw between relatedness and similarity. Opposites can be closely related because they describe the same property or occur in the same syntactic slots. For this experiment, useful discrimination means keeping the reference polarities apart even when the opposite terms have strong distributional ties. [Semantic similarity](https://md.research.elamur.ai/free/en/concepts/semantic-similarity/)

Across the reported runs, purity is higher for Relatedness than for Sentiment. This holds even for systems that do relatively well on the sentiment list. The result matters because the input to both tests is the same kind of object, a set of word vectors, and the clustering and scoring procedure are shared. What changes is the structure the word lists ask the procedure to retrieve. The geometry that makes vocabulary about a shared setting easy to group can draw opposites together when they are used in similar contexts.

#### Relatedness and sentiment under shared preprocessing

On Relatedness, the fixed-vector systems reach the ceiling together under `BNT`. A purity of 1 means that the requested clusters align perfectly with the two reference topics in this test. Under the same corpus treatment, BERT reaches 0.83. Both the word lists and the score are shared, while the tested representations come from substantially different training and extraction procedures. The comparison shows how each representation performs as an isolated word vector, the input the clustering algorithm actually receives.

Relatedness Set clustering purity under BNT preprocessing The fixed-vector methods tie at the top on the kitchen and nature groups.

**The numbers**

| System or setting | Purity |
| --- | --- |
| Word2Vec (this paper) | 1 |
| fastText | 1 |
| GloVe | 1 |
| BERT | 0.83 |

Perfect purity also occurs under other schemes. In `B`, fastText reaches 1, while Word2Vec reaches 0.98 and GloVe reaches 0.95. With normalization alone in `BN`, Word2Vec and fastText reach 1, and GloVe reaches 0.98. Under splitting alone in `BT`, GloVe reaches 1 and the other fixed-vector methods each reach 0.98. The distinction of `BNT` on this test is that all three reach the ceiling in the same scheme. Several other system and preprocessing pairings already separate the two topics perfectly.

The sentiment comparison under `BNT` has a clear ordering. GloVe obtains 0.69, the highest Sentiment Set purity in the paper. BERT reaches 0.59. Word2Vec reaches 0.54, and fastText reaches 0.51. BERT’s placement differs from its position on Relatedness. It trails the fixed-vector methods on the topic split in this scheme and comes ahead of two of them on the sentiment split. That difference gives a more complete account of the encoder’s performance than either word list can give by itself.

Sentiment Set clustering purity under BNT preprocessing GloVe recovers the polarity groups most closely, followed by BERT.

**The numbers**

| System or setting | Purity |
| --- | --- |
| Word2Vec | 0.54 |
| fastText | 0.51 |
| GloVe (this paper) | 0.69 |
| BERT | 0.59 |

GloVe usually leads on the sentiment list across preprocessing conditions. In `B` and `BT` its purity is 0.67. With normalization alone in `BN` it is 0.62, and with normalization and stemming in `BNS` it is 0.64. The fully processed `BNTS` condition reverses that usual ordering. There GloVe and Word2Vec each score 0.51, while fastText scores 0.54. This exception places an important qualification on choosing a method by its family name. GloVe’s advantage is a pattern across the experiment, with a marked dependency on which treatment of the text it receives.

The authors point to the possibility that GloVe’s stronger separation could help in sentiment applications. The measured result is the clustering of isolated vocabulary. A sentiment classifier for complete texts would face other cues, including how words combine, and the downstream experiment in the paper addresses news categories. Within the intrinsic setup, the useful conclusion is narrower. The GloVe geometry under several corpus treatments aligns with the authors’ positive and negative groups more closely than the other fixed-vector geometries do.

#### The news experiment and its baseline

The article classifier uses the public Nepali News Dataset, distributed through the NepaliNewsDataset repository. The original collection covers 10 categories, with 1000 articles in each. The authors take 3000 samples, with 300 examples from each category. They then randomly assign examples using intended proportions of 10%, 10%, and 80% for training, validation, and testing. The realized splits contain 313 training articles, 326 validation articles, and 2361 test articles. The training split has at least 21 articles per class, and the test split has at least 227 articles per class.

The roles of the splits are different. The classifier learns from the training articles, the validation articles provide a separate partition, and the article results are evaluated on the test set. The deliberate imbalance in split sizes serves the question the authors are studying. They want the classifier to have a small amount of labeled evidence and a much larger collection on which to assess how well it generalizes. A larger labeled training set would test the vectors in a different regime, where the baseline has more opportunity to learn word representations from the task labels.

The evaluation reports macro precision, macro recall, and macro F1. Precision concerns how often predictions of a category are correct. Recall concerns how many articles belonging to a category are recovered. F1 combines precision and recall. Macro scoring gives each category equal weight in the final summary, so the result describes performance across categories in addition to whichever categories supply the most test articles. The table reports the aggregate metrics. It does not identify specific categories as the source of a run’s gains.

The baseline is reported separately under the preprocessing schemes. That is important because an embedding learned from labeled articles can benefit or suffer when those articles are represented with different units, even without a large external corpus. A comparison of pretrained and baseline runs within a scheme controls for more of the input treatment than a comparison of separately chosen best settings. A comparison across schemes instead asks which combination delivered the best tested result, including the effects of preprocessing on the downstream pipeline.

#### The strongest news result

The highest news test macro F1 appears in the base condition. Word2Vec reaches 0.79 against the baseline’s 0.69. Its test macro precision is 0.80 and its macro recall is 0.79. The corresponding baseline has macro precision of 0.76 and macro recall of 0.68. The separation between the runs is therefore visible in the recovery of articles across categories as well as in the precision of the predictions. fastText and GloVe also improve on the `B` baseline, with macro F1 scores of 0.78 and 0.77 respectively.

Nepali News Dataset test macro F1 under base preprocessing Pretrained vectors improve on the trainable baseline, with Word2Vec giving the highest score.

**The numbers**

| System or setting | Macro F1 |
| --- | --- |
| Trainable embedding baseline | 0.69 |
| Word2Vec (this paper) | 0.79 |
| fastText | 0.78 |
| GloVe | 0.77 |

The authors report an average advantage of 5 percent in F1 for the pretrained representations over the baseline. This is their aggregate description of the evaluation. The per-scheme figures show where that advantage is less pronounced. In `BNT`, the baseline reaches 0.73 test macro F1, while Word2Vec reaches 0.74, fastText reaches 0.76, and GloVe reaches 0.75. In `BTS`, the baseline reaches 0.74, while GloVe reaches 0.73. These comparisons show why the gain from pretraining should be read alongside the input scheme and baseline, even though the overall result favors pretraining.

BERT scores 0.76 test macro F1 under `BNT`, along with 0.77 macro precision and 0.76 macro recall. It ties fastText on macro F1 within that scheme. fastText’s precision is 0.78 and its recall is 0.76. Word2Vec in the base scheme remains the strongest run overall, while the shared `BNT` comparison places the smaller contextual encoder among the stronger options for that particular corpus treatment. Its position on the news task also differs from its position in the isolated Relatedness test, where it ranks below all three fixed-vector systems.

The results make the role of the evaluation clear. All three fixed-vector methods reach the Relatedness ceiling under `BNT`, and that scheme also yields the best Sentiment Set purity. The best news result uses `B`. Clustering favors a geometry in which words of the same reference group sit together. News classification rewards an article representation that helps separate editorial categories after the token vectors have been averaged. A preprocessing choice can change both measurements by altering word counts, word boundaries, and the resulting vectors, but the measurements reward different properties.

### What the ablations show

#### Reading the preprocessing comparisons

The paper’s controlled comparisons vary preprocessing while retraining each fixed-vector method. For a single operation, the cleanest comparison matches runs that share the other operations. `B` and `BN` isolate the addition of normalization to the base. `BT` and `BNT` ask what normalization adds after selected suffixes have been split. The full set of schemes allows the same question to be asked in the presence of stemming. It also shows whether a result on one task or for one method recurs in another setting. The reported scores support these comparisons directly. Explanations involving a particular suffix, spelling error, or lost cue remain hypotheses unless the experiment measures it.

Normalization can help recover the topical groups. Under `B`, Word2Vec reaches 0.98 Relatedness purity and GloVe reaches 0.95. Under `BN`, their scores are 1 and 0.98, respectively, while fastText is already at 1 in both schemes. With splitting enabled, Word2Vec and fastText move from 0.98 in `BT` to 1 in `BNT`, and GloVe reaches 1 in both. These outcomes fit the authors’ account of normalization as a way to combine contexts associated with alternative spellings. The cluster scores are also close to the ceiling, which limits how much separation this list can show among strong configurations.

On the sentiment list the same treatment has mixed effects. GloVe reaches 0.67 in `B` and 0.62 in `BN`, whereas Word2Vec reaches 0.54 in `B` and 0.56 in `BN`. When normalization is added to the split text, GloVe reaches 0.69 in `BNT` after scoring 0.67 in `BT`, while fastText’s score is 0.51 in `BNT` and 0.54 in `BT`. The broad normalization hypothesis is plausible at the level of data preparation. Its observed benefit depends on which distinction the vectors are evaluated for and which learning procedure uses the normalized corpus.

For news classification the authors see little consistent benefit from normalization and suggest that the published news articles contain relatively standardized spelling. The figures show why their interpretation is about an overall tendency. In the comparison between `B` and `BN`, GloVe retains a test macro F1 of 0.77 and fastText retains 0.78. Word2Vec has 0.79 in `B` and 0.78 in `BN`. The baseline has 0.69 and 0.72, respectively. Even within the same genre, the restricted labeled baseline and the pretrained vectors can react differently to a change in text treatment.

#### When splitting changes the document signal

Suffix splitting is especially informative because it reduces the number of distinct forms and introduces separate tokens. In the base-to-split comparison, the `BT` baseline reaches 0.72 news test macro F1, compared with 0.69 in `B`. Over the same schemes, Word2Vec scores 0.77 in `BT` and 0.79 in `B`, fastText scores 0.76 and 0.78, and GloVe scores 0.77 in both. With normalization held on, the baseline reaches 0.73 in `BNT` and 0.72 in `BN`. The fixed-vector runs in `BNT` also fall below their corresponding `BN` runs on test macro F1.

The authors suggest that pretrained representations of frequently occurring postpositions and other attached elements might favor particular topics. Their classifier provides a route through which this could matter. The pooling layer averages the vectors it receives, so a frequently recurring item influences the summary each time it appears. An original attached form and its split representation contribute differently to that average. The same change can make the labeled-only baseline’s vocabulary easier to learn while also changing the information available in the pretrained representation. The experiment measures the effect of the full splitting treatment, which includes both changes.

The paper suggests trying a classification setup that omits postpositions and other frequent tokens. The suggestion follows from the different responses of the pretrained and baseline runs. The tested schemes do not include a controlled removal of those tokens after splitting. Their scores therefore support a claim about how the splitting procedure behaved in the tested classifier. Attributing the effect to particular frequent markers would require an intervention that changes those markers while holding the other consequences of splitting fixed.

#### What stemming does to the vectors

Stemming gives the clearest repeated loss on the Relatedness Set. All three fixed-vector methods have purity 1 under `BNT`, and each has 0.95 under `BNTS`, the condition that adds stemming to the normalized and split text. Adding stemming directly to the base leads to 0.93 in `BS` for each of the methods. The repeated pattern suggests that, for these word groups and this stemmer, the consolidation of inflected forms comes at a cost to the separation of topics. The reported values establish a pattern across configurations. The paper gives no uncertainty estimates for the size of that pattern.

Results on the Sentiment Set show that the effect is less uniform across methods. GloVe falls from 0.69 in `BNT` to 0.51 in `BNTS`, while fastText scores 0.51 in `BNT` and 0.54 in `BNTS`. Word2Vec also has different responses across matched comparisons, including 0.54 in `BNT` and 0.51 in `BNTS`. The authors point to over-stemming as a possible explanation for the general deterioration. Over-stemming occurs when the rules assign forms to a common base even though retaining their distinction would be useful. The effect on the vectors could arise because contexts from forms carrying different information are now gathered under the same entry.

The news results also qualify the stemming explanation. In the normalized and split condition, GloVe reaches 0.75 macro F1 under `BNT` and 0.77 under `BNTS`, even though its Sentiment Set purity drops under the latter. fastText remains at 0.76 across those two news conditions. The authors report the standard deviation of the classification F-scores across preprocessing schemes as 2.4% for Word2Vec, 1% for fastText, and 1.4% for GloVe. Standard deviation describes how spread out the scores are around their average. On this measure, fastText is the most stable across the tested schemes.

The paper connects fastText’s stability to the possibility that its sub-word representations withstand stemming errors better. This is a plausible reason for the authors’ recommendation of fastText when an application needs stemming. The statistic covers all the preprocessing conditions, so its variation can reflect changes due to spelling normalization or splitting as well. The study also uses one version of the stemmer. It does not measure error rates by scheme or train the same embeddings with alternative stemming rules, which would be needed to identify the contribution of over-stemming itself.

#### What the BERT comparison establishes

The BERT comparison holds the corpus scheme at `BNT` and evaluates the trained representations in the same downstream architecture as the fixed vectors. It shows that a smaller contextual encoder can reach the same news macro F1 as fastText in that condition. It also shows weaker recovery of the Relatedness groups and a competitive placement on sentiment. These are findings about the encoder the authors actually trained and the way the experiments read out its representations.

The study does not vary BERT’s corpus scheme, depth, training duration, or objective in separate runs. The configuration differs from BERT-base in several of those respects at once. Its isolated-word input also withholds the sentence information that motivates contextual representations. The authors propose that more training and the larger architecture would yield better results. Because those conditions were not run, the comparison cannot say how much improvement would come from any particular change or whether the same ranking would hold under a different classifier.

### Limitations

#### Limits the authors identify

The authors explicitly tie the size and training of the Nepali BERT encoder to computing constraints. It uses 6 hidden layers and 6 attention heads, a single training epoch, and the masked objective alone. For scale, the paper compares the 360 million words used in the Nepali run with the 3.3 billion words used for the original BERT reference. Collecting more text is itself part of the difficulty in this setting. Their proposed future direction includes both a fuller architecture and more training, alongside comparisons with other contextual approaches such as ELMo, XLNet, and RoBERTa. [XLNet](https://md.research.elamur.ai/free/en/papers/yang-2019-xlnet-generalized-autoregressive-pretraining-language/) · [RoBERTa](https://md.research.elamur.ai/free/en/papers/liu-2019-roberta-robustly-optimized-bert-pretraining/)

The authors also identify the stemmer as a component that could be improved. They recommend comparing with a version that makes fewer over-stemming errors. The measurements show the effects of using the stemmer that was available for these experiments. A different result might follow from rules that preserve distinctions that this stemmer merges. That is an open causal question, especially because favorable and unfavorable changes both appear in the news scores depending on the method and the other preprocessing operations.

The two intrinsic word lists reflect the authors’ response to the lack of a Nepali analogy dataset for their study. The design gives them a direct way to examine category recovery, at the cost of covering a smaller range of lexical phenomena. An analogy test would exercise relations among words in a different form. A broader group of semantic tests would also offer evidence on whether the specific result for kitchen and nature terms extends to distinctions with more overlap. The reported endpoint of 1 should be understood in relation to the supplied labels and the supplied inventory of words.

The authors treat the possible value of the vectors for sequence labeling as future work. Their relatedness results motivate interest in applications such as assigning grammatical labels to tokens or identifying and labeling names in running text. The paper’s supervised experiment classifies whole news articles. It does not measure either sequence-labeling task, so the relevant claim is that the word vectors are candidates for evaluation in those settings. [Named entity recognition](https://md.research.elamur.ai/free/en/concepts/named-entity-recognition/) · [Part-of-speech tagging](https://md.research.elamur.ai/free/en/concepts/part-of-speech-tagging/)

#### Limits visible in the experimental setup

The intrinsic groups offer a narrow view of lexical structure. Kitchen and nature test whether broad topical categories occupy separable regions. The sentiment list asks whether selected positive and negative words form distinct groups, including pairs whose ordinary association may bring them close together. The measurements say relatively little about whether a space preserves finer distinctions among words within a group. With several schemes at the Relatedness ceiling, the score also has no capacity to order those runs on that particular set. Their tie could coexist with differences relevant to other word inventories or semantic questions.

The out-of-vocabulary issue complicates comparison of the isolated words. GloVe and Word2Vec rely on a fixed vocabulary, whereas fastText and BERT can obtain representations through smaller units. The paper describes how averages are used to represent out-of-vocabulary items for the latter methods. It does not report a breakdown of purity by vocabulary coverage. A reader therefore cannot tell how much of a gap reflects the placement of words represented directly and how much reflects differences in whether a form can be represented or how that representation is constructed. The published scores characterize each pipeline as used.

The strongest apparent advantage of a contextual encoder is difficult to evaluate with isolated words. Averaging the last two layers yields a usable vector for clustering. In the absence of a sentence, the experiment has no contrasting occurrences of the same form for BERT to disambiguate. The news task does include article text, but the averaging layer strips away the sequence of output positions before the classifier makes a category decision. Together the tests evaluate isolated and pooled representations. Their design leaves open how well the same encoder would support decisions that depend directly on an individual word’s sentence context.

The downstream result concerns a specific small-label regime, a specific split of the public news data, and a simple classifier limited to the first five hundred tokens. The paper reports aggregate test scores and variation across preprocessing schemes. It does not report how much a score varies if the labeled articles are sampled again or if training is repeated under the same scheme. Small rankings among neighboring scores should therefore be read as rankings of the reported runs. The variation across schemes measures sensitivity to preparation choices under the study’s conditions. It does not estimate reproducibility for a fixed configuration.

News is an important part of the training corpus as well as the downstream task. That makes the task a way to assess transfer from general unlabeled material to a supervised problem in a familiar genre. The paper describes deduplication within the pooled pretraining material and gives no cross-corpus overlap measurement for the classifier dataset. Accordingly, the contribution of shared source material cannot be quantified from the reported evaluation. The study also does not train comparable vectors on each source separately, so the scores cannot isolate what the mixed-genre material added beyond the news sources.

The authors expect normalization to help more on social media posts and blogs, where they anticipate more spelling variation. The evaluation uses published articles, so that expectation remains a proposal for a different dataset. Similarly, the strongest clustering result for positive and negative vocabulary leaves open how well the representations would support classification of sentiment in passages. Neither outcome can be inferred simply by treating the intrinsic purity or news macro F1 as a general measure of useful Nepali understanding.

Finally, the earlier Nepali resources provide historical context, while the empirical comparisons are among the NPVec1 variants and the labeled-only classifier. The paper describes the previous corpora as smaller and narrower in source coverage. It does not use those earlier pretrained vectors as head-to-head baselines on the word lists and news split. The evidence for the release’s scale and preprocessing coverage is therefore distinct from evidence of performance under controlled comparison. The latter is strongest where the paper holds the evaluation and learning procedure steady and varies the input treatment.

### What came after

A later citing study, by Regmi, examines Nepali lemmatization with multilingual Transformers. Lemmatization maps an inflected word form to its conventional base entry, or lemma. This shifts the role of word normalization in the research question. In NPVec1, reducing forms to a common stem is a preparation choice whose consequences are judged by clustering and news classification. In Regmi’s study, recovery of the base entry is itself the linguistic task. The shared concern is how to handle several written forms that belong together while preserving distinctions that matter for evaluation. [Lemmatization](https://md.research.elamur.ai/free/en/concepts/lemmatization/)

The later study describes both intrinsic and extrinsic evaluation in a low-resource setting. This continues a distinction central to NPVec1 between testing a language resource directly and examining it in a wider application. The later work’s focus on multilingual Transformers also puts contextual representations at the center of a study about word forms, whereas NPVec1 evaluates a contextual encoder alongside several fixed-vector methods. The citation connects the two studies. The later study’s stated scope leaves its use of any particular NPVec1 artifact unspecified. [Nepali Lemmatization with Multilingual Transformers](https://md.research.elamur.ai/free/en/papers/regmi-2026-nepali-lemmatization-multilingual-transformers-intrinsic/)

## Cite

Cite as Pravesh Koirala and Nobal B. Niraula. 2021. NPVec1: Word Embeddings for Nepali - Construction and Evaluation. Proceedings of the 6th Workshop on Representation Learning for NLP (RepL4NLP-2021).

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2021.repl4nlp-1.18](https://doi.org/10.18653/v1/2021.repl4nlp-1.18)

```bibtex
@inproceedings{koirala2021npvec1,
  title = {{NPVec1: Word Embeddings for Nepali - Construction and Evaluation}},
  author = {Pravesh Koirala and Nobal B. Niraula},
  booktitle = {Proceedings of the 6th Workshop on Representation Learning for NLP (RepL4NLP-2021)},
  year = {2021},
  doi = {10.18653/v1/2021.repl4nlp-1.18},
  url = {https://doi.org/10.18653/v1/2021.repl4nlp-1.18}
}
```

> 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)
