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 2011/01/24 17:01:05 UTC
svn commit: r1062850 -
/incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/doccat/DocumentCategorizerME.java
Author: joern
Date: Mon Jan 24 16:01:04 2011
New Revision: 1062850
URL: http://svn.apache.org/viewvc?rev=1062850&view=rev
Log:
OPENNLP-79 Added train method with default feature generation and cutoff/iterations as parameter
Modified:
incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/doccat/DocumentCategorizerME.java
Modified: incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/doccat/DocumentCategorizerME.java
URL: http://svn.apache.org/viewvc/incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/doccat/DocumentCategorizerME.java?rev=1062850&r1=1062849&r2=1062850&view=diff
==============================================================================
--- incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/doccat/DocumentCategorizerME.java (original)
+++ incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/doccat/DocumentCategorizerME.java Mon Jan 24 16:01:04 2011
@@ -174,6 +174,19 @@ public class DocumentCategorizerME imple
* @throws IOException
* @throws ObjectStreamException
*/
+ public static DoccatModel train(String languageCode, ObjectStream<DocumentSample> samples, int cutoff, int iterations) throws IOException {
+ return train(languageCode, samples, cutoff, iterations, defaultFeatureGenerator);
+ }
+
+ /**
+ * Trains a doccat model with default feature generation.
+ *
+ * @param languageCode
+ * @param samples
+ * @return
+ * @throws IOException
+ * @throws ObjectStreamException
+ */
public static DoccatModel train(String languageCode, ObjectStream<DocumentSample> samples) throws IOException {
return train(languageCode, samples, 5, 100, defaultFeatureGenerator);
}