You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by jo...@apache.org on 2014/10/14 22:05:32 UTC
svn commit: r1631866 - in
/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools:
ml/maxent/quasinewton/LineSearch.java
tokenize/DetokenizationDictionary.java tokenize/Detokenizer.java
tokenize/SimpleTokenizer.java tokenize/TokenizerFactory.java
Author: joern
Date: Tue Oct 14 20:05:32 2014
New Revision: 1631866
URL: http://svn.apache.org/r1631866
Log:
OPENNLP-720 Fixed javadoc error
Modified:
opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/ml/maxent/quasinewton/LineSearch.java
opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/tokenize/DetokenizationDictionary.java
opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/tokenize/Detokenizer.java
opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/tokenize/SimpleTokenizer.java
opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/tokenize/TokenizerFactory.java
Modified: opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/ml/maxent/quasinewton/LineSearch.java
URL: http://svn.apache.org/viewvc/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/ml/maxent/quasinewton/LineSearch.java?rev=1631866&r1=1631865&r2=1631866&view=diff
==============================================================================
--- opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/ml/maxent/quasinewton/LineSearch.java (original)
+++ opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/ml/maxent/quasinewton/LineSearch.java Tue Oct 14 20:05:32 2014
@@ -26,7 +26,7 @@ public class LineSearch {
private static final double RHO = 0.5; // decrease of step size (must be from 0 to 1)
/**
- * Backtracking line search (see Nocedal & Wright 2006, Numerical Optimization, p. 37)
+ * Backtracking line search (see Nocedal & Wright 2006, Numerical Optimization, p. 37)
*/
public static void doLineSearch(Function function,
double[] direction, LineSearchResult lsr, double initialStepSize)
Modified: opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/tokenize/DetokenizationDictionary.java
URL: http://svn.apache.org/viewvc/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/tokenize/DetokenizationDictionary.java?rev=1631866&r1=1631865&r2=1631866&view=diff
==============================================================================
--- opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/tokenize/DetokenizationDictionary.java (original)
+++ opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/tokenize/DetokenizationDictionary.java Tue Oct 14 20:05:32 2014
@@ -78,11 +78,13 @@ public class DetokenizationDictionary {
private final Map<String, DetokenizationDictionary.Operation> operationTable =
new HashMap<String, DetokenizationDictionary.Operation>();
+
/**
* Initializes the current instance.
*
- * @param tokens
- * @param operations
+ * @param tokens an array of tokens that should be detokenized according to an operation
+ * @param operations an array of operations which specifies which operation
+ * should be used for the provided tokens
*/
public DetokenizationDictionary(String tokens[],
DetokenizationDictionary.Operation operations[]) {
Modified: opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/tokenize/Detokenizer.java
URL: http://svn.apache.org/viewvc/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/tokenize/Detokenizer.java?rev=1631866&r1=1631865&r2=1631866&view=diff
==============================================================================
--- opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/tokenize/Detokenizer.java (original)
+++ opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/tokenize/Detokenizer.java Tue Oct 14 20:05:32 2014
@@ -64,10 +64,10 @@ public interface Detokenizer {
* are connected without a space inbetween can be separated by
* a split marker.
*
- * @param tokens
+ * @param tokens the token which should be concatenated
* @param splitMarker the split marker or null
*
- * @return
+ * @return the concatenated tokens
*/
String detokenize(String tokens[], String splitMarker);
}
Modified: opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/tokenize/SimpleTokenizer.java
URL: http://svn.apache.org/viewvc/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/tokenize/SimpleTokenizer.java?rev=1631866&r1=1631865&r2=1631866&view=diff
==============================================================================
--- opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/tokenize/SimpleTokenizer.java (original)
+++ opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/tokenize/SimpleTokenizer.java Tue Oct 14 20:05:32 2014
@@ -88,10 +88,12 @@ public class SimpleTokenizer extends Abs
/**
+ *
+ * @param args the command line arguments
*
- * @param args
- *
- * @throws IOException
+ * @throws IOException if reading or writing from stdin or stdout fails in anyway
+ *
+ * @deprecated this method will be removed, use the new command line interface instead!
*/
@Deprecated
public static void main(String[] args) throws IOException {
Modified: opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/tokenize/TokenizerFactory.java
URL: http://svn.apache.org/viewvc/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/tokenize/TokenizerFactory.java?rev=1631866&r1=1631865&r2=1631866&view=diff
==============================================================================
--- opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/tokenize/TokenizerFactory.java (original)
+++ opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/tokenize/TokenizerFactory.java Tue Oct 14 20:05:32 2014
@@ -125,6 +125,16 @@ public class TokenizerFactory extends Ba
/**
* Factory method the framework uses create a new {@link TokenizerFactory}.
+ *
+ * @param subclassName the name of the class implementing the {@link TokenizerFactory}
+ * @param languageCode the language code the tokenizer should use
+ * @param abbreviationDictionary an optional dictionary containing abbreviations, or null if not present
+ * @param useAlphaNumericOptimization indicate if the alpha numeric optimization should be enabled or disabled
+ * @param alphaNumericPattern the pattern the alpha numeric optimization should use
+ *
+ * @return the instance of the Tokenizer Factory
+ *
+ * @throws InvalidFormatException if once of the input parameters doesn't comply if the expected format
*/
public static TokenizerFactory create(String subclassName,
String languageCode, Dictionary abbreviationDictionary,
@@ -175,6 +185,8 @@ public class TokenizerFactory extends Ba
/**
* Gets whether to use alphanumeric optimization.
+ *
+ * @return true if the alpha numeric optimization is enabled, otherwise false
*/
public boolean isUseAlphaNumericOptmization() {
if (this.useAlphaNumericOptimization == null && artifactProvider != null) {
@@ -198,7 +210,9 @@ public class TokenizerFactory extends Ba
}
/**
- * Gets the language code
+ * Retrieves the language code.
+ *
+ * @return the language code
*/
public String getLanguageCode() {
if (this.languageCode == null && artifactProvider != null) {
@@ -209,6 +223,8 @@ public class TokenizerFactory extends Ba
/**
* Gets the context generator
+ *
+ * @return a new instance of the context generator
*/
public TokenContextGenerator getContextGenerator() {
Factory f = new Factory();