Hi, we are working on a Turkish Hunspell dictionary and affix file, I have a
question about 2 fold affix stripping.

Below is an example affix file for 2 basic suffixes for Turkish, Plural
(-ler -lar) and direction (-e , -a).

My question is , Hunspell supports 2 fold suffix stripping, so it sounds it
should be possible to define suffix combinations like -ler-e and -lar-a  (as
in kedilere = to cats elmalara = to apples )

But on my tests :

[EMAIL PROTECTED]:~$ hunspell -m -d turkish
kedi
kedi  st:kedi
kediler
kediler  st:kedi fl:L
kedilere
kedilere  st:kedi fl:L fl:E
kedilera
kedilera  st:kedi fl:L fl:E

Though it worked for "kedilere", the word "kedilera" is definitely wrong. It
seems it does not care about the rules defined for the second suffix, so
does this mean that the rules defined for suffixes (like  SFX E1 0 ye
[eiöü]) only valid if suffix is attached to a word but not valid if it is
attached to another suffix?

If it is the second case, we'll have to define combinations of suffixes as
different affix rules like:

SFX L1 0 lere [eiöü]
...

thanks for any help,

Mehmet



example dictionary (turkish.dic):

3
kedi/L0E1C1S1
elma/L0E1C1S1
dolap/L0E2C1S2

turkish.aff :

LANG tr_TR
SET UTF-8
TRY İiIıŞşÇçĞğÜüÖö-qwertyuopasdfghjklzxcvbnmQWERTYUOPASDFGHJKLZXCVBNM'

# Names, plural suffixes. -ler -lar
# if last vowel is (eiöü) -lar is appended
# if last vowel is (aıou) -lar is appended
# Examples: kedi-ler elma-lar Kurt-lar
SFX L0 Y 6
SFX L0 0 ler/E1 [eiöü]
SFX L0 0 ler/E1 [eiöü][^aeioöuü]
SFX L0 0 ler/E1 [eiöü][^aeioöuü][^aeioöuü]
SFX L0 0 lar/E1 [aıou]
SFX L0 0 lar/E1 [aıou][^aeioöuü]
SFX L0 0 lar/E1 [aıou][^aeioöuü][^aeioöuü]

# Names, direction -e -a
# if last vowel is (eiöü) -e is appended sepet-e
# if last vowel is (aıou) -a is appended salon-a
# if last letter of word is a vowel, and extra y appended elma-ya or kedi-ye
# if word has more than 1 sounds, last consonant is (pçtk) and comes after a
vowel,
#    it transforms into (bcdğ) dolap-a -> dolab-a.
SFX E1 Y 6
SFX E1 0 ye [eiöü]
SFX E1 0 e [eiöü][bcdfgğhjlmnrsşvyz]
SFX E1 0 e [eiöü][^aeioöuü][bcdfgğhjlmnrsşvyz]
SFX E1 0 ya [aıou]
SFX E1 0 a [aıou][bcdfgğhjlmnrsşvyz]
SFX E1 0 a [aıou][^aeioöuü][bcdfgğhjlmnrsşvyz]

SFX E2 Y 8
SFX E2 p ba [aıou]p
SFX E2 ç ca [aıou]ç
SFX E2 t da [aıou]t
SFX E2 k ğa [aıou]k
SFX E2 p be [eiöü]p
SFX E2 ç ce [eiöü]ç
SFX E2 t de [eiöü]t
SFX E2 k ğe [eiöü]k

Reply via email to