New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

grammaticalnumber

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grammaticalnumber

Determining whether a number (integer or floating point) should be treated as singular, plural, or paucal. Slavic languages may treat some plural numbers as a grammatical singular, and may use a second grammatical plural, called paucal.

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
0
-100%
Maintainers
0
Weekly downloads
 
Created
Source

grammaticalnumber

"1 čovjek", "3 čovjeka", "5 ljudi".

A function for determining whether a number (integer or floating point) should be treated as singular, plural, or paucal.

In Slavic languages such as Bosnian, Croatian, and Serbian, certain numbers (2, 3, 4) have a different grammatical form from other plural values. This form is called paucal.

Additionally, certain plural numbers, such as 11, are gramatically treated as singular.

The function determineGrammaticalNumber takes a positive or negative number as argument and returns one of the following strings: 'singular', 'plural', 'paucal'.

This string can then be used in determining which resource text to use with the number. In Bosnian and Croatian, one might write "1 čovjek", "3 čovjeka", or "5 ljudi".

Examples of usage:

determineGrammaticalNumber(301); // returns 'singular'

determineGrammaticalNumber(9); // returns 'plural'

determineGrammaticalNumber(23); // returns 'paucal'

Special thanks to Emina Kamenarević and Alma Sarajlić for their linguistic guidance.

Keywords

paucal

FAQs

Package last updated on 20 Jul 2024

Did you know?

Socket

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.

Install

Related posts