Thank you for your help. I'll try putting it in grammar.xml and see how
that goes.
One more question. What's the best way to find the ៈ character at the end
of a word using regex in a rule?

<token ​regexp="yes">\w*ៈ\b</token>

?




On Fri, Mar 21, 2014 at 3:51 PM, Jaume Ortolà i Font
<jaumeort...@gmail.com>wrote:

> 2014-03-21 9:32 GMT+01:00 Nathan Wells <sungk...@gmail.com>:
>
>> So I want to create a rule that asks the user to use the Latin colon
>> rather than the Khmer character  ៈ except in Khmer words that actually end
>> in the  ៈ character.
>> There are 365 Khmer words that can end in a  ៈ character.
>>
>> What is the best way to implement this rule? I assume a list of
>> exceptions 365 words long in the grammar.xml would not be the best way? Or
>> is that not a problem (since that is the easiest way for me since I don't
>> know Java that well)?
>>
>>
> I think it's not a problem. You can do it that way.
>
> Otherwise, you could also use the tagging.  If these 365 words can be
> distinguished by its tagging, then you can just create an exception for the
> appropriate tags.
>
> <token regexp="yes>.+ ៈ<exception postag="......"
> postag_regexp="yes"></token>
>
> Or perhaps:
> <token postag="UNKNOWN" regexp="yes>.+ ៈ</token>
>
> I am assuming certain things about tokenization and tagging, but I don't
> know if it works that way in Khmer...
>
> Regads,
> Jaume Ortolà
>
>
>
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> _______________________________________________
> Languagetool-devel mailing list
> Languagetool-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/languagetool-devel
>
>
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel

Reply via email to