Package edu.pitt.dbmi.nlp.noble.coder.model

Examples of edu.pitt.dbmi.nlp.noble.coder.model.Sentence


        if(isException(s.toString()))
          continue;
       
       
        // save sentence
        sentences.add(new Sentence(s.toString(),s_offs,Sentence.TYPE_PROSE))
       
        // move start
        //st = i+1;
        s = new StringBuffer();
        s_offs = offset+i+1;
      }
    }
    // mop up in case you don't have a period at the end
    if(s.toString().trim().length() >0){
      sentences.add(new Sentence(s.toString(),s_offs,Sentence.TYPE_PROSE)); //+"." bad idea, we don't want to mess with offsets
    }
   
    return sentences;
  }
View Full Code Here


    t.addConcept(n);
    t.addConcept(a);
   
    String text = "The 2 kittens walked with a cat to a dog and killed 1 big fucking cat and  there was another cat";
    //t.search(text);
    Sentence s = t.process(new Sentence(text));
    System.out.println(s.getText());
    for(Mention m: s.getMentions()){
      System.out.println("\t"+m+" |"+m.getConcept().getCode()+"| "+m.getAnnotations());
    }
    System.out.println(s.getProcessTime());
   
  }
View Full Code Here

   * @param document
   * @return
   * @throws TerminologyException
   */
  public List<Mention> process(String text) throws TerminologyException {
    return process(new Sentence(text)).getMentions();
  }
View Full Code Here

TOP

Related Classes of edu.pitt.dbmi.nlp.noble.coder.model.Sentence

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.