Morphed words + Compound = trouble

  • Arno Teigseth
    Arno Teigseth

    Hi I'm writing a new hunspell dictionary for Kichwa, spoken in Ecuador.

    Kichwa is an aglutinate language and what is causing me problems are the verbs. They consist basically of a stem+conjugation+compound[s].

    An example:

    My aff file:
    COMPOUNDBEGIN < # start comp
    COMPOUNDMIDDLE - # middle comp
    COMPOUNDEND > # end comp

    SFX v Y 1        #Verbs, conjugation
    SFX v na ni/< na      # Present 1st person singular

    My dic file

    kuyana = to love.
    pash= and, also
    kuyani = i'm loving
    kuyanapash = loving, too
    kuyanipash = i'm loving too.

    Now, the last one does not pass hunspell, whereas all the other do. All are of course valid words in Kichwa.

    Is it possible to make <Morphed word>+<compound> pass? Or if not, any suggestions for workarounds?

    I also have some issues with more than twofold suffixes, but that's maybe another story... Baybe I should open a new thread. Well:

    I need as far as I can see 3 suffixes:
    kuyana -> kuyani = 1 affix/morph # infinitive ->1st person
    kuyani -> kuyarini = 2 affixes/morphs # 1st person + reflexive
    kuyani -> kuyarigrini = 3 affixes/morphs # 1st person + reflexive + future

    and on top/back of that compounds...
    kuyarigrinipash = "I'm going to love myself, too"

    That's about as hard as it gets in Kichwa. But if I could only get morph+compound to pass, it could be settled with about only 9 different twofold morphs per verb...

    • For an affix to appear inside a compound, you need to flag it with COMPOUNDPERMITFLAG. Try this affix file:

      COMPOUNDBEGIN < # start comp                                                   
      COMPOUNDMIDDLE - # middle comp                                                 
      COMPOUNDEND > # end comp                                                       
      COMPOUNDPERMITFLAG P                                                           
      SFX v Y 1        #Verbs, conjugation                                           
      SFX v na ni/<P na      # Present 1st person singular

      • Arno

        Mange takk!

        hunspell -m :
        kuyanipash  pa:kuyani st:kuyana # Present 1st person singular pa:pash

        Excellent. I understood that the COMPOUNDPERMITFLAG meant a compound inside/before the affix:

        stem+compound+affix . But it was the opposite :) Thank you.

        I'll make a new thread with the other problem, to keep them apart.

        • Arno Teigseth
          Arno Teigseth

          Hmm still seems to be a problem with twofold suffix stripping+compounding:

          COMPOUNDEND >
          COMPOUNDMIN 1

          SFX Y Y 1
          SFX Y 0 B/+ .

          SFX X Y 1
          SFX X 0 A/Y+ .


          results no-good when trying stem+affix+affix+compound: [hunspell -m ]
          stem  st:stem
          stemA  st:stem fl:X
          stemB  st:stem fl:Y
          stemC  pa:stem st:stem pa:C
          stemAC  pa:stemA st:stem fl:X pa:C
          stemBC  pa:stemB st:stem fl:Y pa:C

          the last is as you can see not recognized. Is this a bug, or a feature ;) ?

          • Hi,

            > the last is as you can see not recognized. Is this a bug, or a feature ;) ? 

            Unfortunately, it is the limitation of the recent version. A possible solution is to use combined affix (maybe only in compounds by ONLYINCOMPOUND and COMPOUNDBEGIN, see also tests/fogemorpheme.* example in the Hunspell distribution):

            ONLYINCOMPOUND c
            COMPOUNDBEGIN <

            SFX Y Y 2
            SFX Y 0 B/+ .
            SFX Y 0 AB/<c+ .