2

Hunspell affix file may contain attribute TRY. What it does? The Hunspell documentation says:

Hunspell can suggest right word forms, when they differ from the bad input word by one TRY character. The parameter of TRY is case sensitive.

But I did not understand what it means. I have following affix and dictionary files:

.aff

SET UTF-8
TRY e

.dic

2
created
create

And Hunspell input:

create
*

created
*

sreate
& sreate 1 0: create

sreated
& sreated 1 0: created

crzated
& crzated 2 0: created, create

You can see, that words "sreate", "sreated", "crzated" differ from the right word forms by "s" and "z" characters. Why this happens?

Thank you in advance.

Artur
  • 628
  • 5
  • 15

1 Answers1

1

TRY states a set of letters that can be wrong. If a misspelled word differs from a word in the dictionary file by one of these letters, then Hunspell can suggest that dictionary word.

In your example, the letter e is mistaken as z in crzated. Hence Hunspell replaces z with e.

I'm not sure about sreate and sreated TBH.

Shradha
  • 2,232
  • 1
  • 14
  • 26
  • What is MAXNGRAMSUGS and MAXDIFF doing in this file? https://github.com/Shreeshrii/hindi-hunspell/blob/master/Hindi/hi_IN.aff – shantanuo Jan 17 '21 at 09:38