@farscrl/rumantsch-language-tools
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Rumantsch language tools

Welcome to the Rumantsch Language Tools repository! This collection of tools is designed to aid in working with the Rumantsch (Romansh) language. Currently, it includes:

  • Tokenizer: A tool for breaking down text into individual tokens (based on stdlib-js/nlp-tokenize)
  • Spellchecking: Utilizing hunspell for accurate and correct spelling. Currently, it supports rm-surmiran with more idioms coming soon. The dictionary files are loaded from an external host.

Feel free to explore and utilize these tools for your Rumantsch language-related projects. Happy linguistic exploration!

Usage

Tokenizer

import { Tokenizer } from "@farscrl/rumantsch-language-tools";
Tokenizer.tokenize('In test dal tokenizer.')

Proofreader

import { Proofreader } from '@farscrl/rumantsch-language-tools';
const surmiran = await Proofreader.CreateProofreader('rm-surmiran');
await surmiran.proofreadText('Text correct'); // returns []
await surmiran.proofreadText('in'); // returns [{'length': 2, 'offset': 0, 'word': 'in'}]

Tests

Tests are based on vitest. To execute them, run npm test.

Package Sidebar

Install

npm i @farscrl/rumantsch-language-tools

Weekly Downloads

3

Version

1.0.2

License

MIT

Unpacked Size

20.7 kB

Total Files

16

Last publish

Collaborators

  • rumantsch
  • gion-andri