Class StatsMatcher


  • public final class StatsMatcher
    extends java.lang.Object
    Stats format:
    (stats
        (meta ...)
        ((S P O) weight)
        ( weight)
      )
    where S, P, O is a URI, variable, literal or one of the words ANY (matches anything), VAR (matches a variable), TERM (matches a fixed URI, or literal), URI, BNODE, LITERAL (matches one of these types).
    • Constructor Detail

      • StatsMatcher

        public StatsMatcher()
      • StatsMatcher

        public StatsMatcher​(java.lang.String filename)
      • StatsMatcher

        public StatsMatcher​(Item stats)
    • Method Detail

      • addPatterns

        public void addPatterns​(Node predicate,
                                double numProp)
        Add patterns based solely on the predicate count and some guessing
      • addPatternsSmall

        public void addPatternsSmall​(Node predicate,
                                     double numProp)
        Add patterns based solely on the predicate count and some guessing for a small graph (less than a few thousand triples)
      • addPattern

        public void addPattern​(Pattern pattern)
      • match

        public double match​(Triple t)
      • match

        public double match​(Item subj,
                            Item pred,
                            Item obj)
        Return the matching weight for the first triple match found, else apply default value for fixed, unknown predicate, else return NOMATCH
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • printSSE

        public void printSSE​(java.io.OutputStream ps)