Looking for answers regarding converting adjectives into nouns in code. e.g., automagically using foo._state.universal
to create a method foo.getUniversality()
. Programming language is irrelevant, but here's an example end state in JavaScript:
import {getNounConversionOf} from '@servicenow/adjectivity';
getNounConversionOf('universal'); // => 'universality'
getNounConversionOf('order'); // => 'order'
getNounConversionOf('voracious'); // => 'voraciousness'
In English we use suffixes to express state/condition/quality. Examples for adjectives include -ity & -ness. Some words remain sans suffix regardless of state...
What’s are some efficient ways to implement a Node.js module that can accept an adjective & return its (potentially suffixed) noun form? pluralize uses an inline collection of tuples, e.g. [/* Pronouns */['I', 'we'],...]
. Is there potentially a better way, & if not, do you know of a solid resource for getting everything that’d be in those tuples?