|
jInfer | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.mff.ksi.jinfer.basicdtd.utils.DomainUtils
public final class DomainUtils
Utility functions for attribute domain handling.
Domain is the range of values an attribute may have.
In the context of this class, it is a hash map of
(attribute value, number of times it was used)
.
Field Summary | |
---|---|
static String |
ATTRIBUTE_CDATA
DTD's way of saying the attribute contains character data. |
static String |
ATTRIBUTE_IMPLIED
DTD's way of saying the attribute has an implied value. |
Method Summary | |
---|---|
static String |
getAttributeType(Map<String,Integer> domain,
int threshold)
For domain D of attribute A returns its description, or the type of A. |
static String |
getDefault(Map<String,Integer> domain,
double ratio)
Returns the default value for this domain (that is the value found with probability higher than ratio) or #IMPLIED, if there is no dominant value. |
static Map<String,Integer> |
getDomain(Attribute attribute)
Returns the domain of values of this attribute. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ATTRIBUTE_IMPLIED
public static final String ATTRIBUTE_CDATA
Method Detail |
---|
public static Map<String,Integer> getDomain(Attribute attribute)
public static String getDefault(Map<String,Integer> domain, double ratio)
ratio
- Minimal ratio of a single value occurence, above which it is
declared dominant and therefore default.
public static String getAttributeType(Map<String,Integer> domain, int threshold)
threshold
- Domains smaller or equal to this will be returned as an enum, larger as CDATA.
|
jInfer | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |