Thanks Marcin

I "stole" some unifications from Polish grammar.xml, adjusted them to
Ukrainian tags and created a rule to check if noun and adjective gender is
consistent:
               <pattern>
                   <unify negate="yes">
                        <feature id="gender"></feature>
                        <token postag_regexp="yes" postag="adj:.*"></token>
                        <token postag_regexp="yes" postag="noun:.*"></token>
                    </unify>
                </pattern>

And if the word has only one gender it works, but if I have a word that can
be of different gender it triggers false error, e.g. for this dictionary:

nounA noun_base1 noun:m:v_naz
nounA noun_base2 noun:f:v_rod
adjectiveA adj_base1 adj:m:v_naz

"m" - masculine
"f" - feminine

this rule will trigger an error (as it finds at least one noun gender
that's different from adjective's), I would need something like "if there's
no match for gender exist" then trigger.

Is there any easy/right way to adjust the rule to match this requirement?

Thanks
Andriy


2013/4/22 Marcin Miłkowski <[email protected]>

> W dniu 2013-04-22 04:05, Andriy Rysin pisze:
> > Question about grammar rules: I'd like to write a rule that makes sure
> > the gender and case of the adjective and noun match. But the same word
> > may represent different gender/case for both adjective and (to a less
> > degree) noun. Ukrainian has 7 cases and 3 genders so it'll take a lot of
> > lines to cover all rules doing it manually.
>
> Use unification.
>
> http://wiki.languagetool.org/using-unification
>
> Lots of examples are to be found in the Polish grammar file, and in the
> Catalan one.
>
> Best,
> Marcin
>
>
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> _______________________________________________
> Languagetool-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/languagetool-devel
>
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Languagetool-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-devel

Reply via email to