Question about creating a new rule

2013-08-04 Thread Marco A.G.Pinto

  
  
Hello!
  
  I have been trying to create the rule:
  "Usei o texto com vossa permisso"
  "Usei o texto com a vossa permisso"
  
  In simple words, when we use "com vossa" without the "a", it
  suggests "com a vossa".
  
  Also, I wanted to use exceptions after the "vossa":
  tokenexception
regexp="yes"majestade|realeza|divindade|excelncia|eminncia/exception/token
  "Queria falar com vossa majestade"
  - (without the "a" for the words above)
  
  
  I tried to code it in different ways but it gives errors:
   !-- COM VOSSA com a vossa --
   rule id="COM_VOSSA" name="com a vossa"
   pattern
   tokencom/token
   marker
tokenvossaexception
scope="previous"a/exception/token
 tokenexception
regexp="yes"majestade|realeza|divindade|excelncia|eminncia/exception/token
   /marker
   /pattern
   messageQuerias dizer suggestioncom a
vossa/suggestion?/message
   example type="incorrect"Usei o texto
markercom vossa/marker
permisso./example
   example type="correct"Usei o texto
markercom a vossa/marker
permisso./example
   example type="correct"Queria falar
markercom vossa/marker
majestade./example
   /rule
  
  I am still having difficulties using exceptions in the XML.
  
  How do I fix the code above?
  
  Thanks!
  
  Kind regards from,
   Marco A.G.Pinto
   ---
  

-- 
  
  

--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711iu=/4140/ostg.clktrk___
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel


Re: Question about creating a new rule

2013-08-04 Thread gulp21
The only problem I can see is that the position of marker within
pattern is wrong. Furthermore, you do not need exception
scope=previousa/exception since the previous token is always “com”.

This code should work:

!-- COM VOSSA com a vossa --
rule id=COM_VOSSA name=com a vossa
  pattern
marker
tokencom/token
tokenvossa/token
/marker
tokenexception
regexp=yesmajestade|realeza|divindade|excelência|eminência/exception/token
  /pattern
  messageQuerias dizer suggestioncom a vossa/suggestion?/message
  example type=incorrectUsei o texto markercom vossa/marker
permissão./example
  example type=correctUsei o texto markercom a vossa/marker
permissão./example
  example type=correctQueria falar markercom vossa/marker
majestade./example
/rule

Regards
Markus

--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711iu=/4140/ostg.clktrk
___
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel