Logo Lanfrica

nifaliana/tanisa

Domain:

natural language processing

Record type:

softwaretools
Creator:
nif
Host:
A utility to convert Malagasy numbers, dates, and times into their word representations # tanisa **Tanisa** is here to give those digits a voice, transforming them into elegant Malagasy words πŸ‡²πŸ‡¬. **In simpler terms** : A utility to convert Malagasy numbers, dates, and times into their word representations. ## Features - βœ… **Handles whole numbers** : From a humble "aotra" (zero) to numbers that make your calculator sweat. - βœ… **Decimal support** : Gracefully converts those pesky fractions into spoken form. - βœ… **Large number linguistics**: Tackles big numbers with the appropriate Malagasy terminology. - βœ… **Date formatting** : Converts dates to Malagasy short or long spoken form. - βœ… **Time formatting** : Converts times to Malagasy spoken time with the correct time-of-day period. - βœ… **User-friendly API** : So intuitive, you'll feel like you've been speaking number-words your whole life. - βœ… **Configurable options** : Customize conversion behaviour for decimals, date format, and time precision. - πŸ›‘οΈ **Error Handling** : Throws helpful errors when you try to feed it something it can't digest. ## Installation ```bash yarn add tanisa # or npm install tanisa ``` ## Usage ```ts import { Tanisa } from 'tanisa' const tanisa = new Tanisa() ``` --- ## `.toWords(input, options?)` Converts a number (or numeric string) to its Malagasy word representation. ```ts tanisa.toWords(233) // "telo amby telopolo sy roanjato" tanisa.toWords(18.3) // "valo ambin'ny folo faingo telo" tanisa.toWords(0.008) // "aotra faingo aotra aotra valo" tanisa.toWords(12_345_678_901) // "iraika amby sivinjato sy valo arivo sy fito alina sy enina hetsy sy dimy tapitrisa // sy efatra safatsiroa sy telo tsitamboisa sy roa lavitrisa sy iray alinkisa" ``` ### Options | Option | Type | Default | Description | | :-------------- | :-------- | :---------------- | :---------------------------------------------------------------------------------------------------- …