french-determiners
v5.3.0
Published
French determiners
Downloads
1,501
Readme
french-determiners
A simple Node.js module that contains French determiners.
For instance le is the definite article for masculine singular.
It exposes a single function, getDet
, that takes as argument an object of type:
{
detType: DetType;
genderOwned: Genders;
numberOwned: Numbers;
numberOwner?: Numbers;
personOwner?: Persons;
adjectiveAfterDet?: boolean;
contentAfterDet?: string;
forceDes?: boolean;
}
where
- detType: determiner type (string, mandatory):
DEFINITE
INDEFINITE
DEMONSTRATIVE
orPOSSESSIVE
- genderOwned: gender of the object (string, mandatory):
M
for masculine,F
for feminine - numberOwned: number of the object (string, mandatory):
S
for singular,P
for plural - numberOwner: number of the owner of the object (mandatory when
POSSESSIVE
, put null otherwise):S
orP
- personOwner: person of the owner of the object (mandatory when
POSSESSIVE
, put null otherwise): 1, 2 or 3 - when
INDEFINITE
plural followed by an adjective: ** adjectiveAfterDet: optional boolean indicating if there is an adjective after the determiner (used to managede bons restaurants
) ** contentAfterDet: optional string containing the content of what is after (used to manage exceptiondes jeunes gens
) ** forceDes: optional boolean indicatif to forcedes
, even whende
should be output
Installation
npm install french-determiners
Usage
var determiners = require('french-determiners');
// la
console.log(determiners.getDet({ detType: 'DEFINITE', genderOwned: 'F', numberOwned: 'S' }));
// ses
console.log(
determiners.getDet({ detType: 'POSSESSIVE', genderOwned: 'M', numberOwned: 'P', numberOwner: 'S', personOwner: 3 }),
);
See test.js
for examples.
dependencies and licences
no dependency