org.aksw.simba.largerdfbench.util

## Class StatsGenerator

- java.lang.Object
- - org.aksw.simba.largerdfbench.util.StatsGenerator

-     public class StatsGenerator
      extends java.lang.Object

  Precision, Recall, and F1 generator
  Author:
    Saleem

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StatsGenerator()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.util.ArrayList<java.lang.String>` | `getActualResultsFromFile(java.lang.String resultsFile)` The actual query results from file
    `static java.util.ArrayList<java.lang.String>` | `getCurrentResult(org.openrdf.query.TupleQueryResult res)` Get the current results of the query execution
    `static java.lang.String` | `getFscores(java.lang.String queryFile, java.util.ArrayList<java.lang.String> curResults)` Get Precison, Recall, and F1 Score for the given query results
    `static java.lang.String` | `getFscores(java.lang.String queryFile, org.openrdf.query.TupleQueryResult res)` Get Precison, Recall, and F1 Score for the given query results
    `static java.util.ArrayList<java.lang.String>` | `getMissingResults(java.lang.String actualResultsFile, java.util.ArrayList<java.lang.String> curResults)` Get the list of missing results (if any) the query execution
    `static java.util.ArrayList<java.lang.String>` | `getMissingResults(java.lang.String actualResultsFile, org.openrdf.query.TupleQueryResult res)` Get the list of missing results (if any) the query execution
    `static void` | `main(java.lang.String[] args)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StatsGenerator

          public StatsGenerator()

  - ### Method Detail

    - #### main

          public static void main(java.lang.String[] args)
                           throws org.openrdf.repository.RepositoryException,
                                  org.openrdf.query.MalformedQueryException,
                                  org.openrdf.query.QueryEvaluationException,
                                  java.io.IOException

      Throws:
        `org.openrdf.repository.RepositoryException`
        `org.openrdf.query.MalformedQueryException`
        `org.openrdf.query.QueryEvaluationException`
        `java.io.IOException`

    - #### getActualResultsFromFile

          public static java.util.ArrayList<java.lang.String> getActualResultsFromFile(java.lang.String resultsFile)
                                                                                throws java.io.IOException

      The actual query results from file
      Parameters:
        `resultsFile` - Specific query results file
      Returns:
        actualResults Set of actual results
      Throws:
        `java.io.IOException`

    - #### getFscores

          public static java.lang.String getFscores(java.lang.String queryFile,
                                                    org.openrdf.query.TupleQueryResult res)
                                             throws org.openrdf.query.QueryEvaluationException,
                                                    org.openrdf.repository.RepositoryException,
                                                    org.openrdf.query.MalformedQueryException,
                                                    java.io.IOException

      Get Precison, Recall, and F1 Score for the given query results
      Parameters:
        `queryFile` - Query file containing actual results of the query.
        `res` - ResultSet Iterator
      Returns:
        Fscores Precision, Recall, and F1 scores
      Throws:
        `org.openrdf.query.QueryEvaluationException`
        `org.openrdf.repository.RepositoryException`
        `org.openrdf.query.MalformedQueryException`
        `java.io.IOException`

    - #### getFscores

          public static java.lang.String getFscores(java.lang.String queryFile,
                                                    java.util.ArrayList<java.lang.String> curResults)
                                             throws org.openrdf.query.QueryEvaluationException,
                                                    org.openrdf.repository.RepositoryException,
                                                    org.openrdf.query.MalformedQueryException,
                                                    java.io.IOException

      Get Precison, Recall, and F1 Score for the given query results
      Parameters:
        `queryFile` - Query file containing actual results of the query.
        `curResults` - Current Results in array each bindings values should be separated by the same separator as used in actual results files. In our BigRDFBench results, we used <===> as separator.
      Returns:
        Fscores Precision, Recall, and F1 scores
      Throws:
        `org.openrdf.query.QueryEvaluationException`
        `org.openrdf.repository.RepositoryException`
        `org.openrdf.query.MalformedQueryException`
        `java.io.IOException`

    - #### getMissingResults

          public static java.util.ArrayList<java.lang.String> getMissingResults(java.lang.String actualResultsFile,
                                                                                org.openrdf.query.TupleQueryResult res)
                                                                         throws org.openrdf.query.QueryEvaluationException,
                                                                                org.openrdf.repository.RepositoryException,
                                                                                org.openrdf.query.MalformedQueryException,
                                                                                java.io.IOException

      Get the list of missing results (if any) the query execution
      Parameters:
        `actualResultsFile` - Query file of actual results
        `res` - ResultSet Iterator
      Returns:
        Fscores Precision, Recall, and F1 scores
      Throws:
        `org.openrdf.query.QueryEvaluationException`
        `org.openrdf.repository.RepositoryException`
        `org.openrdf.query.MalformedQueryException`
        `java.io.IOException`

    - #### getMissingResults

          public static java.util.ArrayList<java.lang.String> getMissingResults(java.lang.String actualResultsFile,
                                                                                java.util.ArrayList<java.lang.String> curResults)
                                                                         throws org.openrdf.query.QueryEvaluationException,
                                                                                org.openrdf.repository.RepositoryException,
                                                                                org.openrdf.query.MalformedQueryException,
                                                                                java.io.IOException

      Get the list of missing results (if any) the query execution
      Parameters:
        `actualResultsFile` - Query file of actual results
        `curResults` - current Results
      Returns:
        Fscores Precision, Recall, and F1 scores
      Throws:
        `org.openrdf.query.QueryEvaluationException`
        `org.openrdf.repository.RepositoryException`
        `org.openrdf.query.MalformedQueryException`
        `java.io.IOException`

    - #### getCurrentResult

          public static java.util.ArrayList<java.lang.String> getCurrentResult(org.openrdf.query.TupleQueryResult res)
                                                                        throws org.openrdf.query.QueryEvaluationException

      Get the current results of the query execution
      Parameters:
        `res` - ResultSet iterator
      Returns:
        curResults List of results
      Throws:
        `org.openrdf.query.QueryEvaluationException`