![JAR search and dependency download from the Maven repository](/logo.png)
org.languagetool.rules.km.grammar.xml Maven / Gradle / Ivy
The newest version!
<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="../../../../../../../../../languagetool-core/src/main/resources/org/languagetool/rules/print.xsl" ?> <?xml-stylesheet type="text/css" href="../../../../../../../../../languagetool-core/src/main/resources/org/languagetool/rules/rules.css" title="Easy editing stylesheet" ?> <!-- Khmer Grammar and Typo Rules for LanguageTool Created by the Society for Better Books in Cambodia http://www.sbbic.org See resource/km/tagset.txt for the meaning of the POS tags This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA --> <rules lang="km" xsi:noNamespaceSchemaLocation="../../../../../../../../../languagetool-core/src/main/resources/org/languagetool/rules/rules.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <!-- ====================================================================== --> <!-- Possible typos --> <!-- ====================================================================== --> <category id="TYPOS" name="Possible Typos"> <rule id="HOUY_NUNG" name="ហើយនឹង (ហើយនិង)"> <pattern> <marker> <token>ហើយ</token> <token>នឹង</token> </marker> <token><exception>ថ្កល់</exception></token> </pattern> <message>Did you mean <suggestion>ហើយនិង</suggestion>? </message> <example> នោះ<marker>ហើយនិង</marker>នេះ។ </example> <example correction="ហើយនិង"> នោះ<marker>ហើយនឹង</marker>នេះ។ </example> </rule> <rule id="HOUYNUNG" name="ហើយនឹង (ហើយនិង)"> <pattern> <marker> <token>ហើយនឹង</token> </marker> <token><exception>ថ្កល់</exception></token> </pattern> <message>Did you mean <suggestion>ហើយនិង</suggestion>? </message> <example> នោះ<marker>ហើយនិង</marker>នេះ។ </example> <example correction="ហើយនិង"> នោះ<marker>ហើយនឹង</marker>នេះ។ </example> </rule> <rule id="HARA_PLANT" name="ហោរ៉ា (ហោរា)"> <pattern> <marker> <token>ហោរ៉ា</token> </marker> </pattern> <message>Did you really mean the plant or a prophet? <suggestion>ហោរា</suggestion>? </message> <example> របស់ពួក<marker>ហោរា</marker>ម្នាក់ </example> <example correction="ហោរា"> របស់ពួក<marker>ហោរ៉ា</marker>ម្នាក់ </example> </rule> <rule id="A_SABAY" name="អសប្បាយ (អរសប្បាយ)"> <pattern> <marker> <token>អសប្បាយ </token> </marker> </pattern> <message>Did you really mean feeling sick? <suggestion>អរសប្បាយ</suggestion>? </message> <example> ខ្ញុំ<marker>អរសប្បាយ</marker>ខ្លាំង </example> <example correction="អរសប្បាយ"> ខ្ញុំ<marker>អសប្បាយ</marker>ខ្លាំង </example> </rule> <rule id="TBUT_DBUT" name="ត្បិត (ដ្បិត)"> <pattern> <token><exception>រឹត</exception></token> <marker> <token>ត្បិត</token> </marker> </pattern> <message>Consider using the spelling of Chuon Nath <suggestion>ដ្បិត</suggestion>? </message> <example> កាត់<marker>ដ្បិត</marker>សេចក្តីសប្បុរស </example> <example correction="ដ្បិត"> កាត់<marker>ត្បិត</marker>សេចក្តីសប្បុរស </example> </rule> <rule id="KHANG_VITNEAN" name="ខាងវិញ្ញាណ (ខាងឯវិញ្ញាណ)"> <pattern> <marker> <token>ខាង</token> <token>វិញ្ញាណ</token> </marker> </pattern> <message>Stylistic suggestion. Use: <suggestion>ខាងឯវិញ្ញាណ</suggestion>? </message> <example> ជីវិត<marker>ខាងឯវិញ្ញាណ</marker>ដ៏ល្អ </example> <example correction="ខាងឯវិញ្ញាណ"> ជីវិត<marker>ខាងវិញ្ញាណ</marker>ដ៏ល្អ </example> </rule> <rule id="THUA_BAU" name="ទោះបើ (ទោះបី)"> <pattern> <token>ទោះ</token> <marker> <token>បើ</token> </marker> </pattern> <message>Stylistic suggestion. Use: ទោះ<suggestion>បី</suggestion> instead. </message> <example> ខ្លួនទោះ<marker>បី</marker>ជាប្រឈម </example> <example correction="បី"> ខ្លួនទោះ<marker>បើ</marker>ជាប្រឈម </example> </rule> <rule id="BANAT_VERB" name="បញ្ញត្ត (បញ្ញត្តិ)"> <pattern> <marker> <token>បញ្ញត្ត</token> </marker> </pattern> <message>បញ្ញត្ត is a verb, did you mean to use បញ្ញត្តិ the noun form? <suggestion>បញ្ញត្តិ</suggestion>? </message> <example> មាន<marker>បញ្ញត្តិ</marker>ជាអារម្មណ៍ </example> <example correction="បញ្ញត្តិ"> មាន<marker>បញ្ញត្ត</marker>ជាអារម្មណ៍ </example> </rule> <rule id="NUNG_PDOAL" name="និងថ្កល់ (នឹងថ្កល់)"> <pattern> <token>និង</token> <token>ថ្កល់</token> </pattern> <message>Did you mean <suggestion>នឹងថ្កល់</suggestion>? </message> <example> ទឹកដែលស្អាត ហើយ<marker>នឹងថ្កល់</marker>។ </example> <example correction="នឹងថ្កល់"> ទឹកដែលស្អាត ហើយ<marker>និងថ្កល់</marker>។ </example> </rule> <rule id="PRO_CHOMNAH" name="ខ្ញុំរាងចំណាស់"> <pattern> <token postag="PRO"/> <token>ចំណាស់</token> </pattern> <message>Did you mean <suggestion>\1រាងចំណាស់</suggestion>? </message> <example> ខ្ញុំរាងចំណាស់បន្តិចហើយ។ </example> <example correction="ខ្ញុំរាងចំណាស់"> <marker>ខ្ញុំចំណាស់</marker>បន្តិចហើយ។ </example> </rule> <rule id="LENG_TOV" name="ឡើងទៅ (លើងទៅ)"> <pattern> <token>លើង</token> <token>ទៅ</token> </pattern> <message>Did you mean <suggestion>ឡើងទៅ</suggestion>? </message> <short>Possible typo</short> <example> ខ្ញុំ<marker>ឡើងទៅ</marker>លើផ្ទះ។ </example> <example correction="ឡើងទៅ"> ខ្ញុំ<marker>លើងទៅ</marker>លើផ្ទះ។ </example> </rule> <rule id="JEAMUY_NENG" name="ជាមួយនឹង (ជាមួយនិង)"> <pattern> <token>ជាមួយ</token> <marker> <token>និង</token> </marker> </pattern> <message>Did you mean ជាមួយ<suggestion>នឹង</suggestion>? </message> <short>Possible typo</short> <example> សូមជួយកូនរបស់អ្នកឲ្យហាត់អត់ធ្មត់ជាមួយ<marker>នឹង</marker>ក្រុមគ្រួសារ។ </example> <example correction="នឹង"> សូមជួយកូនរបស់អ្នកអោយហាត់អត់ធ្មត់ជាមួយ<marker>និង</marker>ក្រុមគ្រួសារ។ </example> </rule> <rule id="JEA_MUY_NENG" name="ជាមួយនឹង (ជាមួយនិង)"> <pattern> <token>ជា</token> <token>មួយ</token> <marker> <token>និង</token> </marker> </pattern> <message>Did you mean ជាមួយ<suggestion>នឹង</suggestion>? </message> <short>Possible typo</short> <example> សូមជួយកូនរបស់អ្នកឲ្យហាត់អត់ធ្មត់ជាមួយ<marker>នឹង</marker>ក្រុមគ្រួសារ។ </example> <example correction="នឹង"> សូមជួយកូនរបស់អ្នកអោយហាត់អត់ធ្មត់ជាមួយ<marker>និង</marker>ក្រុមគ្រួសារ។ </example> </rule> <rule id="BI_NEAK" name="ពីរអ្នក (ពីរនាក់)"> <pattern> <token><exception regexp="yes">មក|និង|រស់</exception></token> <token>ពីរ</token> <marker> <token>អ្នក</token> </marker> </pattern> <message>Did you mean ពីរ<suggestion>នាក់</suggestion>? </message> <short>Possible typo</short> <example> ទាំងពីរ<marker>នាក់</marker>។ </example> <example correction="នាក់"> ទាំងពីរ<marker>អ្នក</marker>។ </example> </rule> <rule id="MOK_BI_NEAK" name="មកពីរអ្នក (មកពីរនាក់)"> <pattern> <token>មក</token> <marker> <token>ពីរ</token> <token><exception postag="CLS"/></token> </marker> </pattern> <message>Did you mean មក<suggestion>ពី\3</suggestion> or មក<suggestion>ពីរនាក់</suggestion>? </message> <short>Possible typo</short> <example> វាមក<marker>ពីអ្នក</marker>។ </example> <example correction="ពីអ្នក|ពីរនាក់"> វាមក<marker>ពីរអ្នក</marker>។ </example> </rule> <rule id="DIAL_RU_TE" name="ដែលឬទេ (ដែរឬទេ)"> <pattern> <marker> <token>ដែល</token> <token>ឬ</token> <token>ទេ</token> </marker> </pattern> <message>Did you mean <suggestion>ដែរឬទេ</suggestion> </message> <example type="correct"> តើអ្នករកឃើញកំហុស<marker>ដែរឬទេ</marker> </example> <example type="incorrect" correction="ដែរឬទេ"> តើអ្នករកឃើញកំហុស<marker>ដែលឬទេ</marker> </example> </rule> </category> <category id="GRAMMAR" name="Khmer Grammar"> <rule id="NOUN_POSESIVEPRONOUN" name="Possible incorrect position of noun possessed by pronoun" default="off"> <!--We removed this rule for now, it is too greedy--> <pattern> <marker> <token postag="PRP|PRO" postag_regexp="yes"><exception regexp="yes">នេះ|នោះ</exception></token> <token postag="NN"><exception>ខ្លួន</exception></token> </marker> <token><exception postag="CLS"/></token> </pattern> <message>In Khmer the noun possessed precedes the pronoun. Write <suggestion>\2\1</suggestion> instead. </message> <short>Grammatical problem or typo</short> <example> នេះគឺជា<marker>ឡានខ្ញុំ</marker>។ </example> <example correction="ឡានខ្ញុំ"> នេះគឺជា<marker>ខ្ញុំឡាន</marker>។ </example> </rule> <rule id="ADJ_NOUN" name="Possible incorrect position of adjective" default="off"> <!--We removed this rule for now, it is too greedy--> <pattern> <token postag="JJ"><exception postag="NUM|CLS|GEN|VB|AUX" postag_regexp="yes"/><exception>រៀងរាល់</exception></token> <token postag="NN"><exception postag_regexp="yes" postag="GEN|PRO"/></token> </pattern> <message>In Khmer the adjective follows the noun. Write <suggestion>\2\1</suggestion> instead. </message> <short>Grammatical problem or typo</short> <example> ខ្ញុំមាន<marker>ឡានក្រហម</marker>។ </example> <example correction="ឡានក្រហម"> ខ្ញុំមាន<marker>ក្រហមឡាន</marker>។ </example> </rule> <rule id="Gender_spec" name="Possible incorrect position of gender word" default="off"> <!--We removed this rule for now, it is too greedy--> <pattern> <token postag="GEN"/> <token postag="NN"><exception regexp="yes">ក្មេង|ចំណាស់</exception></token> </pattern> <message>In Khmer the gender normally follows the noun. Write <suggestion>\2\1</suggestion> instead. </message> <short>Grammatical problem or typo</short> <example> <marker>លោកស្រី</marker>។ </example> <example correction="លោកស្រី"> <marker>ស្រីលោក</marker>។ </example> </rule> <rule id="NEG_PART_POS" name="Possible incorrect position of negative particle" default="off"> <!--We removed this rule for now, it is too greedy--> <pattern> <token postag="JJ"><exception regexp="yes">ក្មេង|ចំណាស់|នោះ</exception></token> <token regexp="yes">មិន|អត់</token> </pattern> <message>In Khmer the negative particle never precedes an adjective. Write <suggestion>\2\1</suggestion> instead. </message> <short>Grammatical problem or typo</short> <example> ឡាននោះ<marker>មិនខៀវ</marker>ទេ។ </example> <example correction="មិនខៀវ"> ឡាននោះ<marker>ខៀវមិន</marker>ទេ។ </example> </rule> <rule id="WANT_NOUN" name="INCORRECT USE OF WANT WITH NOUN"> <pattern> <marker> <token>ចង់</token> </marker> <token postag="NN"><exception postag="VB"/></token> </pattern> <message>You should write <suggestion>ចង់បាន</suggestion> instead. </message> <short>Bad writing style</short> <example> ខ្ញុំ<marker>ចង់បាន</marker>ឡាននោះ។ </example> <example correction="ចង់បាន"> ខ្ញុំ<marker>ចង់</marker>ឡាននោះ។ </example> </rule> <rule id="WANT_VERB1" name="INCORRECT USE OF WANT WITH VERB1"> <pattern> <marker> <token>ចង់បាន</token> </marker> <token postag="VB"><exception postag="NN"/></token> </pattern> <message>You should write <suggestion>ចង់</suggestion> instead. </message> <short>Bad writing style</short> <example> ខ្ញុំ<marker>ចង់</marker>ទៅ។ </example> <example correction="ចង់"> ខ្ញុំ<marker>ចង់បាន</marker>ទៅ។ </example> </rule> <rule id="WANT_VERB2" name="INCORRECT USE OF WANT WITH VERB2"> <pattern> <marker> <token>ចង់</token> <token>បាន</token> </marker> <token postag="VB"><exception postag="NN"/></token> </pattern> <message>You should write <suggestion>ចង់</suggestion> instead. </message> <short>Bad writing style</short> <example> ខ្ញុំ<marker>ចង់</marker>ទៅ។ </example> <example correction="ចង់"> ខ្ញុំ<marker>ចង់បាន</marker>ទៅ។ </example> </rule> <rule id="FROM_Classifier" name="INCORRECT USE OF FROM WITH CLASSIFIER"> <pattern> <token regexp="yes">កាំភ្លើង|ដាវ|ដើមឈើ|អាវុធ</token> <marker> <token>ពី</token> </marker> <token postag="CLS"/> </pattern> <message>You should write <suggestion>ពីរ</suggestion> instead. </message> <short>Incorrect usage of ពី</short> <example> ដើមឈើ<marker>ពីរ</marker>ដើម។ </example> <example correction="ពីរ"> ដើមឈើ<marker>ពី</marker>ដើម។ </example> </rule> <rulegroup id="Classifier_PEOPLE" name="CLASSIFIERS THAT CAN BE USED WITH PEOPLE"> <rule> <!--This rule dies if ANY Classifier is detected after មនុស្ស + Number --> <pattern> <token>មនុស្ស</token> <token postag="NUM"/> <token><exception postag="CLS"/></token> </pattern> <message>You should write <suggestion>\1\2នាក់\3</suggestion> <suggestion>\1\2ក្រុម\3</suggestion> <suggestion>\1\2ពួក\3</suggestion> or <suggestion>\1\2គូ\3</suggestion> instead. </message> <short>Incorrect classifier for មនុស្ស</short> <example> <marker>មនុស្សពីរនាក់</marker>បានទៅផ្សារ។ </example> <example correction="មនុស្សពីរនាក់បាន|មនុស្សពីរក្រុមបាន|មនុស្សពីរពួកបាន|មនុស្សពីរគូបាន"> <marker>មនុស្សពីរបាន</marker>ទៅផ្សារ។ </example> </rule> <rule> <!--This rule is true ONLY with a classifier and dies ONLY with classifiers that cane be used with មនុស្ស + Number --> <pattern> <token>មនុស្ស</token> <token postag="NUM"/> <token postag="CLS"><exception regexp="yes">នាក់|ក្រុម|ពួក|គូ|ចំនួន</exception></token> </pattern> <message>You should write <suggestion>\1\2នាក់</suggestion> <suggestion>\1\2ក្រុម</suggestion> <suggestion>\1\2ពួក</suggestion> or <suggestion>\1\2គូ</suggestion> instead. </message> <short>Incorrect classifier for មនុស្ស</short> <example> <marker>មនុស្សពីរនាក់</marker>បានទៅផ្សារ។ </example> <example correction="មនុស្សពីរនាក់|មនុស្សពីរក្រុម|មនុស្សពីរពួក|មនុស្សពីរគូ"> <marker>មនុស្សពីរក្បាល</marker>បានទៅផ្សារ។ </example> </rule> </rulegroup> <rule id="NOUN_NENG_NOUN" name="INCORRECT USE OF ហើយនិង with two nouns"> <!-- Sometimes when a verb does two or more actions, that are nouns, it is fine to use ហើយនិង. Once we have the ability to detect sentence structure, we can add this ទ្រង់នឹងផ្តល់អោយអ្នកនូវកំឡាំង ហើយនិងអំណាចរាល់ថ្ងៃ--> <pattern> <token postag_regexp="yes" postag="NN|NNP|PRO|ROY"><exception postag="VB"/></token> <marker> <token>ហើយ</token> <token>និង</token> </marker> <token postag_regexp="yes" postag="NN|NNP|PRO|ROY"><exception postag="VB"/></token> </pattern> <message>You should write <suggestion>\3</suggestion> instead. </message> <short>Incorrect usage of ហើយនិង with two nouns</short> <example> ម្តាយ<marker>និង</marker>ឪពុក។ </example> <example correction="និង"> ម្តាយ<marker>ហើយនិង</marker>ឪពុក។ </example> </rule> <rule id="NOUN_NENG_NOUN2" name="INCORRECT USE OF ហើយនិង with two nouns2"> <!-- Sometimes when a verb does two or more actions, that are nouns, it is fine to use ហើយនិង. Once we have the ability to detect sentence structure, we can add this ទ្រង់នឹងផ្តល់អោយអ្នកនូវកំឡាំង ហើយនិងអំណាចរាល់ថ្ងៃ--> <pattern> <token postag_regexp="yes" postag="NN|NNP|PRO|ROY"><exception postag="VB"/></token> <marker> <token>ហើយនិង</token> </marker> <token postag_regexp="yes" postag="NN|NNP|PRO|ROY"><exception postag="VB"/></token> </pattern> <message>You should write <suggestion>និង</suggestion> instead. </message> <short>Incorrect usage of ហើយនិង with two nouns</short> <example> ម្តាយ<marker>និង</marker>ឪពុក។ </example> <example correction="និង"> ម្តាយ<marker>ហើយនិង</marker>ឪពុក។ </example> </rule> <rule id="VERB_NENG_VERB" name="INCORRECT USE OF និង with two verbs"> <pattern> <token postag="VB"><exception postag="NN"/></token> <marker> <token>និង</token> </marker> <token postag="VB"><exception postag="NN"/></token> </pattern> <message>You should write <suggestion>ហើយនិង</suggestion> instead. </message> <short>Incorrect usage of និង with two verbs</short> <example> ខ្ញុំទៅ<marker>ហើយនិង</marker>មកវិញ។ </example> <example correction="ហើយនិង"> ខ្ញុំទៅ<marker>និង</marker>មកវិញ។ </example> </rule> <rule id="TonakeatWithNoun" name="Do not use ការ ឬ ភាព with ទណ្ឌឃាត"> <pattern> <token regexp="yes">សេចក្តី|សេចក្ដី|ការ|ភាព|អំពើ</token> <marker> <token regexp="yes">(.*)(ន៍)</token> </marker> </pattern> <message>Remove ន៍ because the word is already a modified noun. <suggestion><match no="2" regexp_match="(.*)(ន៍)" regexp_replace="$1"/></suggestion> </message> <short>Remove ន៍ because the word is already a modified noun.</short> <example> ការ<marker>អភិវឌ្ឍ</marker>សង្គម។ </example> <example correction="អភិវឌ្ឍ"> ការ<marker>អភិវឌ្ឍន៍</marker>សង្គម។ </example> </rule> <rule id="TonakeatWithNoun2" name="Do not use ការ ឬ ភាព with ទណ្ឌឃាត 2"> <pattern> <token regexp="yes">(សេចក្តី|សេចក្ដី|ការ|ភាព|អំពើ)(.*)(ន៍)</token> </pattern> <message>Remove ន៍ because the word is already a modified noun. <suggestion><match no="1" regexp_match="(សេចក្តី|សេចក្ដី|ការ|ភាព|អំពើ)(.*)(ន៍)" regexp_replace="$1$2"/></suggestion> </message> <short>Remove ន៍ because the word is already a modified noun.</short> <example> <marker>ការអភិវឌ្ឍ</marker>សង្គម។ </example> <example correction="ការអភិវឌ្ឍ"> <marker>ការអភិវឌ្ឍន៍</marker>សង្គម។ </example> </rule> <rule id="DOUBLE_NOUNS" name="Do not double up nouns"> <pattern> <token regexp="yes">(សេចក្តី|សេចក្ដី|ការ|ភាព|អំពើ)(ជំនឿ|ទំនាក់ទំនង|តម្រូវការ)</token> </pattern> <message>Do not add a noun modifier to a word that is already a noun. <suggestion><match no="1" regexp_match="(សេចក្តី|សេចក្ដី|ការ|ភាព|អំពើ)(ជំនឿ|ទំនាក់ទំនង|តម្រូវការ)" regexp_replace="$2"/></suggestion> </message> <short>Do not add a noun modifier to a word that is already a noun.</short> <example> <marker>ជំនឿ</marker>ដ៏ពិត។ </example> <example correction="ជំនឿ"> <marker>ការជំនឿ</marker>ដ៏ពិត។ </example> </rule> <rule id="DOUBLE_NOUNS2" name="Do not double up nouns 2"> <pattern> <marker> <token regexp="yes">(សេចក្តី|សេចក្ដី|ការ|ភាព|អំពើ)</token> <token regexp="yes">(ជំនឿ|ទំនាក់ទំនង|តម្រូវការ)</token> </marker> </pattern> <message>Do not add a noun modifier to a word that is already a noun. <suggestion>\2</suggestion> </message> <short>Do not add a noun modifier to a word that is already a noun.</short> <example> <marker>ជំនឿ</marker>ដ៏ពិត។ </example> <example correction="ជំនឿ"> <marker>ការជំនឿ</marker>ដ៏ពិត។ </example> </rule> </category> </rules>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy