congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
UimaSupport.remove
Code IndexAdd Tabnine to your IDE (free)

How to use
remove
method
in
uk.gov.dstl.baleen.uima.UimaSupport

Best Java code snippets using uk.gov.dstl.baleen.uima.UimaSupport.remove (Showing top 12 results out of 315)

origin: uk.gov.dstl.baleen/baleen-uima

/**
 * Remove an annotation to the JCas index, notifying UimaMonitor of the fact we have done so.
 *
 * <p>Relations that refer to the given annotation will also be removed.
 *
 * @param annot Annotation(s) to remove
 */
public void remove(Annotation... annotations) {
 remove(Arrays.asList(annotations));
}
origin: dstl/baleen

/**
 * Remove an annotation to the JCas index, notifying UimaMonitor of the fact we have done so.
 *
 * <p>Relations that refer to the given annotation will also be removed.
 *
 * @param annot Annotation(s) to remove
 */
public void remove(Annotation... annotations) {
 remove(Arrays.asList(annotations));
}
origin: dstl/baleen

/**
 * Remove an annotation to the JCas index, notifying UimaMonitor of the fact we have done so
 *
 * @param annot Annotation(s) to remove
 */
protected void removeFromJCasIndex(Annotation... annotations) {
 getSupport().remove(annotations);
}
origin: uk.gov.dstl.baleen/baleen-uima

/**
 * Remove an annotation to the JCas index, notifying UimaMonitor of the fact we have done so
 *
 * @param annot Annotation(s) to remove
 */
protected void removeFromJCasIndex(Collection<? extends Annotation> annotations) {
 getSupport().remove(annotations);
}
origin: dstl/baleen

/**
 * Remove an annotation to the JCas index, notifying UimaMonitor of the fact we have done so
 *
 * @param annot Annotation(s) to remove
 */
protected void removeFromJCasIndex(Collection<? extends Annotation> annotations) {
 getSupport().remove(annotations);
}
origin: uk.gov.dstl.baleen/baleen-uima

/**
 * Remove an annotation to the JCas index, notifying UimaMonitor of the fact we have done so
 *
 * @param annot Annotation(s) to remove
 */
protected void removeFromJCasIndex(Annotation... annotations) {
 getSupport().remove(annotations);
}
origin: uk.gov.dstl.baleen/baleen-uima

/**
 * Merge annotations whilst ignoring coreferences. It is recommended that mergeWithExisting(...)
 * is used instead as that will pass off to this method when appropriate
 *
 * @param existingAnnotation The annotation which is to be left in the document (merged)
 * @param annotations Annotation(s) which will be merged with existingAnnotation and then removed
 */
public void mergeWithExistingNoCoref(
  Annotation existingAnnotation, Collection<? extends Annotation> annotations) {
 for (Annotation a : annotations) {
  addMergeToHistory(existingAnnotation, a);
 }
 remove(annotations);
}
origin: dstl/baleen

/**
 * Merge annotations whilst ignoring coreferences. It is recommended that mergeWithExisting(...)
 * is used instead as that will pass off to this method when appropriate
 *
 * @param existingAnnotation The annotation which is to be left in the document (merged)
 * @param annotations Annotation(s) which will be merged with existingAnnotation and then removed
 */
public void mergeWithExistingNoCoref(
  Annotation existingAnnotation, Collection<? extends Annotation> annotations) {
 for (Annotation a : annotations) {
  addMergeToHistory(existingAnnotation, a);
 }
 remove(annotations);
}
origin: dstl/baleen

@Test
public void testRemoveAnnotationArray() {
 UimaSupport support = new UimaSupport(PIPELINE, UimaSupportTest.class, history, monitor, false);
 support.remove(location, md);
 assertEquals(0, JCasUtil.select(jCas, Location.class).size());
 assertEquals(0, JCasUtil.select(jCas, Metadata.class).size());
 // Location should not have history and id
 assertNotNull(location.getInternalId());
 assertFalse(support.getDocumentHistory(jCas).getHistory(location.getInternalId()).isEmpty());
}
origin: dstl/baleen

/**
 * Merge entity onto targetEntity (assuming they have the same ReferentTarget), updating
 * relationships as required.
 *
 * @return True if merge was successful, false otherwise
 */
private boolean mergeEntities(Entity entity, Entity targetEntity) {
 ReferenceTarget targetRef = targetEntity.getReferent();
 ReferenceTarget entityRef = entity.getReferent();
 if (mergeDistinctEntities || isSameTarget(targetRef, entityRef)) {
  addMergeToHistory(targetEntity, entity);
  // Update relationship pointers
  for (Relation r : getRelations(entity)) {
   if (r.getSource() == entity) {
    r.setSource(targetEntity);
   }
   if (r.getTarget() == entity) {
    r.setTarget(targetEntity);
   }
  }
  remove(entity);
  return true;
 } else {
  monitor.debug(
    "Not merging objects {} and {} as they have different referents",
    targetEntity.getInternalId(),
    entity.getInternalId());
  return false;
 }
}
origin: uk.gov.dstl.baleen/baleen-uima

/**
 * Merge entity onto targetEntity (assuming they have the same ReferentTarget), updating
 * relationships as required.
 *
 * @return True if merge was successful, false otherwise
 */
private boolean mergeEntities(Entity entity, Entity targetEntity) {
 ReferenceTarget targetRef = targetEntity.getReferent();
 ReferenceTarget entityRef = entity.getReferent();
 if (mergeDistinctEntities || isSameTarget(targetRef, entityRef)) {
  addMergeToHistory(targetEntity, entity);
  // Update relationship pointers
  for (Relation r : getRelations(entity)) {
   if (r.getSource() == entity) {
    r.setSource(targetEntity);
   }
   if (r.getTarget() == entity) {
    r.setTarget(targetEntity);
   }
  }
  remove(entity);
  return true;
 } else {
  monitor.debug(
    "Not merging objects {} and {} as they have different referents",
    targetEntity.getInternalId(),
    entity.getInternalId());
  return false;
 }
}
origin: dstl/baleen

verify(support, only()).remove(annotation);
resetMocked();
verify(support, only()).remove(list);
resetMocked();
uk.gov.dstl.baleen.uimaUimaSupportremove

Javadoc

Remove an annotation to the JCas index, notifying UimaMonitor of the fact we have done so.

Relations that refer to the given annotation will also be removed.

Popular methods of UimaSupport

  • getDocumentAnnotation
    Return the document annotation.
  • add
    Add an annotation to the JCas index, notifying UimaMonitor of the fact we have done so
  • getDocumentHistory
    Get (or create) the history associated with the document.
  • <init>
    New instance.
  • getRelations
    Get relations that have a given entity as either the source or the target
  • mergeWithExisting
    Merge an existing annotation with old annotations, removing the old annotations.
  • mergeWithNew
    Add a new annotation, which is merged from the old annotations, removing the old annotations.
  • addMergeToHistory
  • addToHistory
    Adds a event to the history for this jcas document.
  • getPipelineName
    Get the name of the pipeline to which this belongs.
  • isSameTarget
  • mergeEntities
    Merge entity onto targetEntity (assuming they have the same ReferentTarget), updating relationships
  • isSameTarget,
  • mergeEntities,
  • mergeWithExistingNoCoref

Popular in Java

  • Updating database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • setRequestProperty (URLConnection)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • From CI to AI: The AI layer in your organization
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