Package edu.pitt.terminology

Examples of edu.pitt.terminology.CompositTerminology


    }
    //term.setCachingEnabled(false);
    if(terms.size() == 1){
      setTerminology(terms.get(0));
    }else{
      CompositTerminology ct = new CompositTerminology();
      ct.getTerminologies().addAll(terms);
      setTerminology(ct);
    }
   
    Element items = XMLUtils.getElementByTagName(element,"TemplateItems");
    for(Element i: XMLUtils.getElementsByTagName(items,"TemplateItem")){
View Full Code Here


    doc.setName(reportFile.getName());
    doc.setText(text);
    doc.getFilters().addAll(DocumentFilter.getDeIDFilters());
   
    // combine terminologies into a single instance and add filters
    CompositTerminology terminology = new CompositTerminology();
    for(Template t: templates){
      doc.getFilters().addAll(t.getFilters());
      terminology.addTerminology(t.getTerminology());
    }
   
   
    // do a simple parsing of this document
    long time = System.currentTimeMillis();
    int offset = 0;
    for(String line: getLines(doc.getFilteredDocument())){
      // skip synoptic sections
      if(doc.isSynopticSection(offset))
        continue;
   
      for(String sentence: getSentences(line)){
        for(String phrase: getPhrases(sentence) ){
          int offs = line.indexOf(phrase);
          for(Concept c: terminology.search(phrase,IndexFinderTerminology.BEST_MATCH)){
            for(Annotation a: c.getAnnotations()){ 
              if(a.getOffset() < (offset+offs))
                a.updateOffset(offset+offs);
              doc.addAnnotation(a);
            }
View Full Code Here

    IndexFinderTerminology aterm = new IndexFinderTerminology();
    aterm.loadOntology(POntology.loadOntology(ANATOMY_ONTOLOGY_URI),null,true,true);
    aterm.setCachingEnabled(false);
   
    // add a terminology to it
    CompositTerminology terminology = new CompositTerminology();
    terminology.addTerminology(term);
    terminology.addTerminology(aterm);
   
   
    // go over templates
    for(IClass template: ont.getClass("TEMPLATES").getDirectSubClasses()){
      // get orders
View Full Code Here

TOP

Related Classes of edu.pitt.terminology.CompositTerminology

Copyright © 2018 www.massapicom. 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.