Package edu.pitt.terminology.lexicon

Examples of edu.pitt.terminology.lexicon.Definition


        if(fields.length >= 5 ){
          String cui = fields[0].trim();
          String src = fields[4].trim();
          String text = fields[5].trim();
         
          Definition d = Definition.getDefinition(text);
          d.setSource(Source.getSource(src));
         
          // get concept from map
          Concept c = convertConcept(conceptMap.get(cui));
          if(c != null){
            c.addDefinition(d);
View Full Code Here


                    }
                  }
                }
               
                if(text != null){
                  Definition d = new Definition(text);
                  if(src != null)
                    d.setSource(src);
                  defs.add(d);
                }
              }
            }
          }
View Full Code Here

      result =  st.executeQuery();
      while(result.next()){
        String src  = result.getString("sab");
        String text = result.getString("def");
       
        Definition d = Definition.getDefinition(text);
        d.setSource(Source.getSource(src));
       
        definitions.add(d);
      }
      result.close();
      st.close();
View Full Code Here

    // do definitions
    List<Definition> deflist = new ArrayList<Definition>();
    IProperty def_p = ont.getProperty("definition");
    if(def_p != null){
      for(Object val : cls.getPropertyValues(def_p)){
        Definition d = new Definition(val.toString());
        deflist.add(d);
      }
    }
    setDefinitions(deflist.toArray(new Definition [0]));
   
View Full Code Here

        Matcher mt = pt.matcher(val.toString());
        if(mt.matches()){
          String text  = mt.group(1);
          String src   = mt.group(2);
         
          Definition d = new Definition(text);
          d.setSource(new Source(src));
          deflist.add(d);
        }
      }
    }
   
    IProperty adef_p = ont.getProperty("ALT_DEFINITION");
    if(adef_p != null){
      for(Object val : cls.getPropertyValues(adef_p)){
        Pattern pt = Pattern.compile(".*<.*:def-definition>(.*)</.*:def-definition><.*:def-source>(.*)</.*:def-source>.*");
        Matcher mt = pt.matcher(val.toString());
        if(mt.matches()){
          String text  = mt.group(1);
          String src   = mt.group(2);
         
          Definition d = new Definition(text);
          d.setSource(new Source(src));
          deflist.add(d);
        }
      }
    }
   
View Full Code Here

   */
  private Definition [] getDefinitions(){
    String [] com = getComments();
    Definition [] d = new Definition[com.length];
    for(int i=0;i<d.length;i++)
      d[i] = new Definition(com[i]);
    return d;
  }
View Full Code Here

TOP

Related Classes of edu.pitt.terminology.lexicon.Definition

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.