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

How to use
filterAnnotations
method
in
uk.gov.dstl.baleen.uima.utils.TypeUtils

Best Java code snippets using uk.gov.dstl.baleen.uima.utils.TypeUtils.filterAnnotations (Showing top 8 results out of 315)

origin: dstl/baleen

/**
 * Build the structure hierarchy, by first collecting all the annotations.
 *
 * @param jCas the jCas
 * @param annotationTypes the annotations classes to use
 * @return the root structure node
 */
protected static <T extends Annotation> Node<T> buildRoot(
  JCas jCas, Set<Class<? extends T>> annotationTypes) {
 return build(
   TypeUtils.filterAnnotations(
     JCasUtil.select(jCas, BaleenAnnotation.class), annotationTypes));
}
origin: uk.gov.dstl.baleen/baleen-uima

/**
 * Build the structure hierarchy, by first collecting all the annotations.
 *
 * @param jCas the jCas
 * @param annotationTypes the annotations classes to use
 * @return the root structure node
 */
protected static <T extends Annotation> Node<T> buildRoot(
  JCas jCas, Set<Class<? extends T>> annotationTypes) {
 return build(
   TypeUtils.filterAnnotations(
     JCasUtil.select(jCas, BaleenAnnotation.class), annotationTypes));
}
origin: uk.gov.dstl.baleen/baleen-uima

 /**
  * Build the covering index of baleen annotations by structure annotations (lazily) filtered to
  * only the given structural classes
  *
  * @param jCas the jCas
  * @param structuralClasses the structural classes
  * @return the covering index
  */
 private static Map<Annotation, Collection<Structure>> buildCovering(
   JCas jCas, Set<Class<? extends Structure>> structuralClasses) {
  return Maps.transformValues(
    JCasUtil.indexCovering(jCas, BaleenAnnotation.class, Structure.class),
    s -> TypeUtils.filterAnnotations(s, structuralClasses));
 }
}
origin: dstl/baleen

 /**
  * Build the covering index of baleen annotations by structure annotations (lazily) filtered to
  * only the given structural classes
  *
  * @param jCas the jCas
  * @param structuralClasses the structural classes
  * @return the covering index
  */
 private static Map<Annotation, Collection<Structure>> buildCovering(
   JCas jCas, Set<Class<? extends Structure>> structuralClasses) {
  return Maps.transformValues(
    JCasUtil.indexCovering(jCas, BaleenAnnotation.class, Structure.class),
    s -> TypeUtils.filterAnnotations(s, structuralClasses));
 }
}
origin: dstl/baleen

 /**
  * Build the structure hierarchy for the given jCas, using only the structural classes provided.
  *
  * <p>The structure is built by first using the offset of the Structure annotation and then using
  * the depth.
  *
  * @param jCas the jCas
  * @param types the structural classes
  * @return the Structure base AnnotationHierachy
  */
 public static StructureHierarchy build(JCas jCas, Set<Class<? extends Structure>> types) {
  final List<Structure> structures =
    filterAnnotations(JCasUtil.select(jCas, Structure.class), types);
  return new StructureHierarchy(AnnotationHierarchyBuilder.build(structures));
 }
}
origin: uk.gov.dstl.baleen/baleen-uima

 /**
  * Build the structure hierarchy for the given jCas, using only the structural classes provided.
  *
  * <p>The structure is built by first using the offset of the Structure annotation and then using
  * the depth.
  *
  * @param jCas the jCas
  * @param types the structural classes
  * @return the Structure base AnnotationHierachy
  */
 public static StructureHierarchy build(JCas jCas, Set<Class<? extends Structure>> types) {
  final List<Structure> structures =
    filterAnnotations(JCasUtil.select(jCas, Structure.class), types);
  return new StructureHierarchy(AnnotationHierarchyBuilder.build(structures));
 }
}
origin: uk.gov.dstl.baleen/baleen-graph

TypeUtils.filterAnnotations(JCasUtil.select(jCas, Entity.class), options.getTypeClasses());
origin: dstl/baleen

TypeUtils.filterAnnotations(JCasUtil.select(jCas, Entity.class), options.getTypeClasses());
uk.gov.dstl.baleen.uima.utilsTypeUtilsfilterAnnotations

Javadoc

Filter the given annotations to only those contained in the given set

Popular methods of TypeUtils

  • getType
    For a given type name, look through the type system and return the matching class. If two types of t
  • getTypeClasses
    Get the given type classes by name or return all classes if null or empty
  • getAnnotationClasses
    Get the sub types of the given baleen annotation type
  • getClassFromType
  • getEntityClass
    Get the class of a specified type, that extends from the Entity base class

Popular in Java

  • Creating JSON documents from java classes using gson
  • setScale (BigDecimal)
  • scheduleAtFixedRate (Timer)
  • getExternalFilesDir (Context)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • 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