Package au.csiro.ontology.importer.rf1

Examples of au.csiro.ontology.importer.rf1.RF1Importer$RoleValuePair


        long start = System.currentTimeMillis();
        IFactory factory = new CoreFactory();
        NormalisedOntology no = new NormalisedOntology(factory);
        System.out.println("Importing axioms");
       
        RF1Importer imp = new RF1Importer(
                this.getClass().getResourceAsStream(
                        "/sct1_Concepts_Core_INT_20110731.txt"),
                this.getClass().getResourceAsStream(
                        "/res1_StatedRelationships_Core_INT_20110731.txt"),
                version);
       
        Iterator<Ontology> it = imp.getOntologyVersions(new NullProgressMonitor());
       
        Ontology ont = null;
        while(it.hasNext()) {
            Ontology o = it.next();
            if(o.getVersion().equals("snomed")) {
View Full Code Here


        IFactory factory = new CoreFactory();
        NormalisedOntology no = new NormalisedOntology(factory);
        System.out.println("Importing axioms");
        InputStream conceptsFile = this.getClass().getResourceAsStream("/"+conceptsBase);
        InputStream relsFile = this.getClass().getResourceAsStream("/"+relsBase);
        RF1Importer imp = new RF1Importer(conceptsFile, relsFile, version);
       
        Iterator<Ontology> it = imp.getOntologyVersions(new NullProgressMonitor());
       
        Ontology ont = null;
        while(it.hasNext()) {
            Ontology o = it.next();
            if(o.getVersion().equals("snomed")) {
                ont = o;
                break;
            }
        }
       
        if(ont == null) {
            System.out.println("Could not find version " + version + " in input files");
        }
        System.out.println("Loading axioms");
        no.loadAxioms(new HashSet<Axiom>(ont.getStatedAxioms()));
        System.out.println("Running classification");
        no.classify();
        System.out.println("Computing taxonomy");
        no.buildTaxonomy();
        System.out.println("Done");

        // If a relationship that is part of a role group is added incrementally
        // on its own then it will not be added to the correct role group
        // because that information is missing. Therefore care must be taken to
        // remove all relationships that belong to a role group when deriving
        // a test case for incremental classification using RF1.

        System.out.println("Running incremental classification");
        imp = new RF1Importer(
                this.getClass().getResourceAsStream("/"+conceptsInc),
                this.getClass().getResourceAsStream("/"+relsInc),
                version);

        long start = System.currentTimeMillis();
        System.out.println("Transforming axioms");
       
        it = imp.getOntologyVersions(new NullProgressMonitor());
       
        ont = null;
        while(it.hasNext()) {
            Ontology o = it.next();
            if(o.getVersion().equals("snomed")) {
View Full Code Here

TOP

Related Classes of au.csiro.ontology.importer.rf1.RF1Importer$RoleValuePair

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.