Examples of DocumentAnnotation


Examples of org.apache.ctakes.ytex.uima.model.DocumentAnnotation

      String annoClass = anno.getClass().getName();
      if (!setTypesToIgnore.contains(annoClass)
          && this.uimaTypeMap.containsKey(annoClass)) {
        // should not ignore, and we know how to map this annotation
        listAnno.add(anno);
        DocumentAnnotation hibAnno = new DocumentAnnotation();
        hibAnno.setDocument(doc);
        hibAnno.setBegin(anno.getBegin());
        hibAnno.setEnd(anno.getEnd());
        hibAnno.setUimaType(uimaTypeMap.get(annoClass));
        sessionFactory.getCurrentSession().save(hibAnno);
        if (++count % batchSize == 0)
          sessionFactory.getCurrentSession().flush();
        doc.getDocumentAnnotations().add(hibAnno);
        mapAnnoToHib.put(anno, hibAnno);
View Full Code Here

Examples of org.apache.uima.jcas.tcas.DocumentAnnotation

        sEntity = s;
        break;
      }
    }
   
    DocumentAnnotation docAnnot = null;
   
    Collection<DocumentAnnotation> docAnnots =
        JCasUtil.select(jCas, DocumentAnnotation.class);
   
    if (!docAnnots.isEmpty())
    {
      Object[] docAnnotArray = docAnnots.toArray();
      docAnnot = (DocumentAnnotation) docAnnotArray[0];
    }
   
    if (sEntity!=null) {
     
      // but I actually need to find out if this sentence is preceded by
      // a newline or if I have to find the preceding one that does.
      if (docAnnot != null)
      {
        String doctext = docAnnot.getCoveredText();
        int sentStart = sEntity.getBegin();
       
        if (sentStart > 0)
        {
          boolean argInHistSection = false;
View Full Code Here

Examples of org.apache.uima.jcas.tcas.DocumentAnnotation

        sEntity = s;
        break;
      }
    }
   
    DocumentAnnotation docAnnot = null;
   
    Collection<DocumentAnnotation> docAnnots =
        JCasUtil.select(jCas, DocumentAnnotation.class);
   
    if (!docAnnots.isEmpty())
    {
      Object[] docAnnotArray = docAnnots.toArray();
      docAnnot = (DocumentAnnotation) docAnnotArray[0];
    }
   
    if (sEntity!=null) {
     
      // but I actually need to find out if this sentence is preceded by
      // a newline or if I have to find the preceding one that does.
      if (docAnnot != null)
      {
        String doctext = docAnnot.getCoveredText();
        int sentStart = sEntity.getBegin();
       
        if (sentStart > 0)
        {
          boolean argInHistSection = false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.