public final class StatsMatcher extends Object
(stats (meta ...) ((S P O) weight) (whereweight) )
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).Modifier and Type | Field and Description |
---|---|
static String |
COUNT |
static String |
META |
static Item |
OTHER |
static String |
STATS |
static double |
weightPO |
static double |
weightPO_small |
static double |
weightSP |
static double |
weightSP_small |
static double |
weightTypeO |
static double |
weightTypeO_small |
Constructor and Description |
---|
StatsMatcher() |
StatsMatcher(Item stats) |
StatsMatcher(String filename) |
Modifier and Type | Method and Description |
---|---|
void |
addPattern(Pattern pattern) |
void |
addPatterns(Node predicate,
double numProp)
Add patterns based solely on the predicate count and some guessing
|
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)
|
double |
match(Item subj,
Item pred,
Item obj)
Return the matching weight for the first triple match found,
else apply default value for fixed, unknnown predciate,
else return NOMATCH
|
double |
match(PatternTriple pTriple) |
double |
match(Triple t) |
void |
printSSE(PrintStream ps) |
String |
toString() |
public static final String STATS
public static final String META
public static final String COUNT
public static final Item OTHER
public static final double weightSP
public static final double weightPO
public static final double weightTypeO
public static final double weightSP_small
public static final double weightPO_small
public static final double weightTypeO_small
public StatsMatcher()
public StatsMatcher(String filename)
public StatsMatcher(Item stats)
public void addPatterns(Node predicate, double numProp)
public void addPatternsSmall(Node predicate, double numProp)
public void addPattern(Pattern pattern)
public double match(Triple t)
public double match(PatternTriple pTriple)
public double match(Item subj, Item pred, Item obj)
public void printSSE(PrintStream ps)
Licenced under the Apache License, Version 2.0