Remove or fix some automatic API comments
Change-Id: I73c5b3e2e0e6b3fcdc9afca07d73971d785059d1
diff --git a/src/main/java/de/ids_mannheim/korap/tokenizer/KorapTokenizer.java b/src/main/java/de/ids_mannheim/korap/tokenizer/KorapTokenizer.java
index b6ff7e4..e177bb5 100644
--- a/src/main/java/de/ids_mannheim/korap/tokenizer/KorapTokenizer.java
+++ b/src/main/java/de/ids_mannheim/korap/tokenizer/KorapTokenizer.java
@@ -7,12 +7,6 @@
import java.io.Reader;
import java.lang.reflect.InvocationTargetException;
-/**
- * The interface Korap tokenizer.
- *
- * @author kupietz
- * @version $Id: $Id
- */
public interface KorapTokenizer extends opennlp.tools.tokenize.Tokenizer, opennlp.tools.sentdetect.SentenceDetector {
/**
* Scan.
@@ -24,7 +18,7 @@
/**
* Mainly targeted language(s)
*
- * @return list of ISO 639 alpha-2 or alpha-3 language codes
+ * @return array of ISO 639 alpha-2 or alpha-3 language codes
* @apiNote will later be used to find appropriate implementations via reflection
*/
CharSequence[] getTargetLanguages();
@@ -92,12 +86,6 @@
*/
String[] sentDetect(String s);
- /**
- * Sent pos detect span [ ].
- *
- * @param s the s
- * @return the span [ ]
- */
Span[] sentPosDetect(String s);
/**
@@ -125,67 +113,31 @@
return this;
}
- /**
- * Split sentences builder.
- *
- * @param splitSentences the split sentences
- * @return the builder
- */
public Builder splitSentences(boolean splitSentences) {
this.splitSentences = splitSentences;
return this;
}
- /**
- * Sets echo.
- *
- * @param echo the echo
- * @return the echo
- */
public Builder setEcho(boolean echo) {
this.echo = echo;
return this;
}
- /**
- * Print offsets builder.
- *
- * @param printOffsets the print offsets
- * @return the builder
- */
public Builder printOffsets(boolean printOffsets) {
this.printOffsets = printOffsets;
return this;
}
- /**
- * Print tokens builder.
- *
- * @param printTokens the print tokens
- * @return the builder
- */
public Builder printTokens(boolean printTokens) {
this.printTokens = printTokens;
return this;
}
- /**
- * Input reader builder.
- *
- * @param inputReader the input reader
- * @return the builder
- */
public Builder inputReader(Reader inputReader) {
this.inputReader = inputReader;
return this;
}
- /**
- * Normalize builder.
- *
- * @param normalize the normalize
- * @return the builder
- */
public Builder normalize(boolean normalize) {
this.normalize = normalize;
return this;
diff --git a/src/main/java/de/ids_mannheim/korap/tokenizer/Languages.java b/src/main/java/de/ids_mannheim/korap/tokenizer/Languages.java
index e5e67c4..623edc8 100644
--- a/src/main/java/de/ids_mannheim/korap/tokenizer/Languages.java
+++ b/src/main/java/de/ids_mannheim/korap/tokenizer/Languages.java
@@ -1,16 +1,5 @@
package de.ids_mannheim.korap.tokenizer;
-/**
- * The interface Languages.
- *
- * @author kupietz
- * @version $Id: $Id
- */
public @interface Languages {
- /**
- * Value string [ ].
- *
- * @return the string [ ]
- */
String[] value();
}
diff --git a/src/main/java/de/ids_mannheim/korap/tokenizer/Main.java b/src/main/java/de/ids_mannheim/korap/tokenizer/Main.java
index ca298ab..bf6a1dc 100644
--- a/src/main/java/de/ids_mannheim/korap/tokenizer/Main.java
+++ b/src/main/java/de/ids_mannheim/korap/tokenizer/Main.java
@@ -18,7 +18,7 @@
import java.util.stream.Collectors;
/**
- * The type Main.
+ * The Main class.
*
* @author kupietz
* @version $Id: $Id
@@ -67,19 +67,16 @@
return null;
}
- /**
- * The type Available languages list.
- */
static class AvailableLanguagesList extends ArrayList<String> {
/**
- * Instantiates a new Available languages list.
+ * Instantiates a new list of available languages.
*/
AvailableLanguagesList() {
super(listKorAPTokenizerLanguages());
}
/**
- * List kor ap tokenizer languages list.
+ * Get list of supported KorAP tokenizer languages.
*
* @return the list
*/
@@ -100,9 +97,6 @@
}
}
- /**
- * The type Available korap tokenizer list.
- */
static class AvailableKorapTokenizerList extends ArrayList<String> {
/**
* Instantiates a new Available korap tokenizer list.
@@ -112,7 +106,7 @@
}
/**
- * List kor ap tokenizer implementations list.
+ * Get list of KorAPTokenizer implementations.
*
* @return the list
*/
@@ -127,25 +121,14 @@
}
}
- /**
- * The Tokenizer class name.
- */
@CommandLine.Option(names = {"-T", "--tokenizer-class"},
completionCandidates= AvailableKorapTokenizerList.class,
description = "Class name of the actual tokenizer that will be used (candidates: ${COMPLETION-CANDIDATES} default: ${DEFAULT-VALUE})")
String tokenizerClassName = DEFAULT_TOKENIZER_CLASS_NAME;
- /**
- * The Language.
- */
String language = DEFAULT_LANGUAGE;
- /**
- * Sets language.
- *
- * @param requestedLanguage the requested language
- */
@CommandLine.Option(names = {"-l", "--language"},
completionCandidates = AvailableLanguagesList.class,
description = "ISO-639-1 two letter language code (valid candidates: ${COMPLETION-CANDIDATES}; default: " + DEFAULT_LANGUAGE + ")")
@@ -160,55 +143,31 @@
language = requestedLanguage;
}
- /**
- * The Tokens.
- */
@CommandLine.Option(names = {"--no-tokens"}, negatable = true, description = "Print tokens (default: ${DEFAULT-VALUE})")
boolean tokens = true;
- /**
- * The Positions.
- */
@CommandLine.Option(names = {"-p", "--positions"}, description = "Print token start and end positions as character offsets (default: ${DEFAULT-VALUE})")
boolean positions = false;
- /**
- * The Sentencize.
- */
@CommandLine.Option(names = {"-s", "--sentence-boundaries"}, description = "Print sentence boundary positions (default: ${DEFAULT-VALUE})")
boolean sentencize = false;
- /**
- * The Ktt.
- */
@CommandLine.Option(names = {"-ktt"}, hidden = true, description = "Deprecated. For internal use only. (default: ${DEFAULT-VALUE})")
boolean ktt = false;
- /**
- * The Normalize.
- */
@CommandLine.Option(names = {"-n", "--normalize"}, description = "Normalize tokens (default: ${DEFAULT-VALUE})")
boolean normalize = false;
- /**
- * The Output filename.
- */
@SuppressWarnings("CanBeFinal")
@CommandLine.Option(names = {"-o",
"--output-file"}, paramLabel = "FILE", description = "Output file (default: ${DEFAULT-VALUE})")
String output_filename = "-";
- /**
- * The Encoding.
- */
@SuppressWarnings("CanBeFinal")
@CommandLine.Option(names = {"-e",
"--encoding"}, description = "Input encoding (default: ${DEFAULT-VALUE})")
Charset encoding = StandardCharsets.UTF_8;
- /**
- * The Force overwrite.
- */
@SuppressWarnings("CanBeFinal")
@CommandLine.Option(names = {"--force"}, description = "Force overwrite (default: ${DEFAULT-VALUE})")
boolean force_overwrite = false;
diff --git a/src/main/java/de/ids_mannheim/korap/tokenizer/Utils.java b/src/main/java/de/ids_mannheim/korap/tokenizer/Utils.java
index 40c3026..64c85a1 100644
--- a/src/main/java/de/ids_mannheim/korap/tokenizer/Utils.java
+++ b/src/main/java/de/ids_mannheim/korap/tokenizer/Utils.java
@@ -6,18 +6,12 @@
import java.nio.file.FileAlreadyExistsException;
import java.nio.file.Files;
-/**
- * The type Utils.
- *
- * @author kupietz
- * @version $Id: $Id
- */
public class Utils {
/**
- * Create file file.
+ * Create a file.
*
- * @param fname the fname
- * @param force_overwrite the force overwrite
+ * @param fname file name
+ * @param force_overwrite force overwrite flag
* @return the file
*/
public static File createFile(String fname, boolean force_overwrite) {