hunspell

conflict in check compound pattern


I have this dictionary and affix file for the word

भानूत्सवः

and it is working correctly.

# cat dicts/sa.dic
2
भानु/x
उत्सवः/x

# cat dicts/sa.aff
SET UTF-8
COMPOUNDMIN 1
COMPOUNDFLAG x

CHECKCOMPOUNDPATTERN 1
CHECKCOMPOUNDPATTERN  ु उ  ू

But the same word is marked as incorrect if I add this entry

CHECKCOMPOUNDPATTERN  ा आ ा

I do not see any reason why adding an entry should mark the word incorrect that was previously considered accurate. How are these 2 statements conflicting with each other?


Solution

  • This is probably due to the fact that the replacement character is the same as the so-called endchars ( ा आ ा). If you change it with something else it works.

    From the documentation:

    CHECKCOMPOUNDPATTERN number_of_checkcompoundpattern_definitions
    CHECKCOMPOUNDPATTERN endchars[/flag] beginchars[/flag] [replacement]
    Forbid compounding, if the first word in the compound ends with endchars, and next word begins with beginchars and (optionally) they have the requested flags. The optional replacement parameter allows simplified compound form. Note: COMPOUNDMIN doesn't work correctly with the compound word alternation, so it may need to set COMPOUNDMIN to lower value.