
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Zero-dependency Belarusian morphological analyzer
A fast, lightweight library for analyzing Belarusian words and their morphological properties.
npm install belmorph
import { MorphAnalyzer } from 'belmorph';
import { loadDict } from 'belmorph/node';
const morph = new MorphAnalyzer(loadDict()); // uses bundled dict/
const results = morph.parse('горад');
console.log(results[0].lemma); // 'горад'
console.log(results[0].tags.pos); // 'N' (noun)
// Inflect to different forms
results[0].inflect({ case: 'I', number: 'P' })?.word; // 'гарадамі'
// Full names and short codes are interchangeable
results[0].inflect({ case: 'instrumental', number: 'plural' })?.word; // 'гарадамі'
// Get all forms
const lexeme = results[0].lexeme;
console.log(lexeme.map(r => r.word));
import { MorphAnalyzer } from 'belmorph';
// Serve the dict/ folder as static files and point to it:
const morph = await MorphAnalyzer.init('/dict/');
// or from a CDN:
const morph = await MorphAnalyzer.init('https://cdn.example.com/dict/');
const results = morph.parse('горад');
When a word is not found in the dictionary, the analyzer falls back to suffix-based prediction — those results have predicted: true and may be less accurate.
| Method | Environment | Description |
|---|---|---|
new MorphAnalyzer(dict) | all | Construct from a pre-loaded DictData object |
MorphAnalyzer.init(baseUrl?) | all | Async factory — fetches and decompresses dict files over HTTP. Default base URL: '/dict/' |
loadDict(dir?) from belmorph/node | Node.js only | Synchronous filesystem load. Defaults to the bundled dict/ |
MorphAnalyzer.parse(word) returns an array of ParseResult objects. Each result has:
word — the inflected word formlemma — the dictionary formtags — grammatical properties (Grammeme interface, see src/tags.ts)predicted — whether the analysis was predictedinflect(target) — returns the form matching the given grammemes, or nulllexeme — all forms of the wordGrammeme values follow GrammarDB codes. Both short codes ('I') and full English names ('instrumental') are accepted by inflect().
The library requires a pre-built dictionary. To build it:
git submodule update --init
npm run build:dict
This will create the necessary dictionary files in the dict/ directory.
npm test # Run tests once
npm run test:watch # Run tests in watch mode
This project is dual-licensed:
See the LICENSE file for full details.
FAQs
Zero-dependency Belarusian morphological analyzer
We found that belmorph demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.