Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • master
  • 1.0-SNAPSHOT
2 results

Target

Select target project
  • nlpworkers/speller
1 result
Select Git revision
  • master
  • 1.0-SNAPSHOT
2 results
Show changes

Commits on Source 2

......@@ -12,9 +12,9 @@ import java.util.zip.ZipFile;
public class SpaCy {
/**Class that handles spacy input.*/
boolean loaded = false;
ArrayList<ArrayList<Integer>> properNounArray = null;
ArrayList<ArrayList<Integer>> foreignSentenceArray = null;
private boolean loaded = false;
private ArrayList<ArrayList<Integer>> properNounArray = null;
private ArrayList<ArrayList<Integer>> foreignSentenceArray = null;
/**Checks if spaCy correctly loaded input.*/
public boolean isLoaded() {
......@@ -55,7 +55,7 @@ public class SpaCy {
return inputText;
}
private static ArrayList<ArrayList<Integer>> processSpacyFiles(InputStream in) {
private ArrayList<ArrayList<Integer>> processSpacyFiles(InputStream in) {
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
String line;
ArrayList<ArrayList<Integer>> array = new ArrayList<>();
......
......@@ -21,8 +21,8 @@ import pl.clarin.ws.worker.Worker;
public class Speller extends Worker {
static Polish lang = null;
JLanguageTool langTool = null;
TextEdit textEditor = null;
private JLanguageTool langTool = null;
private TextEdit textEditor = null;
public static void main(String[] args) {
new Service<>(Speller.class);
......@@ -81,10 +81,6 @@ public class Speller extends Worker {
}
}
reader.close();
if (inputformat.equals("spacy")) {
zipFile.close();
textEditor.spacy.unload();
}
}
try {
......
......@@ -6,7 +6,7 @@ import org.languagetool.JLanguageTool;
import org.languagetool.rules.RuleMatch;
public class TextEdit {
SpaCy spacy = new SpaCy();
public SpaCy spacy = new SpaCy();
/**Class that corrects input text.*/
public String edit(String inputString, JLanguageTool langTool) throws Exception {
......