Skip to content

Commit

Permalink
[ca] improve rules
Browse files Browse the repository at this point in the history
  • Loading branch information
jaumeortola committed Nov 30, 2024
1 parent 1cabb34 commit f1d1de4
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,8 @@ sobrenaturalitat sobrenaturalitat NCFS000
sobrenaturalitats sobrenaturalitat NCFP000
sociorelacional sociorelacional AQ0CS0
sociorelacionals sociorelacional AQ0CP0
subdistricte subdistricte NCMS000
subdistrictes subdistricte NCMP000
subhumana subhumà AQ0FS0
subhumanes subhumà AQ0FP0
subhumans subhumà AQ0MP0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,8 @@ sobrenaturalitat
sobrenaturalitats
sociorelacional
sociorelacionals
subdistricte
subdistrictes
subhumana
subhumanes
subhumans
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15677,6 +15677,37 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
<example correction="Érem a tres hores d'|Faltaven tres hores per a |Mancaven tres hores per a "><marker>Estàvem a tres hores d'</marker>acabar.</example>
</rule>
</rulegroup>
<rulegroup id="ESTAR_SERHI" name="estan per a complir-les -> hi són per a complir-les" default="temp_off">
<url>https://aplicacions.llengua.gencat.cat/llc/AppJava/index.html;jsessionid=5EC89C2057132F14019443A6B4F75263?action=Principal&amp;method=detall&amp;input_cercar=nova+gram%E0tica&amp;numPagina=8&amp;database=FITXES_PUB&amp;idFont=15806&amp;idHit=15806&amp;tipusFont=Fitxes+de+l%27Optimot&amp;numeroResultat=73&amp;databases_avansada=&amp;categories_avansada=&amp;clickLink=detall&amp;titol=%3Cem%3EPer+a+aix%F2+estem%3C%2Fem%3E+o+%3Cem%3EPer+a+aix%F2+hi+som%3C%2Fem%3E%3F+%2F+%3Cem%3EEstem+per+informar-vos%3C%2Fem%3E+o+%3Cem%3EHi+som+per+informar-vos%3C%2Fem%3E%3F&amp;tematica=&amp;tipusCerca=cerca.fitxes</url>
<rule>
<pattern>
<marker>
<token inflected="yes" postag="V...[123]..." postag_regexp="yes">estar</token>
<token>per</token>
<token min="0">a</token>
</marker>
<token postag="V.N.*" postag_regexp="yes"/>
<token regexp="yes">'l|'ls|-lo|-los|-la|-les|-te|-nos|-vos|-us</token>
</pattern>
<message>Val més usar una altra expressió.</message>
<suggestion>hi <match no="1" postag="V.(..[123]...)" postag_regexp="yes" postag_replace="VS$1">ser</match> per a</suggestion>
<example correction="hi són per a">Les lleis <marker>estan per a</marker> complir-les </example>
</rule>
<rule>
<pattern>
<token>per</token>
<token min="0">a</token>
<token min="1" max="2" regexp="yes">això|aquestes|coses</token>
<marker>
<token inflected="yes" postag="V...[123]..." postag_regexp="yes">estar</token>
</marker>
<token postag="_PUNCT.*|DA.*" postag_regexp="yes"/>
</pattern>
<message>Val més usar una altra expressió.</message>
<suggestion>hi <match no="4" postag="V.(..[123]...)" postag_regexp="yes" postag_replace="VS$1">ser</match></suggestion>
<example correction="hi som">Per a això <marker>estem</marker> els veïns, per a ajudar.</example>
</rule>
</rulegroup>
<rulegroup id="ESTAR_SER" name="estar -> ser">
<rule>
<pattern>
Expand Down Expand Up @@ -75475,6 +75506,20 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
</rulegroup>
</category>
<category id="INCORRECT_EXPRESSIONS" name="Expressions incorrectes" type="grammar">
<rule id="FER_CURA" name="fer cura -> tenir cura" default="temp_off">
<antipattern>
<token>cura</token>
<token>amb</token>
<example>S'ha de fer cura amb aigua i alcohol.</example>
</antipattern>
<pattern>
<token inflected="yes" postag_regexp="yes" postag="(V.*)">fer</token>
<token>cura</token>
</pattern>
<message>L'expressió adequada és "tenir cura" (d'algú o d'alguna cosa).</message>
<suggestion><match no="1" postag_regexp="yes" postag="(V.*)" postag_replace="$1">tenir</match> cura</suggestion>
<example correction="tenir cura|tindre cura">Cal <marker>fer cura</marker> d'infants i ancians.</example>
</rule>
<rulegroup id="MES_ASSOTA" name="assota -> a sota" default="temp_off">
<rule>
<pattern>
Expand Down Expand Up @@ -76044,12 +76089,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
<rule id="MONS_MOS" name="mons pares -> mos pares">
<pattern>
<marker>
<token>mons</token>
<token regexp="yes">mons|tons|sons</token>
</marker>
<token regexp="yes">pares|germans|cosins</token>
<token regexp="yes">pares|germans|cosins|fills|oncles|tios|nebots</token>
</pattern>
<message>La forma adequada com a possessiu és <suggestion>mos</suggestion> (=els meus).</message>
<message>La forma adequada com a possessiu és <suggestion><match no="1" regexp_replace="" regexp_match="(?iu)n"/></suggestion> (=els <match no="1" regexp_match="(?iu)([mns])ons" regexp_replace="$1eus" case_conversion="alllower"/>).</message>
<example correction="mos">Vaig parlar ahir amb <marker>mons</marker> pares.</example>
<example correction="sos">Parala sempre en català a <marker>sons</marker> fills.</example>
</rule>
<rule id="CINEMATIC" name="cinemàtic -> cinematogràfic">
<pattern>
Expand Down Expand Up @@ -88438,15 +88484,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
</rulegroup>
<rulegroup id="CALLAR_NOS" name="*ens callaran">
<url>https://esadir.cat/entrades/fitxa/id/1438</url>
<antipattern>
<!-- spanish sentence -->
<token>la</token>
<token>calle</token>
<token postag="_possible_nompropi"/>
</antipattern>
<rule>
<antipattern>
<!-- spanish sentence -->
<token>la</token>
<token>calle</token>
<token postag="_possible_nompropi"/>
</antipattern>
<pattern>
<token regexp="yes">em|et|el|la|ens|us|els|les</token>
<token regexp="yes">em|et|el|la|ens|us|vos|els|les</token>
<token postag="V.[IS].3.*" postag_regexp="yes" inflected="yes">callar</token>
</pattern>
<message>Construcció incorrecta.</message>
Expand All @@ -88456,7 +88502,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
</rule>
<rule>
<pattern>
<token regexp="yes">em|et|el|la|ens|us|els|les|m'|t'|l'</token>
<token regexp="yes">em|et|el|la|ens|us|vos|els|les|m'|t'|l'</token>
<token postag="VA[IS].3.*" postag_regexp="yes"/>
<token postag="V.[NP].*" postag_regexp="yes" inflected="yes">callar</token>
</pattern>
Expand All @@ -88467,6 +88513,52 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
<example correction="ens van fer callar">No <marker>ens van callar</marker>.</example>
<example correction="l'han fet callar">No <marker>l'han callat</marker> mai.</example>
</rule>
<rule>
<pattern>
<token regexp="yes">em|el|la|ens|els|les</token>
<token postag="V.[IS].2.*" postag_regexp="yes" inflected="yes">callar</token>
</pattern>
<message>Construcció incorrecta.</message>
<suggestion>\1 <match no="2" postag="(V.[IS].*)" postag_regexp="yes" postag_replace="$1">fer</match> callar</suggestion>
<example correction="ens faràs callar">No <marker>ens callaràs</marker>.</example>
<example correction="ens fareu callar">No <marker>ens callareu</marker>.</example>
</rule>
<rule>
<pattern>
<token regexp="yes">em|el|la|ens|els|les|m'|t'|l'</token>
<token postag="VA[IS].2.*" postag_regexp="yes"/>
<token postag="V.[NP].*" postag_regexp="yes" inflected="yes">callar</token>
</pattern>
<filter class="org.languagetool.rules.AdaptSuggestionsFilter" args="none:none"/>
<message>Construcció incorrecta.</message>
<suggestion>\1 \2 <match no="3" postag="(V.[NP].*)" postag_regexp="yes" postag_replace="$1">fer</match> callar</suggestion>
<example correction="ens has fet callar">No <marker>ens has callat</marker>.</example>
<example correction="ens vas fer callar">No <marker>ens vas callar</marker>.</example>
<example correction="l'heu fet callar">No <marker>l'heu callat</marker> mai.</example>
</rule>
<rule>
<pattern>
<token regexp="yes">et|el|la|us|vos|els|les</token>
<token postag="V.[IS].1.*" postag_regexp="yes" inflected="yes">callar</token>
</pattern>
<message>Construcció incorrecta.</message>
<suggestion>\1 <match no="2" postag="(V.[IS].*)" postag_regexp="yes" postag_replace="$1">fer</match> callar</suggestion>
<example correction="et faré callar">No <marker>et callaré</marker>.</example>
<example correction="els farem callar">No <marker>els callarem</marker>.</example>
</rule>
<rule>
<pattern>
<token regexp="yes">et|el|la|us|vos|els|les|m'|t'|l'</token>
<token postag="VA[IS].1.*" postag_regexp="yes"/>
<token postag="V.[NP].*" postag_regexp="yes" inflected="yes">callar</token>
</pattern>
<filter class="org.languagetool.rules.AdaptSuggestionsFilter" args="none:none"/>
<message>Construcció incorrecta.</message>
<suggestion>\1 \2 <match no="3" postag="(V.[NP].*)" postag_regexp="yes" postag_replace="$1">fer</match> callar</suggestion>
<example correction="els hem fet callar">No <marker>els hem callat</marker>.</example>
<example correction="us vaig fer callar">Llavors <marker>us vaig callar</marker>.</example>
<example correction="l'he fet callar">No <marker>l'he callat</marker> mai.</example>
</rule>
</rulegroup>
<rule id="AIXECAR_CAP" name="*aixecar cap/ aixecar el cap">
<pattern>
Expand Down

0 comments on commit f1d1de4

Please sign in to comment.