Package edu.pitt.terminology.client

Examples of edu.pitt.terminology.client.IndexFinderTerminology


  private void addSlideTutorTemplates(String url) throws Exception {
    IOntology ont = POntology.loadOntology(url);
    ConceptRegistry.REGISTRY.put(url,SlideTutorConcept.class.getName());
   
    // create in-memory terminology from this ontology
    IndexFinderTerminology term = new IndexFinderTerminology();
    term.loadOntology(ont,null,true,true);
    term.setScoreConcepts(false);
    term.setSelectBestCandidate(false);
    term.setCachingEnabled(false);
   
    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);
View Full Code Here


        String name = terminologyParams.get(type).trim();
        try {
          File f = new File(name);
          if(f.getParentFile() != null)
            IndexFinderTerminology.setPersistenceDirectory(f.getParentFile());
          term = new IndexFinderTerminology(f.getName());
        } catch (IOException e) {
          throw new TerminologyException("Could not load IndexFinder terminology "+name,e);
        }
      }
    }catch(TerminologyException ex){
View Full Code Here

          .getResourceFilePath(PARAM_NOBLE_CODER_TERMINOLOGY_URL);
      File f = new File(terminologyPath);
      f = f.getParentFile().getParentFile();
      terminologyPath = f.getAbsolutePath() + File.separator + "META";
      System.out.println("terminologyPath is " + terminologyPath);
      terminology = new IndexFinderTerminology(terminologyPath);
    } catch (Exception e) {
      throw new ResourceInitializationException(e);
    }
  }
View Full Code Here

    return ont;
  }

 
  public Terminology createTerminology() throws TerminologyException {
    return new IndexFinderTerminology();
  }
View Full Code Here

      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

TOP

Related Classes of edu.pitt.terminology.client.IndexFinderTerminology

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.