El 15/08/13 01:35, Marco A.G.Pinto escribió:
> I have finally been able to code the suffix code into my tool, thanks
> to the trouble Ricardo had of explaining the rules to me.


Great! :-)


> However, I still haven't coded the prefix code because I would have to
> think backwards.
> 
> Is there a word or two which you could tell me from the English
> dictionary that uses prefixes? That way I would have a way to test
> while decoding it.


The prefix "un" prepended to, for instance, the word "friendly" could
be one. I've browsed the en-US dictionary files for Mozilla and I've
found the samples coded as this:

friendly/PUTR

PFX U Y 1
PFX U   0     un         .


So you remove 0 letters from the beginning of the word, add "un" and
there is no condition. P, T and R are suffixes, so I omit them.


> Ricardo, just one little question: in my last mail I had the rules
> described such as:
> *SFX D Y 25*
> You told me that if instead of a "Y" we would have a "N", it would
> only use that one.*
> *Does that mean I should first look for a "N" and if found it would
> only use it, and ignore all the "Y"s?


To be honest, I had to dig into the same hunspell4.pdf file you have.
Re-reading the document, it seems clear that any given word featuring
prefixes and suffixes can form a derivative word in the following ways:

- using a prefix rule
- using a suffix rule
- using a prefix rule AND a suffix rule

As a side note, you can't use two or more prefixes, nor two or more
suffixes (except by using twofold stripping, which is something
different).

However, there may be prefixes that don't allow themselves to be mixed
with suffixes. In that case, you would flag the prefixes with "N" in
the affix header.

The same works if you exchange the position of prefix and suffix in
the previous paragraph.

Consider this unreal example:

work/VFS

SFX V N 3 # Verb conjugation; it can't be used with other flags
SFX V 0 s    .
SFX V 0 ed   .
SFX V 0 ing  .

PFX F Y 1 # Farm-related
PFX F 0 farm .

SFX S Y 4
SFX S   y     ies        [^aeiou]y
SFX S   0     s          [aeiou]y
SFX S   0     es         [sxzh]
SFX S   0     s          [^sxzhy]

So you would end with:

work
works # For both V and S affixes
worked
working
farmwork
farmworks # For F and S affixes

However, would the prefix F have been flagged as "N":

PFX F N 1 # Farm-related

"farmworks" wouldn't have been considered as valid.

You should read about twofold stripping, too. It is basically like
flagging an affix as having an additional affix (of the same class, I
think).

Best regards.

-- 
Ricardo Palomares (RickieES)
Diaspora: https://diasp.eu/u/rickiees
Skype: rickie0341971
Jabber: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to