hunspell / hunspell

The most popular spellchecking library.

Home Page:http://hunspell.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature] Nouns lacking plural

discoleo opened this issue · comments

Nouns lacking plural

There are languages (e.g. Romanian) where certain nouns can lack the plural. However, the plural form may be in common usage.

It would be useful to define the basic rules for the nouns with plural and without plural, and then define a meta-rule:

# Nouns with Plural
SFX P n1
# ...

# Nouns which lack plural, but behave otherwise as "P"
SFX p n2
# ...

# Meta-Rule
SFX x p error = P

Suffixes can be added according to rule "P":

  • in strict mode, this is an error, as these nouns do not have a plural form;
  • Hunspell can suggest the singular-form of the noun according to rule "p";
  • the user may also accept relaxed rules and accept the plural form (which may be in common usage);

Syntax

  • The syntax above may need some refinement;
  • It may be also useful to implement inheritance: rule "P" extends rule "p"; define first rule "p"; then rule "P" will only define the plural forms and inherits everything else from rule "p".