Tabnine Logo
SpellingAnomaly.getSuggestions
Code IndexAdd Tabnine to your IDE (free)

How to use
getSuggestions
method
in
de.tudarmstadt.ukp.dkpro.core.api.anomaly.type.SpellingAnomaly

Best Java code snippets using de.tudarmstadt.ukp.dkpro.core.api.anomaly.type.SpellingAnomaly.getSuggestions (Showing top 3 results out of 315)

origin: de.tudarmstadt.ukp.dkpro.core/de.tudarmstadt.ukp.dkpro.core.textnormalizer-asl

  /**
   * Just gets the Suggestion with the highest Certainty. In case there are more suggestions with
   * certainty 100, it passes the first highest one.
   * 
   * @param anomaly
   *            the anomaly.
   * @return the best suggestion.
   */
  private String getBestSuggestion(SpellingAnomaly anomaly)
  {
    Float bestCertainty = 0.0f;
    String bestReplacement = "";

    for (int i = 0; i < anomaly.getSuggestions().size(); i++) {
      Float currentCertainty = anomaly.getSuggestions(i).getCertainty();
      String currentReplacement = anomaly.getSuggestions(i).getReplacement();

      if (currentCertainty > bestCertainty) {
        bestCertainty = currentCertainty;
        bestReplacement = currentReplacement;
      }

      if (bestCertainty == 100) {
        break;
      }
    }

    return bestReplacement;
  }
}
origin: dkpro/dkpro-core

  sentence)) {
FSArray suggestedActions = anomaly.getSuggestions();
int n = suggestedActions.size();
FSArray newActions = new FSArray(jcas, n + 1);
origin: de.tudarmstadt.ukp.dkpro.core/de.tudarmstadt.ukp.dkpro.core.jazzy-asl

  sentence)) {
FSArray suggestedActions = anomaly.getSuggestions();
int n = suggestedActions.size();
FSArray newActions = new FSArray(jcas, n + 1);
de.tudarmstadt.ukp.dkpro.core.api.anomaly.typeSpellingAnomalygetSuggestions

Popular methods of SpellingAnomaly

  • <init>
  • addToIndexes
  • getBegin
  • getCoveredText
  • getEnd
  • readObject
    Write your own initialization here
  • setBegin
  • setEnd
  • setSuggestions

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSharedPreferences (Context)
  • setRequestProperty (URLConnection)
  • getSystemService (Context)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Permission (java.security)
    Legacy security code; do not use.
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Best plugins for Eclipse
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