Number of max rules for CHECKCOMPOUNDPATTERN?

65 Views Asked by At

I have this affix and dic file that is working as expected.

cat sa_IN.aff

SET UTF-8
COMPOUNDFLAG X
MAXCPDSUGS 0

CHECKCOMPOUNDPATTERN 1
CHECKCOMPOUNDPATTERN त् अ द

And the wordlist...

cat sa_IN.dic

2
आश्रयेत्/X
अस्मान्/X

This word is considered correct.

spellchecker.spell('आश्रयेदस्मान्')

But if I add rules to CHECKCOMPOUNDPATTERN flag then the same word is marked as incorrect. Is there a limit on CHECKCOMPOUNDPATTERN?

How many rules are allowed?


Update:

If I read the first 31452 lines then both the words return True.

spellchecker.spell('अस्मानाश्रयेत्')
spellchecker.spell('आश्रयेदस्मान्')

But if I add next 1000 lines, then both the words return False.

CHECKCOMPOUNDPATTERN 32452

Does it mean there is some problem between 31 and 32 thousand lines?

The affix file is available here...

https://github.com/shantanuo/stack_question/blob/master/sa_IN.aff


Using this python code. I have also checked using firefox extension and I am getting same results in both.

import hunspell

spellchecker = hunspell.HunSpell(
    "./sa_IN.dic",
    "./sa_IN.aff",
)

spellchecker.spell('अस्मानाश्रयेत्')
0

There are 0 best solutions below