Revision: 7440
http://languagetool.svn.sourceforge.net/languagetool/?rev=7440&view=rev
Author: jaumeortola
Date: 2012-06-21 12:27:26 +0000 (Thu, 21 Jun 2012)
Log Message:
-----------
[ca] Fix false alarms in HAVER_PARTICIPI_HAVER_IMPERSONAL.
Modified Paths:
--------------
trunk/JLanguageTool/src/resource/ca/disambiguation.xml
trunk/JLanguageTool/src/rules/ca/grammar.xml
Modified: trunk/JLanguageTool/src/resource/ca/disambiguation.xml
===================================================================
--- trunk/JLanguageTool/src/resource/ca/disambiguation.xml 2012-06-20
22:04:37 UTC (rev 7439)
+++ trunk/JLanguageTool/src/resource/ca/disambiguation.xml 2012-06-21
12:27:26 UTC (rev 7440)
@@ -356,9 +356,9 @@
<rule>
<pattern>
<marker>
- <token inflected="yes" skip="12">fer<exception
scope="next" regexp="yes">,|que</exception></token>
+ <token postag="V.[IS].*" inflected="yes"
skip="12">fer<exception scope="next" regexp="yes">,|que</exception></token>
</marker>
- <token postag="NC.*" postag_regexp="yes" inflected="yes"
regexp="yes">segon|minut|hora|dia|setmana|mes|(tri|quadri)mestre|any|lustre|dècada|segle|mil·leni|moment|instant|temps</token>
+ <token postag="NC.*" postag_regexp="yes" inflected="yes"
regexp="yes">segon|minut|hora|dia|setmana|mes|(tri|quadri|se)mestre|any|lustre|dècada|segle|mil·leni|moment|instant|temps</token>
</pattern>
<disambig action="filter" postag="</LOC_ADV>"></disambig>
</rule>
@@ -608,7 +608,7 @@
<rulegroup id="sigles" name="sigles">
<rule>
<pattern>
- <token regexp="yes">[1234567890]+</token>
+ <token regexp="yes">[1234567890]+|/</token>
<marker>
<token>ha</token>
</marker>
@@ -741,7 +741,7 @@
</rule>
<rule id="nom_vocals" name="el nom de les vocals">
<pattern>
- <token>la</token>
+ <token regexp="yes">la|una</token>
<marker>
<token regexp="yes">a|e|i|o|u</token>
</marker>
@@ -919,11 +919,11 @@
<marker>
<and>
<token postag="V.[IS].2S0" postag_regexp="yes" />
- <token postag="N.*" postag_regexp="yes" />
+ <token postag="N.*|A.*|V.P.*" postag_regexp="yes" />
</and>
</marker>
</pattern>
- <disambig action="filter" postag="[^V].*" />
+ <disambig action="filter" postag="N.*|A.*|V.P.*" /> <!-- les ha
vistes estenent la roba -->
</rule>
</rulegroup>
<rule id="nAdverbi" name="no verb">
@@ -1056,6 +1056,28 @@
</pattern>
<disambig action="add"><wd pos="_GV_"></wd></disambig>
</rule>
+ </rulegroup>
+ <rulegroup id="haver_hi_auxiliar" name="haver-hi auxiliar">
+ <rule>
+ <pattern>
+ <token>hi</token>
+ <marker>
+ <token inflected="yes">haver</token>
+ </marker>
+
+ </pattern>
+ <disambig action="filter" postag="VA.*"></disambig>
+ </rule>
+ <rule>
+ <pattern>
+ <marker>
+ <token inflected="yes">haver</token>
+ </marker>
+ <token>-hi</token>
+ </pattern>
+ <disambig action="filter" postag="VA.*"></disambig>
+ </rule>
+
</rulegroup>
<rule id="DESPRES" name="després no participi">
<pattern>
@@ -1683,16 +1705,7 @@
<match no="2" postag_regexp="yes" postag="V.[GP].*"></match>
</disambig>
</rule>
- <rule id="VERB_PREPOSICIO" name="verb + preposició">
- <!-- mogut per "haver acabat"; excepció: per tal d'aconseguir els seus
fins-->
- <pattern>
- <token postag="V.*" postag_regexp="yes"><exception postag="N.*"
postag_regexp="yes"/></token>
- <marker>
- <token postag="SPS00" postag_regexp="yes"></token>
- </marker>
- </pattern>
- <disambig action="filter" postag="SP.*"></disambig>
- </rule>
+
<!-- hi haver + nom/verb Hi ha alzines-->
<rule id="haver_nom" name="haver + nom">
@@ -3009,7 +3022,7 @@
<rule>
<pattern>
<marker>
- <token postag="R[GN].*" postag_regexp="yes"><exception
regexp="yes">que|però|tant|poc|molt|tan</exception></token>
+ <token postag="R[GN].*" postag_regexp="yes"><exception
regexp="yes">fins|que|però|tant|poc|molt|tan</exception></token>
</marker>
<token postag="AQ.*|V.P.*" postag_regexp="yes"></token>
</pattern>
@@ -3017,7 +3030,7 @@
</rule>
<rule>
<pattern>
- <token postag="R[GN].*" postag_regexp="yes"><exception
regexp="yes">que|però|tant|poc|molt|tan</exception></token>
+ <token postag="R[GN].*" postag_regexp="yes"><exception
regexp="yes">fins|que|però|tant|poc|molt|tan</exception></token>
<marker>
<token postag="AQ.*|V.P.*" postag_regexp="yes"></token>
</marker>
@@ -4071,6 +4084,17 @@
</pattern>
<disambig action="filter" postag="V.P.*|AQ.*"></disambig>
</rule>
+ <rule id="VERB_PREPOSICIO" name="verb + preposició">
+ <!-- mogut per "haver acabat"; excepció: per tal d'aconseguir els seus
fins; per a aconseguir fins dignes d'aconseguir-se-->
+ <!-- mogut per "aconseguir fins dignes";-->
+ <pattern>
+ <token postag="V.*" postag_regexp="yes"><exception postag="N.*"
postag_regexp="yes"/></token>
+ <marker>
+ <token postag="SPS00" postag_regexp="yes"><exception
postag="_GN_.*" postag_regexp="yes"/></token>
+ </marker>
+ </pattern>
+ <disambig action="filter" postag="SP.*"></disambig>
+ </rule>
<rulegroup id="PP_VERB" name="pronom personal seguit de verb">
<!-- pronom personal + verb. Mogut per "en obres properes" -->
<!-- estudiar concordances de persona i nombre!!!!!! <exception
postag="D.*" postag_regexp="yes"/> -->
@@ -4445,7 +4469,7 @@
</and>
</marker>
</pattern>
- <disambig action="filter" postag="N.*"></disambig>
+ <disambig action="filter" postag="N.*|A.*"></disambig>
</rule>
<rule id="PrepNom" name="prep + nom: prep. Ex: contra"> <!-- potser no és
prep.: cap -->
<pattern>
Modified: trunk/JLanguageTool/src/rules/ca/grammar.xml
===================================================================
--- trunk/JLanguageTool/src/rules/ca/grammar.xml 2012-06-20 22:04:37 UTC
(rev 7439)
+++ trunk/JLanguageTool/src/rules/ca/grammar.xml 2012-06-21 12:27:26 UTC
(rev 7440)
@@ -574,7 +574,7 @@
<feature id="nombre" />
<feature id="genere" />
<marker>
- <token postag="V.P.*"
postag_regexp="yes"><exception postag="_GV_" /><exception inflected="yes"
regexp="yes">anomenar|dir|denominar</exception></token>
+ <token postag="V.P.*"
postag_regexp="yes"><exception postag="_GV_" /><exception inflected="yes"
regexp="yes">titular|anomenar|dir|denominar</exception></token>
<token postag="N.M.*"
postag_regexp="yes"><exception postag="_GN_.*" postag_regexp="yes" /></token>
</marker>
</unify>
@@ -595,7 +595,7 @@
<feature id="nombre" />
<feature id="genere" />
<marker>
- <token postag="V.P.*"
postag_regexp="yes"><exception postag="_GV_" /><exception inflected="yes"
regexp="yes">anomenar|dir|denominar</exception></token>
+ <token postag="V.P.*"
postag_regexp="yes"><exception postag="_GV_" /><exception inflected="yes"
regexp="yes">titular|anomenar|dir|denominar</exception></token>
<token postag="N.F.*"
postag_regexp="yes"><exception postag="_GN_.*" postag_regexp="yes" /></token>
</marker>
</unify>
@@ -1665,72 +1665,167 @@
<example type="correct">En deuen quedar tres.</example>
</rule>
</rulegroup>
- <rulegroup id="haver_participi_impersonal" name="Comprova: «haver» +
participi / «haver-hi» impersonal">
- <!-- falta admetre adverbi entre auxiliar i participi-->
+ <rulegroup id="HAVER_PARTICIPI_HAVER_IMPERSONAL" name="Comprova:
«haver» + participi / «haver-hi» impersonal">
+ <!-- Falta: haver (en infinitiu) + hi/participi -->
<rule>
<pattern>
- <token postag="VA..[12]..|VA..3P." postag_regexp="yes"
inflected="yes">haver<exception postag="VA..3S." postag_regexp="yes"
inflected="yes">haver</exception></token>
+ <token postag="VA..[12].." postag_regexp="yes"
inflected="yes">haver<exception postag="VA..3S." postag_regexp="yes"/></token>
<marker>
- <token postag="V.P.*" postag_regexp="yes"
negate_pos="yes"><exception postag="V.P.*"
postag_regexp="yes"></exception><exception
regexp="yes">de|d'</exception></token>
+ <token postag="V.P.*" negate_pos="yes"
postag_regexp="yes" regexp="yes">[\p{Ll}·]+<exception postag="V.P.*|RG"
postag_regexp="yes"></exception><exception
regexp="yes">de|d'</exception></token>
</marker>
</pattern>
- <message>Falta un participi. Podria ser: <suggestion><match
no="2" postag="V.P.*" postag_regexp="yes"></match></suggestion>.</message>
+ <message>Falta un participi. Podria ser: <suggestion><match
no="2" suppress_misspelled="yes" postag="V.P.*"
postag_regexp="yes"></match></suggestion>.</message>
<short>Falta un participi.</short>
<example type="incorrect">Hem
<marker>cantant</marker>.</example>
<example type="correct">Hem cantat.</example>
</rule>
<rule>
<pattern>
+ <token postag="VA..[12].." postag_regexp="yes"
inflected="yes">haver<exception postag="VA..3S." postag_regexp="yes"/></token>
+ <token postag="RG"/>
+ <marker>
+ <token postag="V.P.*" negate_pos="yes"
postag_regexp="yes" regexp="yes">[\p{Ll}·]+<exception postag="V.P.*"
postag_regexp="yes"></exception><exception
regexp="yes">de|d'</exception></token>
+ </marker>
+ </pattern>
+ <message>Falta un participi. Podria ser: <suggestion><match
no="3" suppress_misspelled="yes" postag="V.P.*"
postag_regexp="yes"/></suggestion>.</message>
+ <short>Falta un participi.</short>
+ <example type="incorrect">Hem pràcticament
<marker>esgotant</marker>.</example>
+ <example type="correct">Hem pràcticament esgotat.</example>
+ </rule>
+ <rule>
+ <pattern>
+ <token postag="VA..3S." postag_regexp="yes"
inflected="yes">haver</token>
+ <marker>
+ <token postag="V.[NG].*"
postag_regexp="yes"><exception postag="V.P.*|RG"
postag_regexp="yes"></exception><exception
inflected="yes">de</exception></token>
+ </marker>
+ </pattern>
+ <message>Falta un participi. Podria ser: <suggestion><match
no="2" postag="V.P.*" postag_regexp="yes"/></suggestion> o <suggestion>de
<match no="2" postag="V.N.*" postag_regexp="yes"/></suggestion>.</message>
+ <short>Falta un participi</short>
+ <example type="incorrect">No s'ha
<marker>realitzar</marker>.</example>
+ <example type="incorrect">No s'hi ha
<marker>realitzar</marker>.</example>
+ <example type="correct">No s'ha realitzat.</example>
+ </rule>
+ <rule>
+ <pattern>
+ <token postag="VA..3S." postag_regexp="yes"
inflected="yes">haver</token>
+ <token postag="RG"><exception>prou</exception></token>
+ <marker>
+ <token postag="V.[NG].*"
postag_regexp="yes"><exception postag="V.P.*"
postag_regexp="yes"></exception><exception
inflected="yes">de</exception></token>
+ </marker>
+ </pattern>
+ <message>Falta un participi. Podria ser: <suggestion><match
no="2" postag="V.P.*" postag_regexp="yes"/></suggestion> o <suggestion>de
<match no="2" postag="V.N.*" postag_regexp="yes"/></suggestion>.</message>
+ <short>Falta un participi</short>
+ <example type="incorrect">Aquell ha gairebé
<marker>desaparèixer</marker>.</example>
+ <example type="correct">Aquell ha gairebé
desaparegut.</example>
+ </rule>
+ <rule>
+ <pattern>
<token negate="yes">hi</token>
<marker>
<token postag="VA..3S." postag_regexp="yes"
inflected="yes">haver</token>
</marker>
- <token postag="V.P.*" postag_regexp="yes"
negate_pos="yes"><exception postag="V.P.*"
postag_regexp="yes"></exception><exception
regexp="yes">de|d'</exception></token>
+ <token postag="V.*" postag_regexp="yes" negate_pos="yes"
regexp="yes">[\p{Ll}·]+<exception postag="V.P.*|RG"
postag_regexp="yes"></exception><exception
inflected="yes">de</exception></token>
</pattern>
- <message>Falta un participi o «hi». Podria ser: <suggestion>hi
<match no="2" case_conversion="startlower"></match></suggestion>.</message>
+ <message>Falta el pronom «hi»: <suggestion>hi <match
no="2"/></suggestion>.</message>
<short>Falta un participi</short>
<example type="incorrect">No <marker>ha</marker>
cantants.</example>
<example type="correct">No hi ha cantants.</example>
</rule>
<rule>
<pattern>
- <token>hi</token>
- <token postag="VA..3S." postag_regexp="yes"
inflected="yes">haver</token>
+ <token negate="yes">hi</token>
<marker>
- <token postag="V.P.*" postag_regexp="yes"
negate_pos="yes"><exception postag="[^V].*"
postag_regexp="yes"></exception><exception
regexp="yes">de|d'</exception></token>
+ <token postag="VA..3S." postag_regexp="yes"
inflected="yes">haver</token>
</marker>
+ <token postag="RG"/>
+ <token postag="V.*" postag_regexp="yes" negate_pos="yes"
regexp="yes">[\p{Ll}·]+<exception postag="V.P.*"
postag_regexp="yes"></exception><exception
inflected="yes">de</exception></token>
</pattern>
- <message>Falta un participi. Podria ser: <suggestion><match
no="3" postag="V.P...." postag_regexp="yes"></match></suggestion>.</message>
+ <message>Falta el pronom «hi»: <suggestion>hi <match
no="2"/></suggestion>.</message>
<short>Falta un participi</short>
- <example type="incorrect">Ell hi ha
<marker>contribuint</marker>.</example>
- <example type="correct">Ell hi ha contribuït.</example>
- <!-- si hi ha un pronom personal, es poden eliminar les
pressuposicions d'impersonal: per fer -->
+ <example type="incorrect">No <marker>ha</marker> gairebé
ningú.</example>
+ <example type="correct">No hi ha gairebé ningú.</example>
</rule>
<rule>
+ <pattern>
+ <marker>
+ <token>hi</token>
+ <token postag="VA..3P." postag_regexp="yes"
inflected="yes">haver</token>
+ </marker>
+ <token><exception postag="V.P.*"
postag_regexp="yes"/><exception inflected="yes">de</exception></token>
+ </pattern>
+ <message>Cal escriure "haver-hi" en singular: <suggestion>hi
<match no="2" postag="(VA..3)P(.)" postag_regexp="yes"
postag_replace="$1S$2"/></suggestion></message>
+ <short>Expressió incorrecta</short>
+ <example type="incorrect">No <marker>hi han</marker>
bananes</example>
+ <example type="correct">No hi ha bananes</example>
+ <example type="correct">S'hi han de fer millores.</example>
+ <example type="correct">Hi han contribuït.</example>
+ </rule>
+ <rule>
+ <pattern>
+ <token negate="yes">hi</token>
+ <token postag="VA..3P." postag_regexp="yes"
inflected="yes">haver</token>
+ <marker>
+ <token postag="V.[^P].*" postag_regexp="yes"
regexp="yes">[\p{Ll}·]+<exception postag="V.P.*|RG"
postag_regexp="yes"></exception><exception
inflected="yes">de</exception></token>
+ </marker>
+ </pattern>
+ <message>Falta un participi. Podria ser: <suggestion><match
no="3" postag="V.P.*" postag_regexp="yes"/></suggestion> o <suggestion>de
<match no="3" postag="V.N.*" postag_regexp="yes"/></suggestion>.</message>
+ <short>Falta un participi.</short>
+ <example type="incorrect">Ells han
<marker>realitzar</marker>.</example>
+ <example type="correct">Ells han realitzat.</example>
+ </rule>
+ <rule>
+ <pattern>
+ <token negate="yes">hi</token>
+ <token postag="VA..3P." postag_regexp="yes"
inflected="yes">haver</token>
+ <token postag="RG"/>
+ <marker>
+ <token postag="V.[^P].*" postag_regexp="yes"
regexp="yes">[\p{Ll}·]+<exception postag="V.P.*|RG"
postag_regexp="yes"></exception><exception
inflected="yes">de</exception></token>
+ </marker>
+ </pattern>
+ <message>Falta un participi. Podria ser: <suggestion><match
no="4" postag="V.P.*" postag_regexp="yes"/></suggestion> o <suggestion>de
<match no="4" postag="V.N.*" postag_regexp="yes"/></suggestion>.</message>
+ <short>Falta un participi.</short>
+ <example type="incorrect">Ho han fermament
<marker>realitzar</marker>.</example>
+ <example type="correct">Ho han fermament realitzat.</example>
+ </rule>
+
+ <rule>
<!-- excepcions no controlades: a dit/ha dit-->
<pattern>
<marker>
- <token regexp="yes">e|as|em|eu</token>
+ <token regexp="yes">as|em|eu</token>
</marker>
<token postag="V.P.*" postag_regexp="yes"></token>
</pattern>
<message>Haver s'escriu amb h. Podria ser: <suggestion>h<match
no="1" case_conversion="startlower"></match></suggestion>.</message>
<short>Haver s'escriu amb h</short>
+ <example type="incorrect">Nosaltres <marker>em</marker>
discutit.</example>
+ <example type="correct">Hem discutit.</example>
+ </rule>
+ <rule>
+ <pattern>
+ <marker>
+ <token>e</token>
+ </marker>
+ <token postag="V.P.*" postag_regexp="yes"><exception
regexp="yes">oberta|tancada</exception></token>
+ </pattern>
+ <message>Haver s'escriu amb h. Podria ser: <suggestion>h<match
no="1" case_conversion="startlower"></match></suggestion>.</message>
+ <short>Haver s'escriu amb h</short>
<example type="incorrect">Jo <marker>e</marker>
discutit.</example>
- <example type="correct">Jo he discutit.</example>
+ <example type="correct">Fes una e oberta.</example>
</rule>
<rule>
<pattern>
- <token negate="yes">com</token>
+ <token negate="yes" regexp="yes">com|per|fins</token>
<marker>
<token>a</token>
</marker>
- <token postag="V.P.*" postag_regexp="yes"></token>
+ <token postag="V.P.*" postag_regexp="yes"><exception
postag="_GN.*" postag_regexp="yes"/></token>
</pattern>
<message>Haver s'escriu amb h. Podria ser: <suggestion>h<match
no="2" case_conversion="startlower"></match></suggestion>.</message>
<short>Haver s'escriu amb h</short>
<example type="incorrect">Ell <marker>a</marker>
cantat.</example>
<example type="correct">Ell ha cantat.</example>
+ <example type="correct">en la seva reducció a determinades
categories</example>
</rule>
<rule>
<pattern>
@@ -1777,7 +1872,7 @@
<rule>
<pattern>
<!-- afegir CS a l'excepció??, però no "si" -->
- <token postag="SENT_START" skip="-1"><exception
postag="PR.*" postag_regexp="yes" scope="next"/><exception
scope="next">perquè</exception></token>
+ <token postag="SENT_START" skip="-1"><exception
postag="PR.*" postag_regexp="yes" scope="next"/><exception
scope="next">perquè</exception></token>
<marker>
<token postag="V.[IS].*|_GV_"
postag_regexp="yes"><exception
regexp="yes">\p{Lu}+[\p{Ll}·]*</exception><exception postag="RG|_GN.*"
postag_regexp="yes" /><exception postag="PP.*|P0.*"
postag_regexp="yes"/></token>
<token postag="V.[IS].*"
postag_regexp="yes"><exception
regexp="yes">\p{Lu}+[\p{Ll}·]*</exception><exception postag="RG|_GN.*"
postag_regexp="yes"/></token>
@@ -2806,19 +2901,6 @@
<example type="incorrect"><marker>Des de que</marker> m'ho vas
dir.</example>
<example type="correct"><marker>Des que</marker> m'ho vas
dir.</example>
</rule>
- <rule id="HI_HAN" name="hi han">
- <pattern>
- <marker>
- <token>hi</token>
- <token postag="VA..3P." postag_regexp="yes"
inflected="yes">haver</token>
- </marker>
- <token postag="[^V].[^P].*" postag_regexp="yes"></token>
- </pattern>
- <message>Cal escriure "haver-hi" en singular.</message>
- <short>Expressió incorrecta</short>
- <example type="incorrect">No <marker>hi han</marker>
bananes</example>
- <example type="correct">No <marker>hi ha</marker> bananes</example>
- </rule>
</category>
<category name="Repeticions">
<rulegroup id="PHRASE_REPETITION" name="Repetició de dues paraules ('a
la a la')">
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Languagetool-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-cvs