Skip to content

Commit

Permalink
[pt] keep old rule name to make comparison possible
Browse files Browse the repository at this point in the history
  • Loading branch information
jaumeortola committed Oct 6, 2023
1 parent 451f653 commit f3048f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ public String getFileName() {

@Override
public String getId() {
return "MORFOLOGIK_RULE_"
+ language.getShortCodeWithCountryAndVariant().replace("-", "_").toUpperCase();
return "HUNSPELL_RULE";
/*return "MORFOLOGIK_RULE_"
+ language.getShortCodeWithCountryAndVariant().replace("-", "_").toUpperCase();*/
}

public MorfologikPortugueseSpellerRule(ResourceBundle messages, Language language, UserConfig userConfig,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ public void testLanguage() throws IOException {
testDemoText(ptPT, s,
Arrays.asList("POSSESSIVE_WITHOUT_ARTICLE", "SPACE_AFTER_PUNCTUATION", "GENERAL_GENDER_AGREEMENT_ERRORS", "AFIM_DE", "PORTUGUESE_WORD_REPEAT_RULE",
"PT_AGREEMENT_REPLACE_DETECTAR", "TAL_VEZ", "GENERAL_NUMBER_AGREEMENT_ERRORS", "GENERAL_VERB_AGREEMENT_ERRORS", "UPPERCASE_SENTENCE_START",
"MORFOLOGIK_RULE_PT_PT", "UNPAIRED_BRACKETS", "DOUBLE_PUNCTUATION", "PHRASE_REPETITION", "GENTILICOS_LINGUAS", "GENTILICOS_LINGUAS", "ARTICLES_PRECEDING_LOCATIONS", //"REPEATED_WORDS",
"HUNSPELL_RULE", "UNPAIRED_BRACKETS", "DOUBLE_PUNCTUATION", "PHRASE_REPETITION", "GENTILICOS_LINGUAS", "GENTILICOS_LINGUAS", "ARTICLES_PRECEDING_LOCATIONS", //"REPEATED_WORDS",
"PARONYM_ANALISE_363", "DOUBLE_PUNCTUATION", "POSSESSIVE_WITHOUT_ARTICLE", "EQUIPES", "DATE_WEEKDAY")
);
runTests(ptPT, null, "õș");
BrazilianPortuguese ptBR = new BrazilianPortuguese();
String s2 = "Cole aqui seu texto...ou verifique esta texto, afim de revelar alguns dos dos problemas que o LanguageTool consegue detectar. Isto tal vez permita corrigir os seus erro. Nós prometo ajudá-lo. para testar a grafia e as regrs do antigo) Acordo Ortográfico,, verifique o mesmo texto mesmo texto em Português de Angola ou Português do Moçambique e faça a analise dos resultados.. Nossa equipe anuncia a versão 4.5, que será lançada sexta-feira, 26 de março de 2019.";
testDemoText(ptBR, s2,
Arrays.asList("SPACE_AFTER_PUNCTUATION", "GENERAL_GENDER_AGREEMENT_ERRORS", "AFIM_DE", "PORTUGUESE_WORD_REPEAT_RULE", "TAL_VEZ",
"GENERAL_NUMBER_AGREEMENT_ERRORS", "GENERAL_VERB_AGREEMENT_ERRORS", "UPPERCASE_SENTENCE_START", "MORFOLOGIK_RULE_PT_BR",
"GENERAL_NUMBER_AGREEMENT_ERRORS", "GENERAL_VERB_AGREEMENT_ERRORS", "UPPERCASE_SENTENCE_START", "HUNSPELL_RULE",
"UNPAIRED_BRACKETS", "DOUBLE_PUNCTUATION", "PHRASE_REPETITION", "GENTILICOS_LINGUAS", "GENTILICOS_LINGUAS",
"PARONYM_ANALISE_363", "DOUBLE_PUNCTUATION", "DATE_WEEKDAY")
);
Expand Down

0 comments on commit f3048f6

Please sign in to comment.