Permalink
Browse files

[pt] barbarism detection improvements

* added many words, verified through VOP:
http://www.portaldalinguaportuguesa.org/index.php?action=loanwords&act=list&letter=a
* words added to spelling as a work around

I am not sure if this is a regression, or a not yet implemented feature,
but getPriorityForId is not working with some Java rules. Tested with
PT_MULTI_REPLACE, PT_PT_SIMPLE_REPLACE and WIKIPEDIA_COMMON_ERRORS.
  • Loading branch information...
TiagoSantos81 committed Feb 9, 2017
1 parent 17dc7dd commit d4119b33df7c2ccfc70642fed47e0ca81427202a
@@ -192,7 +192,10 @@ public void close() throws Exception {
public int getPriorityForId(String id) {
switch (id) {
case "FRAGMENT_TWO_ARTICLES": return 50;
case "CRASE_CONFUSION": return -5;
case "PT_MULTI_REPLACE": return -5;
case "PT_PT_SIMPLE_REPLACE": return -6;
case "HUNSPELL_RULE": return -10;
case "CRASE_CONFUSION": return -15;
case "T-V_DISTINCTION": return -20;
case "T-V_DISTINCTION_ALL": return -21;
case "REPEATED_WORDS": return -90;
@@ -50,7 +50,7 @@ public final String getFileName() {

public PortugueseReplaceRule2(ResourceBundle messages) throws IOException {
super(messages, new Portuguese());
super.setCategory(Categories.MISC.getCategory(messages));
super.setCategory(Categories.STYLE.getCategory(messages));
setLocQualityIssueType(ITSIssueType.LocaleViolation);
addExamplePair(Example.wrong("<marker>curriculum vitae</marker>"),
Example.fixed("<marker>currículo</marker>"));
Oops, something went wrong.

0 comments on commit d4119b3

Please sign in to comment.