Examples of Terminology


Examples of edu.pitt.dbmi.nlp.noble.terminology.Terminology

   */
  public static void main(String[] args) throws Exception{
    //String server = "http://lexevsapi.nci.nih.gov/lexevsapi50/";
    String server = "http://lexevsapi60.nci.nih.gov/lexevsapi60/";
    //String server = "http://lexevsapi51.nci.nih.gov/lexevsapi51#NCI MetaThesaurus";
    Terminology term = new LexEVSRestTerminology(server);
    long time = System.currentTimeMillis();
    // ZFA_0001234 | C0025202
    System.out.println("--- lookup ---");
    Concept c = term.lookupConcept("C0025202");
    if(c != null){
      c.printInfo(System.out);
    }
    System.out.println("lookup time "+(System.currentTimeMillis()-time));
   
    System.out.println("--- search ---");
   
    time = System.currentTimeMillis();
    Concept [] cs = term.search("melanoma");
    for(Concept i: cs){
      i.printInfo(System.out);
    }
    System.out.println("lookup time "+(System.currentTimeMillis()-time));
  }
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.terminology.Terminology

    l.setConstraints(panel,c);
    panel.setLayout(l);
   
    terminologies = new JComboBox(getTerminologies());
    terminologies.setToolTipText("Select a terminology that will be used for coding");
    Terminology t = repository.getTerminology(DEFAULT_TERMINOLOGY);
    if(t != null)
      terminologies.setSelectedItem(t);
   
    input = new JTextField(30);
    input.setToolTipText("Select a directory with text documents (.txt) to process");
View Full Code Here

Examples of edu.pitt.terminology.Terminology

    l.setConstraints(panel,c);
    panel.setLayout(l);
   
    terminologies = new JComboBox(getTerminologies());
    terminologies.setToolTipText("Select a terminology that will be used for coding");
    Terminology t = repository.getTerminology(DEFAULT_TERMINOLOGY);
    if(t != null)
      terminologies.setSelectedItem(t);
   
    input = new JTextField(30);
    input.setToolTipText("Select a directory with text documents (.txt) to process");
View Full Code Here

Examples of edu.pitt.terminology.Terminology

          }
        }
      });
      sourcePanel.add(all);
      sourcePanel.add(new JSeparator(SwingConstants.HORIZONTAL));
      Terminology t = getTerminology();
      if(t != null){
        for(Source name: t.getSources()){
          JCheckBox b = new JCheckBox(name.getName());
          b.setOpaque(false);
          b.setToolTipText("<html><body><table><tr><td width=500>"+name.getDescription()+"</td></tr></table></body></html>");
          sourcePanel.add(b);
        }
View Full Code Here

Examples of edu.pitt.terminology.Terminology

    return options;
  }


  private String [] getSearchMethods() {
    Terminology t = getTerminology();
    return (t != null)?t.getSearchMethods():new String [] {""};
  }
View Full Code Here

Examples of edu.pitt.terminology.Terminology

    Terminology t = getTerminology();
    return (t != null)?t.getSearchMethods():new String [] {""};
  }

  private void doInfo() {
    Terminology d = getTerminology();
    JEditorPane text = new JEditorPane();
    text.setContentType("text/html; charset=UTF-8");
    text.setEditable(false);
    text.setPreferredSize(new Dimension(400,400));
    text.setBorder(new LineBorder(Color.gray));
   
    String desc = "<b>"+d.getName()+"</b> "+d.getVersion()+"<br>"+d.getURI()+"<hr>"+d.getDescription();
    if(d instanceof Terminology){
      desc +="<hr>";
      Terminology t = (Terminology) d;
      desc += "Languages: "+Arrays.toString(t.getLanguages())+"<br>";
      desc += "Sources: "+Arrays.toString(t.getSources())+"<br>";

    }
    text.setText(desc);
    JOptionPane.showMessageDialog(frame,text,"",JOptionPane.PLAIN_MESSAGE);
   
View Full Code Here

Examples of edu.pitt.terminology.Terminology

     
      File dir = IndexFinderTerminology.getPersistenceDirectory();
      for(File f: dir.listFiles()){
        String sf = IndexFinderTerminology.TERM_SUFFIX;
        if(f.getName().endsWith(sf)){
          Terminology t;
          try {
            t = new IndexFinderTerminology(f.getName().substring(0,f.getName().length()-sf.length()));
            terminologies.put(t.getName(),t);
          } catch (UnsupportedOperationException e){
            System.err.println("Corrupted termonology detected at "+f.getAbsolutePath()+". skipping ...");
          } catch (IOException e) {
            e.printStackTrace();
          }
View Full Code Here

Examples of edu.pitt.terminology.Terminology

  /**
   * @param args
   */
  public static void main(String[] args) throws Exception {
    Terminology term = new UMLSTerminology("oracle.jdbc.driver.OracleDriver",
        "jdbc:oracle:thin:@lnx01.dbmi.pitt.edu:1521:dbmi01", "umls","dbmi09umls");
   
    // lookup concept
    Concept melanoma = term.lookupConcept("C0025202");
    melanoma.printInfo(System.out);
    term.setFilterSources(term.getSources("NCI"));
    System.out.println("--");
    // do search
    long time = System.currentTimeMillis();
    for(String text: new String [] {"blue tumor"}){
      System.out.println("searching for: "+text);
      for(Concept c: term.search(text)){
        System.out.println(c.getCode()+" "+c.getName());
        c.initialize();
        c.printInfo(System.out);
        System.out.println(c.getCodes());
      }
View Full Code Here

Examples of edu.pitt.terminology.Terminology

    for(TemplateItem item: getTemplateItems()){
      items.appendChild(item.toElement(doc));
    }
   
    // add terminology
    Terminology term = getTerminology();
    if(term instanceof CompositTerminology){
      for(Terminology t : ((CompositTerminology)term).getTerminologies())
        root.appendChild(t.toElement(doc));
    }else{
      root.appendChild(term.toElement(doc));
    }
    // append template element
    return root;
  }
View Full Code Here

Examples of edu.pitt.terminology.Terminology

  }
 
 
 
  private void doAddRoot(){
    final Terminology ont = getSelectedTerminology();
    if(ont == null)
      return;
    if(query == null){
      query = new QueryTool();
      query.setPreferredSize(new Dimension(600,400));
    }
    if(ontologyExplorer == null){
      ontologyExplorer = new OntologyExplorer();
      ontologyExplorer.setPreferredSize(new Dimension(600,400));
    }
   
    query.setTerminology(ont);
    try {
      ontologyExplorer.setRoot(ont.getRootConcepts());
    } catch (TerminologyException e) {
      e.printStackTrace();
    }
   
    JTabbedPane tabs = new JTabbedPane();
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.