Tabnine Logo
AnnotationSuggestion.getCoveredText
Code IndexAdd Tabnine to your IDE (free)

How to use
getCoveredText
method
in
de.tudarmstadt.ukp.inception.recommendation.api.model.AnnotationSuggestion

Best Java code snippets using de.tudarmstadt.ukp.inception.recommendation.api.model.AnnotationSuggestion.getCoveredText (Showing top 6 results out of 315)

origin: inception-project/inception

record.setOffsetTokenBegin(-1);
record.setOffsetTokenEnd(-1);
record.setTokenText(aSuggestion.getCoveredText());
record.setAnnotation(aAlternativeLabel);
record.setLayer(aLayer);
origin: de.tudarmstadt.ukp.inception.app/inception-active-learning

@Override
public String getDetails(ActiveLearningSuggestionOfferedEvent aEvent)
{
  try {
    Details details = new Details();
    details.ann = new AnnotationDetails();
    details.ann.setBegin(aEvent.getCurrentRecommendation().getBegin());
    details.ann.setEnd(aEvent.getCurrentRecommendation().getEnd());
    details.ann.setText(aEvent.getCurrentRecommendation().getCoveredText());
    details.ann.setType(aEvent.getLayer().getName());
    details.annotationFeature = aEvent.getAnnotationFeature();
    details.currentLabel = aEvent.getCurrentRecommendation().getLabel();
    details.confidence = aEvent.getCurrentRecommendation().getConfidence();
    details.recommenderId = aEvent.getCurrentRecommendation().getRecommenderId();
    List<String> allLabelList = aEvent.getAllRecommendations().stream()
      .map(ao -> ao.getLabel()).collect(Collectors.toList());
    details.allLabels = String.join(", ", allLabelList);
    return JSONUtil.toJsonString(details);
  }
  catch (IOException e) {
    log.error("Unable to log event [{}]", aEvent, e);
    return "<ERROR>";
  }
}
origin: inception-project/inception

@Override
public String getDetails(ActiveLearningSuggestionOfferedEvent aEvent)
{
  try {
    Details details = new Details();
    details.ann = new AnnotationDetails();
    details.ann.setBegin(aEvent.getCurrentRecommendation().getBegin());
    details.ann.setEnd(aEvent.getCurrentRecommendation().getEnd());
    details.ann.setText(aEvent.getCurrentRecommendation().getCoveredText());
    details.ann.setType(aEvent.getLayer().getName());
    details.annotationFeature = aEvent.getAnnotationFeature();
    details.currentLabel = aEvent.getCurrentRecommendation().getLabel();
    details.confidence = aEvent.getCurrentRecommendation().getConfidence();
    details.recommenderId = aEvent.getCurrentRecommendation().getRecommenderId();
    List<String> allLabelList = aEvent.getAllRecommendations().stream()
      .map(ao -> ao.getLabel()).collect(Collectors.toList());
    details.allLabels = String.join(", ", allLabelList);
    return JSONUtil.toJsonString(details);
  }
  catch (IOException e) {
    log.error("Unable to log event [{}]", aEvent, e);
    return "<ERROR>";
  }
}
origin: de.tudarmstadt.ukp.inception.app/inception-active-learning

@Override
public String getDetails(ActiveLearningRecommendationEvent aEvent)
{
  try {
    ActiveLearningRecommendationDetails details = new ActiveLearningRecommendationDetails();
    details.ann = new AnnotationDetails();
    details.ann.setBegin(aEvent.getCurrentRecommendation().getBegin());
    details.ann.setEnd(aEvent.getCurrentRecommendation().getEnd());
    details.ann.setText(aEvent.getCurrentRecommendation().getCoveredText());
    details.ann.setType(aEvent.getLayer().getName());
    details.annotationFeature = aEvent.getAnnotationFeature();
    details.userAction = aEvent.getAction();
    details.currentLabel = aEvent.getCurrentRecommendation().getLabel();
    details.confidence = aEvent.getCurrentRecommendation().getConfidence();
    details.recommenderId = aEvent.getCurrentRecommendation().getRecommenderId();
    List<String> allLabelList = aEvent.getAllRecommendations().stream()
      .map(ao -> ao.getLabel()).collect(Collectors.toList());
    details.allLabels = String.join(", ", allLabelList);
    return JSONUtil.toJsonString(details);
  }
  catch (IOException e) {
    log.error("Unable to log event [{}]", aEvent, e);
    return "<ERROR>";
  }
}
origin: inception-project/inception

@Override
public String getDetails(ActiveLearningRecommendationEvent aEvent)
{
  try {
    ActiveLearningRecommendationDetails details = new ActiveLearningRecommendationDetails();
    details.ann = new AnnotationDetails();
    details.ann.setBegin(aEvent.getCurrentRecommendation().getBegin());
    details.ann.setEnd(aEvent.getCurrentRecommendation().getEnd());
    details.ann.setText(aEvent.getCurrentRecommendation().getCoveredText());
    details.ann.setType(aEvent.getLayer().getName());
    details.annotationFeature = aEvent.getAnnotationFeature();
    details.userAction = aEvent.getAction();
    details.currentLabel = aEvent.getCurrentRecommendation().getLabel();
    details.confidence = aEvent.getCurrentRecommendation().getConfidence();
    details.recommenderId = aEvent.getCurrentRecommendation().getRecommenderId();
    List<String> allLabelList = aEvent.getAllRecommendations().stream()
      .map(ao -> ao.getLabel()).collect(Collectors.toList());
    details.allLabels = String.join(", ", allLabelList);
    return JSONUtil.toJsonString(details);
  }
  catch (IOException e) {
    log.error("Unable to log event [{}]", aEvent, e);
    return "<ERROR>";
  }
}
origin: inception-project/inception

aBegin, aEnd, suggestion.getCoveredText(), feature, suggestion.getLabel()));
de.tudarmstadt.ukp.inception.recommendation.api.modelAnnotationSuggestiongetCoveredText

Popular methods of AnnotationSuggestion

  • getBegin
  • getConfidence
  • getEnd
  • getFeature
  • getLabel
  • getLayerId
  • getRecommenderId
  • isVisible
  • getDocumentName
  • getId
  • getOffset
  • getReasonForHiding
  • getOffset,
  • getReasonForHiding,
  • getRecommenderName,
  • getVID,
  • hide,
  • <init>,
  • equals,
  • getUiLabel,
  • show

Popular in Java

  • Finding current android device location
  • notifyDataSetChanged (ArrayAdapter)
  • onCreateOptionsMenu (Activity)
  • requestLocationUpdates (LocationManager)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top Vim 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