Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
corpus-services
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lange, Dr. Herbert
corpus-services
Commits
15da6271
Commit
15da6271
authored
4 years ago
by
Ferger, Anne
Browse files
Options
Downloads
Patches
Plain Diff
changes to the class when multiple languages are used
parent
3174b2c2
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/uni_hamburg/corpora/validation/LanguageToolChecker.java
+6
-8
6 additions, 8 deletions
...e/uni_hamburg/corpora/validation/LanguageToolChecker.java
with
6 additions
and
8 deletions
src/main/java/de/uni_hamburg/corpora/validation/LanguageToolChecker.java
+
6
−
8
View file @
15da6271
...
...
@@ -38,8 +38,8 @@ import org.jdom.JDOMException;
import
org.languagetool.rules.RuleMatch
;
import
org.languagetool.JLanguageTool
;
import
org.languagetool.language.GermanyGerman
;
//
import org.languagetool.language.BritishEnglish;
//
import org.languagetool.language.Russian;
import
org.languagetool.language.BritishEnglish
;
import
org.languagetool.language.Russian
;
/**
* A grammar and spelling error checker for EXB tiers mainly.
...
...
@@ -76,16 +76,14 @@ public class LanguageToolChecker extends Checker implements CorpusFunction {
if
(
language
.
equals
(
"de"
))
{
langTool
=
new
JLanguageTool
(
new
GermanyGerman
());
System
.
out
.
println
(
"Language set to German"
);
/*
}
else
if
(
language
.
equals
(
"en"
))
{
//needs to be English!
//
langTool = new JLanguageTool(new BritishEnglish());
//
System.out.println("Language set to English");
langTool
=
new
JLanguageTool
(
new
BritishEnglish
());
System
.
out
.
println
(
"Language set to English"
);
}
else
if
(
language
.
equals
(
"ru"
))
{
//needs to be Russian!
//langTool = new JLanguageTool(new Russian());
//System.out.println("Language set to Russian");
*/
langTool
=
new
JLanguageTool
(
new
Russian
());
System
.
out
.
println
(
"Language set to Russian"
);
}
else
{
Report
report
=
new
Report
();
report
.
addCritical
(
function
,
cd
,
"Missing languagetool resource for language "
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment