2014-07-02 15:03 GMT+02:00 Marco A.G.Pinto <marcoagpi...@mail.telepac.pt>:
> Dear Daniel,
>
> I wrote the e-mail at near 7am and I was half asleep, then I returned to
> bed at 8pm and got up moments ago.
>
> It was not a gender rule but a singular/plural rule.
>
> For example:
> o=singular (male)
> os=plural (male)
>
> the same for
> a=singular (female)
> as=plural (female)
>
> What I am trying to code is to check if someone uses the wrong
> singular/plural before a word.
>
> For example:
> amigo=male singular
> if it ends with an "s" or "os" it is plural with the exception of a few
> male names: "SatanĂ¡s", "Marcos" and "Deus", the ones that come to mind
> right now.
>
> After I create this singular/plural rule, then I want to check the gender
> to go even further.
>
> Is this still done with the code you mentioned?
>
> I just need to do some university work and then I will try to add rules to
> the pt_PT.
>
Hi Marco,
I don't know how the Portuguese dictionary is built, but if it includes
part-of-speech tags, you can probably reuse this Catalan rule for what you
need: instead of relying on regular expressions for the words, it looks at
the PoS tag. You will only need to change the TAG strings to the ones you
use in the Portuguese version.
determinant_nom_estricte: [1]
I've just copied the rule from the Catalan grammar.xml [2]
[1] https://gist.github.com/xavivars/b3f96583a18621a8c582
[2]
https://github.com/languagetool-org/languagetool/blob/master/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/grammar.xml
--
< Xavi Ivars >
< http://xavi.ivars.me >
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel