Codota Logo
LanguageDetectorCrossValidator.getDocumentCount
Code IndexAdd Codota to your IDE (free)

How to use
getDocumentCount
method
in
opennlp.tools.langdetect.LanguageDetectorCrossValidator

Best Java code snippets using opennlp.tools.langdetect.LanguageDetectorCrossValidator.getDocumentCount (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: apache/opennlp

"Number of documents: " + validator.getDocumentCount());
origin: apache/opennlp

@Test
public void evaluate() throws Exception {
 TrainingParameters params = new TrainingParameters();
 params.put(TrainingParameters.ITERATIONS_PARAM, 100);
 params.put(TrainingParameters.CUTOFF_PARAM, 5);
 params.put("PrintMessages", false);
 final AtomicInteger correctCount = new AtomicInteger();
 final AtomicInteger incorrectCount = new AtomicInteger();
 LanguageDetectorCrossValidator cv = new LanguageDetectorCrossValidator(params,
   new LanguageDetectorFactory(), new LanguageDetectorEvaluationMonitor() {
    @Override
    public void correctlyClassified(LanguageSample reference,
                    LanguageSample prediction) {
     correctCount.incrementAndGet();
    }
    @Override
    public void missclassified(LanguageSample reference,
                  LanguageSample prediction) {
     incorrectCount.incrementAndGet();
    }
   });
 LanguageDetectorSampleStream sampleStream = LanguageDetectorMETest.createSampleStream();
 cv.evaluate(sampleStream, 2);
 Assert.assertEquals(99, cv.getDocumentCount());
 Assert.assertEquals(0.98989898989899, cv.getDocumentAccuracy(), 0.01);
}
origin: org.apache.opennlp/opennlp-tools

"Number of documents: " + validator.getDocumentCount());
origin: ai.idylnlp/idylnlp-opennlp-tools-1.8.3

"Number of documents: " + validator.getDocumentCount());
opennlp.tools.langdetectLanguageDetectorCrossValidatorgetDocumentCount

Javadoc

Retrieves the number of words which where validated over all iterations. The result is the amount of folds multiplied by the total number of words.

Popular methods of LanguageDetectorCrossValidator

  • <init>
    Creates a LanguageDetectorCrossValidator with the given FeatureGenerators.
  • evaluate
    Starts the evaluation.
  • getDocumentAccuracy
    Retrieves the accuracy for all iterations.

Popular in Java

  • Making http post requests using okhttp
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • orElseThrow (Optional)
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now