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

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


      Object key = findConceptMatch(tmp,conceptKeys);
      //System.err.println(tmp+" "+conceptKeys+" "+key);
      if(key != null){
        String ctext = null;
        Concept concept = null;
        Mention mention = null;
       
        if(key instanceof Concept){
          concept = (Concept) key;
          ctext = concept.getText();
        }else if(key instanceof  Mention){
          mention = (Mention)key;
          concept = mention.getConcept();
          ctext = mention.getText();
        }
       
        SentenceElement skey = new SentenceElement(lex.getCharOffset(),ctext,concept);
        skey.setMention(mention);
        // create new element
View Full Code Here


        // until other negation or stop word (retroactively)
        else if(token.isPostNegation() || token.isIndeterminate()){
          for(int j=0;j<negatableConcepts.size();j++){
            SentenceElement cns = negatableConcepts.get(j);
            if(cns.isConcept()){
              Mention lex = cns.getMention();
              if(token.isPostNegation()){
                Annotation a = new Annotation();
                a.setOffset(token.getOffset()+sent.getOffset());
                a.setText(token.getText());
               
                lex.setModality(Mention.MODALITY_NEGATED);
                lex.setModalityAnnotation(a);
              }else{
                Annotation a = new Annotation();
                a.setOffset(token.getOffset()+sent.getOffset());
                a.setText(token.getText());
               
                lex.setModality(Mention.MODALITY_UNCERTAIN);
                lex.setModalityAnnotation(a);
              }
            }
          }
        }
       
        // clear retro concepts
        negatableConcepts.clear();
       
      // if token is stop word then stop the negation process
      }else if (token.isStopWord()){
        negationConcept = null;
        negatableConcepts.clear();
        window = 0;
      // do the actual negation here
      }else if (token.isConcept()){
        if(negationConcept != null){
          Mention lex = token.getMention();
          Annotation a = new Annotation();
          a.setOffset(negationConcept.getOffset()+sent.getOffset());
          a.setText(negationConcept.getText());
         
          lex.setModality(Mention.MODALITY_NEGATED);
          lex.setModalityAnnotation(a);
   
        }else{
          negatableConcepts.add(token);
        }
        window ++;
View Full Code Here

      }
     
      // parse concept for its attributes and values
      Concept c = findConcept(templateItem.getFeature());
      if(c != null){
        Mention m = getMention(c);
        if(m != null)
          setFeature(new ItemInstance(templateItem.getFeature(),m));
      }
 
      // set attributes and modifiers
View Full Code Here

TOP

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

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.