|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsofie.maxsat.Hypothesis
public class Hypothesis
Class Hypothesis This class is part of the SOFIE system (http://mpii.de/yago-naga/sofie). It is licensed under the Creative Commons Attribution-Noncommercial-Share-Alike 3.0 Unported License (http://creativecommons.org/licenses/by-nc-sa/3.0/) by Fabian M. Suchanek (http://suchanek.name). If you use this class for scientific purposes, please cite Fabian M. Suchanek, Mauro Sozio, Gerhard Weikum "SOFIE: A Self-Organizing Framework for Information Extraction" (International World Wide Web Conference 2009) This class prepresents a hypothesis with 2 or more arguments for SOFIE.
Nested Class Summary | |
---|---|
static class |
Hypothesis.Truth
3-valued Truth values |
Field Summary | |
---|---|
protected java.util.List<java.lang.String> |
components
Holds the relation followed by the arguments |
static basics.datagraph.Relation |
DISAMBIGUATEDAS
Special Relation: disambiguatedAs(wordInContext,entity) |
static basics.datagraph.Relation |
DISAMBIGUATIONPRIOR
Special Relation: disambiguationPrior(wordInContext,entity) |
static basics.datagraph.Relation |
FLAGSET
Special Relation: flagSet(flagName) |
static basics.datagraph.Relation |
PATTERNOCCURRENCES
Special Relation: patternOccurrences(patternId,x,y,count) |
protected double |
priority
Holds the priority of this hypothesis |
protected basics.datagraph.Relation |
relation
Holds the relation, if it is a registered relation |
protected double |
value
Holds the confidence value |
static basics.datagraph.LiteralYagoClass |
WORDINCONTEXT
Special class for wordInContext |
Constructor Summary | |
---|---|
|
Hypothesis(boolean value,
java.util.List<java.lang.String> components)
Constructs a fact |
|
Hypothesis(boolean value,
basics.datagraph.Relation rel,
java.lang.String... args)
Constructs a fact |
|
Hypothesis(boolean value,
java.lang.String... components)
Constructs a fact |
|
Hypothesis(double value,
java.util.List<java.lang.String> components)
Constructs a fact |
|
Hypothesis(double value,
basics.datagraph.Relation rel,
java.lang.String... args)
Constructs a fact |
|
Hypothesis(double value,
java.lang.String... components)
Constructs a fact |
protected |
Hypothesis(Hypothesis hyp)
Copies a hypothesis |
|
Hypothesis(java.lang.String... components)
Constructs a fact |
Method Summary | |
---|---|
java.lang.String |
arg(int i)
Returns the i-th argument (0-based) |
int |
compareTo(Hypothesis o)
Standard compareTo |
java.lang.String |
component(int i)
Returns the i-th component (0-based) |
java.util.List<java.lang.String> |
components()
Returns the components |
boolean |
containsPolysem()
TRUE is any component is a polysem |
boolean |
equals(java.lang.Object obj)
|
int |
hashCode()
|
boolean |
hasVirtualRelation()
TRUE if the relation is virtual |
static boolean |
isEntity(java.lang.String s)
True if a string is not null and starts not with a '^' |
static boolean |
isPolysem(java.lang.String s)
True if a string starts with a '^' |
static boolean |
isString(java.lang.String s)
True if a string is not null and starts with a '"' |
static boolean |
isVariable(java.lang.String s)
True if a string starts with a '?' |
int |
numArgs()
Returns the number of arguments |
int |
numComponents()
Returns the number of components |
double |
priority()
Returns the priority |
basics.datagraph.Relation |
relationIfKnown()
Returns the relation |
java.lang.String |
relationName()
Returns the relation name (or variable) |
void |
saveTo(long id,
javatools.filehandlers.CSVFile out)
Stores a hypothesis with 2 arguments to writer |
void |
saveTo(long id,
javatools.database.Database.Inserter hypBulki)
Stores a hypothesis with 2 arguments to a database |
void |
setPriority(double v)
Sets the priority |
static void |
setRelations()
Adds the relations to the gloabl contains |
double |
setValue(boolean v)
Sets the value |
double |
setValue(double v)
Sets the value |
double |
setValue(Hypothesis.Truth v)
Sets the value |
java.lang.String |
toString()
|
boolean |
trace()
TRUE for hypotheses that are to be traced |
double |
value()
Returns the current value |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final basics.datagraph.LiteralYagoClass WORDINCONTEXT
public static final basics.datagraph.Relation PATTERNOCCURRENCES
public static final basics.datagraph.Relation FLAGSET
public static final basics.datagraph.Relation DISAMBIGUATIONPRIOR
public static final basics.datagraph.Relation DISAMBIGUATEDAS
protected java.util.List<java.lang.String> components
protected basics.datagraph.Relation relation
protected double value
protected double priority
Constructor Detail |
---|
protected Hypothesis(Hypothesis hyp)
public Hypothesis(double value, java.util.List<java.lang.String> components)
public Hypothesis(double value, java.lang.String... components)
public Hypothesis(double value, basics.datagraph.Relation rel, java.lang.String... args)
public Hypothesis(boolean value, basics.datagraph.Relation rel, java.lang.String... args)
public Hypothesis(boolean value, java.lang.String... components)
public Hypothesis(java.lang.String... components)
public Hypothesis(boolean value, java.util.List<java.lang.String> components)
Method Detail |
---|
public static void setRelations()
public boolean trace()
public static boolean isPolysem(java.lang.String s)
public static boolean isEntity(java.lang.String s)
public static boolean isString(java.lang.String s)
public static boolean isVariable(java.lang.String s)
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public double priority()
public void setPriority(double v)
public double value()
public double setValue(double v)
public double setValue(boolean v)
public double setValue(Hypothesis.Truth v)
public java.lang.String arg(int i)
public java.lang.String component(int i)
public java.util.List<java.lang.String> components()
public basics.datagraph.Relation relationIfKnown()
public java.lang.String relationName()
public int numArgs()
public int numComponents()
public boolean hasVirtualRelation()
public int compareTo(Hypothesis o)
compareTo
in interface java.lang.Comparable<Hypothesis>
public boolean containsPolysem()
public void saveTo(long id, javatools.database.Database.Inserter hypBulki) throws java.sql.SQLException
java.sql.SQLException
public void saveTo(long id, javatools.filehandlers.CSVFile out) throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |