public class EnglishInflector extends java.lang.Object implements Inflector
Modifier and Type | Field and Description |
---|---|
protected Conjugator |
englishConjugator
English conjugator.
|
protected Pluralizer |
englishPluralizer
English pluralizer.
|
Constructor and Description |
---|
EnglishInflector() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
conjugate(java.lang.String infinitive,
VerbTense tense,
Person person)
Conjugate a verb from its infinitive, tense, and person.
|
java.lang.String |
pluralize(java.lang.String nounOrPronoun)
Pluralize a noun or pronoun.
|
java.lang.String |
pluralize(java.lang.String nounOrPronoun,
int number)
Pluralize a noun or pronoun.
|
protected Conjugator englishConjugator
protected Pluralizer englishPluralizer
public java.lang.String conjugate(java.lang.String infinitive, VerbTense tense, Person person)
conjugate
in interface Conjugator
infinitive
- The infinitive of the verb to inflect.tense
- The verb tense to generate.person
- The person (1st, 2nd, 3rd) to generate.public java.lang.String pluralize(java.lang.String nounOrPronoun)
pluralize
in interface Pluralizer
nounOrPronoun
- The singular form of the noun or pronoun.public java.lang.String pluralize(java.lang.String nounOrPronoun, int number)
pluralize
in interface Pluralizer
nounOrPronoun
- The singular form of the noun or pronoun.number
- The number for the noun or pronoun.