Tabnine Logo
DetectorFactory.clear
Code IndexAdd Tabnine to your IDE (free)

How to use
clear
method
in
com.cybozu.labs.langdetect.DetectorFactory

Best Java code snippets using com.cybozu.labs.langdetect.DetectorFactory.clear (Showing top 3 results out of 315)

origin: apache/stanbol

public LanguageIdentifier() throws LangDetectException {
  DetectorFactory.clear();
  try {
    DetectorFactory.loadProfile(loadProfiles("profiles","profiles.cfg"));
  } catch (Exception e) {
    throw new LangDetectException(null, "Error in Initialization: "+e.getMessage());
  } 
}
/**
origin: org.opencms/langdetect-opencms

DetectorFactory.clear();
int count = 0;
int langsize = profiles.size();
origin: org.opencms/opencms-core

/**
 * Initializes the language detection.<p>
 */
private void initLanguageDetection() {
  try {
    // use a seed for initializing the language detection for making sure the
    // same probabilities are detected for the same document contents
    DetectorFactory.clear();
    DetectorFactory.setSeed(42L);
    DetectorFactory.loadProfile(loadProfiles(getAvailableLocales()));
  } catch (Exception e) {
    LOG.error(Messages.get().getBundle().key(Messages.INIT_I18N_LANG_DETECT_FAILED_0), e);
  }
}
com.cybozu.labs.langdetectDetectorFactoryclear

Javadoc

Clear loaded language profiles (reinitialization to be available)

Popular methods of DetectorFactory

  • create
    Construct Detector instance with smoothing parameter
  • loadProfile
    Load profiles from specified directory. This method must be called once before language detection.
  • setSeed
  • addProfile
  • createDetector

Popular in Java

  • Creating JSON documents from java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (Timer)
  • getApplicationContext (Context)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now