|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.labs.minion.lextax.Taxonomy
com.sun.labs.minion.lextax.DiskTaxonomy
public class DiskTaxonomy
| Nested Class Summary | |
|---|---|
protected class |
DiskTaxonomy.HE
|
| Field Summary | |
|---|---|
protected DiskDictionary |
dict
The dictionary for this partition. |
protected java.io.RandomAccessFile |
file
The file containing the taxonomy. |
protected static java.lang.String |
logTag
The tag for log messages. |
protected int |
morphDepthLimit
Subsumption search parameter: Limits number of morphological steps total along the path to a possible child node to explore. |
protected long[] |
offsets
The offsets of the concepts. |
protected boolean |
useAbbreviations
Subsumption search parameter: If true abbreviations find their target and full names also find the abbreviated version. |
protected boolean |
useEntailments
Subsumption search parameter: If true the inverse entailments of the taxonomy will be followed when doing subsumption. |
protected boolean |
useMisspellings
Subsumption search parameter: If true, marked known possible misspellings are used in subsumption in both directions. |
protected boolean |
useNicknames
Subsumption search parameter: If true nicknames find the full name and full name queries also return marked nicknames, such as "chuck" for "Charles" |
| Fields inherited from class com.sun.labs.minion.lextax.Taxonomy |
|---|
ABBREVIATION_OF, CHILDREN, ENTAILS, INSTANCE_OF, INV_ABBREVIATION_OF, INV_ENTAILS, INV_INSTANCE_OF, INV_KIND_OF, INV_MISSPELLING_OF, INV_MORPH_OF, INV_NICKNAME_OF, INV_SENSE_OF, INV_VARIANT_OF, KIND_OF, LINKCHARS, MISSPELLING_OF, MORPH_OF, NICKNAME_OF, NLINKS, NLINKTYPES, PARENTS, SENSE_OF, TOP, TOP_NAME, VARIANT_OF |
| Constructor Summary | |
|---|---|
DiskTaxonomy(java.io.File f,
DiskPartition p)
Instantiates a taxonomy from a file. |
|
| Method Summary | |
|---|---|
void |
close()
|
java.util.Set |
getChildren(int id)
Gets all the children for a given concept. |
java.util.Set |
getChildren(java.lang.String name)
Gets the children for a given name. |
ConceptEntry |
getConcept(int id)
Gets the given concept. |
ConceptEntry |
getConcept(java.lang.String name)
Gets the concept associated with a name. |
DiskDictionary |
getDict()
|
java.util.Set |
getInstanceOfChildren(int id)
Gets the instanceof children for a given concept. |
java.util.Set |
getInstanceOfParents(int id)
Gets the instanceof parents for a given concept. |
java.util.Set |
getKindOfChildren(int id)
Gets the kindof children for a given concept. |
java.util.Set |
getKindOfParents(int id)
Gets the kindof parents for a given concept. |
java.util.Set |
getMorphChildren(int id)
Gets the morphological children for a given concept. |
java.util.Set |
getMorphParents(int id)
Gets the morphological parents for a given concept. |
java.util.Set |
getParents(int id)
Gets all the parents for a given concept. |
java.util.Set |
getParents(java.lang.String name)
Gets the parents for a given name. |
java.util.Set |
getSubsumed(Entry entry,
int maxTerms)
Gets all the concepts subsumed by a given concept. |
java.util.Set |
getSubsumed(java.lang.String name,
int maxTerms)
Gets all the concepts subsumed by a given concept. |
void |
merge(DiskTaxonomy[] taxonomies,
java.lang.String indexDir,
java.io.File f)
Merges a number of taxonomies into a single one. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.io.RandomAccessFile file
protected DiskDictionary dict
protected long[] offsets
protected static java.lang.String logTag
protected int morphDepthLimit
protected boolean useAbbreviations
protected boolean useNicknames
protected boolean useMisspellings
protected boolean useEntailments
| Constructor Detail |
|---|
public DiskTaxonomy(java.io.File f,
DiskPartition p)
throws java.io.IOException
f - The file to read the taxonomy from.p - The partition that this taxonomy is for
java.io.IOException| Method Detail |
|---|
public void close()
throws java.io.IOException
java.io.IOExceptionpublic ConceptEntry getConcept(java.lang.String name)
public ConceptEntry getConcept(int id)
id - The id of the concept we want.public java.util.Set getMorphChildren(int id)
public java.util.Set getKindOfChildren(int id)
public java.util.Set getInstanceOfChildren(int id)
public java.util.Set getChildren(java.lang.String name)
public java.util.Set getChildren(int id)
public java.util.Set getMorphParents(int id)
public java.util.Set getKindOfParents(int id)
public java.util.Set getInstanceOfParents(int id)
public java.util.Set getParents(java.lang.String name)
public java.util.Set getParents(int id)
public java.util.Set getSubsumed(java.lang.String name,
int maxTerms)
name - The name of the term we want subsumed terms formaxTerms - The maximum number of terms to return
public java.util.Set getSubsumed(Entry entry,
int maxTerms)
entry - the Entry for the term we want subsumed terms formaxTerms - the maximum number of terms to return
public void merge(DiskTaxonomy[] taxonomies,
java.lang.String indexDir,
java.io.File f)
throws java.io.IOException
java.io.IOExceptionpublic DiskDictionary getDict()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||