diff --git a/languagetool-dev/src/main/java/org/languagetool/dev/simulation/TypingSimulator.java b/languagetool-dev/src/main/java/org/languagetool/dev/simulation/TypingSimulator.java index 5395de193f52..dbb9110269b3 100644 --- a/languagetool-dev/src/main/java/org/languagetool/dev/simulation/TypingSimulator.java +++ b/languagetool-dev/src/main/java/org/languagetool/dev/simulation/TypingSimulator.java @@ -188,14 +188,14 @@ private void sleep(Random rnd) { private void check(String doc, Stats stats, boolean checkCompleteText) { try { if (checkCompleteText) { - checkByPOST(doc, "allButTextLevelOnly", stats); + checkByPOST(doc, "paragraphLevelOnly", stats); } else { String[] paras = doc.split("\n\n"); String lastPara = paras[paras.length-1]; //if (!lastPara.equals(doc)) { // System.out.println("doc/last: " + doc.length() + " / " + lastPara.length() + ": " + lastPara); //} - checkByPOST(lastPara, "allButTextLevelOnly", stats); + checkByPOST(lastPara, "paragraphLevelOnly", stats); } checkByPOST(doc, "textLevelOnly", stats); } catch (IOException e) { diff --git a/languagetool-office-extension/src/main/java/org/languagetool/openoffice/LORemoteLanguageTool.java b/languagetool-office-extension/src/main/java/org/languagetool/openoffice/LORemoteLanguageTool.java index ee77d019d3fe..038f7f6dd795 100644 --- a/languagetool-office-extension/src/main/java/org/languagetool/openoffice/LORemoteLanguageTool.java +++ b/languagetool-office-extension/src/main/java/org/languagetool/openoffice/LORemoteLanguageTool.java @@ -170,7 +170,7 @@ List check(String text, ParagraphHandling paraMode, RemoteCheck check configBuilder.enabledRuleIds(tmpEnabled.toArray(new String[0])); configBuilder.enabledOnly(); } - configBuilder.mode("allButTextLevelOnly"); + configBuilder.mode("paragraphLevelOnly"); } } configBuilder.level("default"); diff --git a/languagetool-server/src/main/java/org/languagetool/server/ServerTools.java b/languagetool-server/src/main/java/org/languagetool/server/ServerTools.java index 9dd1a034ccad..d583bafad42e 100644 --- a/languagetool-server/src/main/java/org/languagetool/server/ServerTools.java +++ b/languagetool-server/src/main/java/org/languagetool/server/ServerTools.java @@ -166,7 +166,7 @@ static Mode getMode(Map params) { String modeParam = params.get("mode"); if ("textLevelOnly".equals(modeParam)) { mode = Mode.TEXTLEVEL_ONLY; - } else if ("allButTextLevelOnly".equals(modeParam)) { + } else if ("paragraphLevelOnly".equals(modeParam)) { mode = Mode.ALL_BUT_TEXTLEVEL_ONLY; } else if ("all".equals(modeParam)) { mode = Mode.ALL; @@ -174,7 +174,7 @@ static Mode getMode(Map params) { // used in undocumented API for /words/add, /words/delete; ignore mode = Mode.ALL; } else { - throw new BadRequestException("Mode must be one of 'textLevelOnly', 'allButTextLevelOnly', or 'all' but was: '" + modeParam + "'"); + throw new BadRequestException("Mode must be one of 'textLevelOnly', 'paragraphLevelOnly', or 'all' but was: '" + modeParam + "'"); } } else { mode = Mode.ALL; diff --git a/languagetool-standalone/CHANGES.md b/languagetool-standalone/CHANGES.md index 80b948e17ceb..a4075aeecd69 100644 --- a/languagetool-standalone/CHANGES.md +++ b/languagetool-standalone/CHANGES.md @@ -1203,7 +1203,7 @@ and Russian. * New setting `fasttextModel` (see https://fasttext.cc/docs/en/language-identification.html) and `fasttextBinary` (see https://fasttext.cc/docs/en/support.html). With these options set, the automatic language detection is much better than the built-in one. - * Experimental new `mode` parameter with `all`, `textLevelOnly`, or `allButTextLevelOnly` as value: + * Experimental new `mode` parameter with `all`, `textLevelOnly`, or `paragraphLevelOnly` as value: Will check only text-level rules or all other rules. As there are fewer text-level rules, this is usually much faster and the access limit for characters per minute that can be checked is more generous for this mode.