Package org.data2semantics.tools.rdf

Examples of org.data2semantics.tools.rdf.RDFDataSet


  /**
   * @param args
   */
  public static void main(String[] args) {
    RDFDataSet testSetA = new RDFFileDataSet(DATA_DIR + "aifb-fixed_complete.rdf", RDFFormat.RDFXML);
    //RDFDataSet testSetB = new RDFFileDataSet(DATA_DIR + "aifb-fixed_no_schema.n3", RDFFormat.N3);

    List<LinkPredictionDataSetParameters> dataSetsParams = new ArrayList<LinkPredictionDataSetParameters>();
    List<String> bl = new ArrayList<String>();
    bl.add("http://swrc.ontoware.org/ontology#affiliation");
View Full Code Here


    //---------


    // As one RDF graph dataset
    List<List<Statement>> rdfTriples2 = createMoleculeRDFGraphs(graphs, false);
    RDFDataSet ts = new RDFSingleDataSet();
    for (List<Statement> trips : rdfTriples2) {
      ts.addStatements(trips);
    }

    List<Resource> instances = new ArrayList<Resource>();

    List<Statement> stmts = ts.getStatementsFromStrings(null, RDF.TYPE.stringValue(), GraphUtils.NAMESPACE + "Molecule");
    for (Statement stmt : stmts) {
      instances.add(stmt.getSubject());
    }

    // Data graph
    DTGraph<String,String> sGraph = org.nodes.data.RDF.createDirectedGraph(ts.getStatements(null, null, null, false), null, null);

    //---------
    // Results Table
    ResultsTable resTable = new ResultsTable();
    resTable.setDigits(3);
View Full Code Here

    //*/


    // As one RDF graph dataset
    List<List<Statement>> rdfTriples2 = createMoleculeRDFGraphs(graphs, false);
    RDFDataSet ts = new RDFSingleDataSet();
    for (List<Statement> trips : rdfTriples2) {
      ts.addStatements(trips);
    }

    List<Resource> instances = new ArrayList<Resource>();

    List<Statement> is = ts.getStatementsFromStrings(null, RDF.TYPE.stringValue(), GraphUtils.NAMESPACE + "Molecule");
    for (Statement stmt : is) {
      instances.add(stmt.getSubject());
    }


    DTGraph<String,String> sGraph = org.nodes.data.RDF.createDirectedGraph(ts.getStatements(null, null, null, false), null, null);
    List<DTNode<String,String>> hubs = SlashBurn.getHubs(sGraph, 2, true);
    // (int) Math.round(0.05 * sGraph.nodes().size())
   
 
    Comparator<Node<String>> comp2 = new DegreeComparator<String>();
View Full Code Here

  private final static int NUMBER_OF_PROC = 6;



  public static void main(String[] args) {
    RDFDataSet testSetA = new RDFFileDataSet(DATA_DIR + "aifb-fixed_complete.rdf", RDFFormat.RDFXML);
    RDFDataSet testSetB = new RDFFileDataSet(DATA_DIR + "aifb-fixed_no_schema.n3", RDFFormat.N3);

    long[] seeds = {11,21,31,41,51,61,71,81,91,101};
    double[] cs = {0.001, 0.01, 0.1, 1, 10, 100, 1000}

    PropertyPredictionDataSet dataset;
View Full Code Here

  public void test() {
    List<String> bl = new ArrayList<String>();
    bl.add("http://swrc.ontoware.org/ontology#affiliation");
    bl.add("http://swrc.ontoware.org/ontology#employs");
   
    RDFDataSet testSet = new RDFFileDataSet("D:\\workspaces\\datasets\\aifb\\aifb-fixed_complete.rdf", RDFFormat.RDFXML);
    LinkPredictionDataSet set = DataSetFactory.createLinkPredictonDataSet(testSet, "http://swrc.ontoware.org/ontology#Person", "http://swrc.ontoware.org/ontology#ResearchGroup", "http://swrc.ontoware.org/ontology#affiliation", bl, 2, false, false);
    System.out.println(set.getLabel());
    System.out.println(set.getLabels().size());
  }
View Full Code Here

    List<PropertyPredictionDataSetParameters> dataSetsParams = new ArrayList<PropertyPredictionDataSetParameters>();
    //List<BinaryPropertyPredictionDataSetParameters> dataSetsParams = new ArrayList<BinaryPropertyPredictionDataSetParameters>();

   
    RDFDataSet testSetA = new RDFFileDataSet("D:\\workspaces\\datasets\\aifb\\aifb-fixed_complete.rdf", RDFFormat.RDFXML);
    RDFDataSet testSetB = new RDFFileDataSet("D:\\workspaces\\datasets\\aifb\\aifb-fixed_no_schema.n3", RDFFormat.N3);
    RDFDataSet testSetC = new RDFFileDataSet("D:\\workspaces\\datasets\\eswc-2012-complete.rdf", RDFFormat.RDFXML)
   


    List<String> bl = new ArrayList<String>();
    bl.add("http://swrc.ontoware.org/ontology#affiliation");
View Full Code Here

   
    List<String> bl = new ArrayList<String>();
    bl.add("http://swrc.ontoware.org/ontology#affiliation");
    bl.add("http://swrc.ontoware.org/ontology#employs");
   
    RDFDataSet testSet = new RDFFileDataSet("D:\\workspaces\\datasets\\aifb\\aifb-fixed_complete.rdf", RDFFormat.RDFXML);
    LinkPredictionDataSet set = DataSetFactory.createLinkPredictonDataSet(testSet, "http://swrc.ontoware.org/ontology#Person", "http://swrc.ontoware.org/ontology#ResearchGroup", "http://swrc.ontoware.org/ontology#affiliation", bl, 2, false, false);
   
   
   
   
View Full Code Here

TOP

Related Classes of org.data2semantics.tools.rdf.RDFDataSet

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.