You can add exception to this rule.
This exception guaranted what word has one pos tag   (NCFS000).

http://wiki.languagetool.org/tips-and-tricks#toc12



   <!-- Concordance gender - UM > UMA -->
    <rule id="UM_UMA" name="Erro de concordância UM-UMA">
      <pattern>
        <marker>
            <token>um</token>
        </marker>
        <token postag="NCFS000"><exception postag="NCFS000" 
negate_pos="yes"></exception></token>
     </pattern>
     <message>Erro de concordância um/uma.</message>
     <suggestion>uma</suggestion>
     <example correction="uma">Quero <marker>um</marker> foto dela.</example>
    </rule> 


-- 
Yakov Reztsov


Вторник,  5 мая 2015, 12:36 +01:00 от "Marco A.G.Pinto" <>:
>Hello!
>
>I have received the "hits" of LanguageTool and the two
    masculine/feminine rules I have created (um > uma AND uma >
    um) generate lots of false positives:
>http://languagetool.org/regression-tests/20150504/result_pt_20150504.html
>
>The sentence:
>"A sua ideia de luz quântica foi um corte com a Física clássica."
>
>"um corte" suggests "uma".
>
>I checked the morphologic structure in LanguageTool's site and
    "corte" appears as:
>NCFS000 
>NCMS000 
>
>It is both masculine and feminine.
>
>The XML code I have is:
>
>    <!-- Concordance gender - UM > UMA -->
>    <rule id="UM_UMA" name="Erro de concordância UM-UMA">
>      <pattern>
>        <marker>
>            <token>um</token>
>        </marker>
>        <token postag="NCFS000"></token>
>     </pattern>
>     <message>Erro de concordância um/uma.</message>
>     <suggestion>uma</suggestion>
>     <example correction="uma">Quero
      <marker>um</marker> foto dela.</example>
>    </rule>     
>
>    <!-- Concordance gender - UMA > UM -->
>    <rule id="UMA_UM" name="Erro de concordância UMA-UM">
>      <pattern>
>        <marker>
>            <token>uma</token>
>         </marker>
>         <token postag="NCMS000"></token>
>     </pattern>
>     <message>Erro de concordância uma/um.</message>
>     <suggestion>um</suggestion>
>     <example correction="um">Quero
      <marker>uma</marker> carro novo.</example>
>    </rule>     
>
>
>There are other examples:
>"uma importante" in which "importante" appears as:
>AQ0CS0 
>NCMS000
>
>
>How shall I do it?
>
>Thanks!
>
>Kind regards,
>     >Marco A.G.Pinto
>       ----------------------
>
>-- 


-- 

Yakov Reztsov
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel

Reply via email to