|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.labs.minion.lextax.ConceptEntry
public class ConceptEntry
A dictionary entry that holds a concept in a taxonomy. This kind of entry does not have any associated postings. Rather, the information about the taxonomic structure is encoded directly into the entries in the dictionary.
| Field Summary | |
|---|---|
protected Dictionary |
dict
The dictionary containing this concept. |
protected int |
id
The ID of the concept. |
protected java.util.Set[] |
links
Links from this concept to other concepts. |
protected java.lang.String |
name
The name of the concept. |
| Constructor Summary | |
|---|---|
ConceptEntry()
Creates a new instance of ConceptEntry |
|
ConceptEntry(java.lang.Object name)
|
|
| Method Summary | |
|---|---|
int |
add(int linkType,
ConceptEntry c)
Adds a link to this concept. |
void |
add(Occurrence o)
Adds an occurrence to this index entry. |
void |
append(QueryEntry qe,
int start,
int[] idMap)
Appends the postings from another entry onto this one. |
int |
compareTo(java.lang.Object o)
|
void |
decodePostingsInfo(ReadableBuffer b,
int pos)
Decode a ConceptEntry from the buffer. |
void |
encodePostingsInfo(WriteableBuffer b)
Encodes any information associated with the postings onto the given buffer. |
boolean |
equals(java.lang.Object conceptEntry)
|
java.util.Set |
getAbbrevChildren()
|
java.util.Set |
getAbbrevParents()
|
java.util.Set |
getChildren()
Gets morph and instanceof and kindof children. |
java.util.Set[][] |
getChildrenLinkSet()
Gets links in Children direction |
java.util.Set |
getEntailsChildren()
Gets entailment children. |
java.util.Set |
getEntailsParents()
Gets Entails parents. |
Entry |
getEntry()
Gets a new entry that contains a copy of the data in this entry. |
Entry |
getEntry(java.lang.Object name)
Gets a new entry with the given name. |
int |
getID()
Gets the ID associated with this entry. |
java.util.Set |
getIkoChildren()
Gets kind-of children. |
java.util.Set |
getIkoParents()
Gets all varieties of kind-of(iko) parents. |
java.util.Set |
getInstanceOfChildren()
instance-of children. |
java.util.Set |
getInstanceOfParents()
Gets instance-of parents. |
protected java.util.Set |
getLinks(int linkType)
Gets links of a given type. |
protected java.util.Set[][] |
getLinkSet(int linkSet)
Gets the set of links of a given type. |
int |
getMaxFDT()
Gets the maximum document term frequency from this entry. |
java.util.Set |
getMisspellingChildren()
|
java.util.Set |
getMisspellingParents()
|
java.util.Set |
getMorphChildren()
Gets morphological children. |
java.util.Set |
getMorphParents()
Gets morphological parents. |
int |
getN()
Gets the number of postings associated with this entry. |
java.lang.Object |
getName()
Gets the name of this entry, which can be any object. |
java.util.Set |
getNicknameChildren()
|
java.util.Set |
getNicknameParents()
|
int |
getNumChannels()
Returns the number of channels needed to store or retrieve the postings for this entry type. |
java.util.Set[][] |
getParentLinkSet()
Gets links in Parent direction |
java.util.Set |
getParents()
Gets morph, kindof, senseof, and instanceof parents. |
Partition |
getPartition()
Gets the partition that this entry was drawn from. |
java.util.Set |
getSenseChildren()
Gets subsenses of this concept (sense children). |
java.util.Set |
getSenseParents()
Gets sense-of parents. |
long |
getTotalOccurrences()
Gets the total number of occurrences associated with this entry. |
java.util.Set |
getVariantOfChildren()
variant-of children. |
java.util.Set |
getVariantOfParents()
Gets variant-of parents. |
boolean |
hasFieldInformation()
Indicates whether the postings associated with this entry have field information. |
int |
hashCode()
|
boolean |
hasPositionInformation()
Indicates whether the postings associated with this entry have position information. |
PostingsIterator |
iterator(PostingsIteratorFeatures features)
Gets an iterator that will iterate through the postings associated with this entry. |
void |
readPostings()
We don't have any postings! |
void |
setDictionary(Dictionary dict)
Sets the dictionary that this entry was drawn from. |
void |
setID(int id)
Sets the ID associated with this entry. |
void |
setName(java.lang.Object name)
Sets the name of this entry. |
void |
setPostingsInput(PostingsInput[] postIn)
Sets the inputs that will be used to read postings for this entry. |
java.lang.String |
toString()
|
boolean |
writePostings(PostingsOutput[] out,
int[] idMap)
Writes the postings associated with this entry to some or all of the given channels. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String name
protected int id
protected Dictionary dict
protected java.util.Set[] links
| Constructor Detail |
|---|
public ConceptEntry()
public ConceptEntry(java.lang.Object name)
| Method Detail |
|---|
public void setName(java.lang.Object name)
IndexEntry
setName in interface EntrysetName in interface IndexEntryname - The name that we wish the entry to have.public void setID(int id)
IndexEntry
setID in interface EntrysetID in interface IndexEntryid - The id to use for this entry.public void add(Occurrence o)
IndexEntry
add in interface IndexEntryo - The occurrence to add.
public boolean writePostings(PostingsOutput[] out,
int[] idMap)
throws java.io.IOException
IndexEntry
writePostings in interface IndexEntryout - The outputs to which we will write the postings.idMap - A map from the IDs currently used in the postings to
the IDs that should be used when the postings are written to disk.
This may be null, in which case no remapping will
occur.
java.io.IOException - if there is any error writing the
postings.
public void append(QueryEntry qe,
int start,
int[] idMap)
IndexEntry
append in interface IndexEntryqe - The entry that we want to append onto this one.start - The new starting ID for the partition that the entry
was drawn from.idMap - A map from old IDs in the given postings to new IDs
with gaps removed for deleted data. If this is null,
then there are no deleted documents.public void encodePostingsInfo(WriteableBuffer b)
IndexEntry
encodePostingsInfo in interface IndexEntryb - The buffer onto which the postings information should be
encoded. The buffer will be positioned to the correct spot for the
encoding.public Entry getEntry(java.lang.Object name)
Entry
getEntry in interface Entryname - the name that we want to give the entry.
public Entry getEntry()
Entry
getEntry in interface Entrypublic java.lang.Object getName()
Entry
getName in interface Entrypublic int getID()
Entry
getID in interface Entrypublic int getN()
Entry
getN in interface Entrypublic long getTotalOccurrences()
EntryAt the moment, this is only really useful for entries from the main dictionary for a partition.
getTotalOccurrences in interface Entrypublic int getMaxFDT()
Entry
getMaxFDT in interface Entrypublic void setDictionary(Dictionary dict)
Entry
setDictionary in interface Entrypublic Partition getPartition()
Entry
getPartition in interface Entrypublic int getNumChannels()
Entry
getNumChannels in interface Entrypublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablepublic void setPostingsInput(PostingsInput[] postIn)
QueryEntry
setPostingsInput in interface QueryEntrypostIn - The channels from which the postings data can be read.
public void decodePostingsInfo(ReadableBuffer b,
int pos)
DiskTaxonomy
decodePostingsInfo in interface QueryEntryb - The buffer containing the encoded postings information.pos - The position in b where the postings
information can be found.QueryEntry.decodePostingsInfo(com.sun.labs.minion.util.buffer.ReadableBuffer, int),
DiskTaxonomy.merge(DiskTaxonomy[], String, File)
public void readPostings()
throws java.io.IOException
readPostings in interface QueryEntryjava.io.IOException - if there is any error reading the
postings.public boolean hasPositionInformation()
QueryEntry
hasPositionInformation in interface QueryEntrypublic boolean hasFieldInformation()
QueryEntry
hasFieldInformation in interface QueryEntrypublic PostingsIterator iterator(PostingsIteratorFeatures features)
QueryEntry
iterator in interface QueryEntryfeatures - A set of features that the iterator must support.
public int add(int linkType,
ConceptEntry c)
linkType - The type of link to add.c - The concept that the link is to.
public java.util.Set getVariantOfParents()
public java.util.Set getVariantOfChildren()
public java.util.Set getSenseParents()
public java.util.Set getSenseChildren()
public java.util.Set getParents()
public java.util.Set getNicknameParents()
public java.util.Set getNicknameChildren()
public java.util.Set getMorphParents()
public java.util.Set getMorphChildren()
public java.util.Set getMisspellingParents()
public java.util.Set getMisspellingChildren()
protected java.util.Set getLinks(int linkType)
public java.util.Set getInstanceOfParents()
public java.util.Set getInstanceOfChildren()
public java.util.Set getIkoParents()
public java.util.Set getIkoChildren()
public java.util.Set getEntailsParents()
public java.util.Set getEntailsChildren()
public java.util.Set getChildren()
public java.util.Set getAbbrevParents()
public java.util.Set getAbbrevChildren()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Set[][] getParentLinkSet()
protected java.util.Set[][] getLinkSet(int linkSet)
public java.util.Set[][] getChildrenLinkSet()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object conceptEntry)
equals in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||