edu.northwestern.at.wordhoard.model.counts
Class LemmaPosSpellingCounts

java.lang.Object
  extended by edu.northwestern.at.wordhoard.model.counts.LemmaPosSpellingCounts
All Implemented Interfaces:
PersistentObject

public class LemmaPosSpellingCounts
extends java.lang.Object
implements PersistentObject

Lemma/Pos/Spelling counts.

These count objects provide summary statistics for lemma, part of speech, and spelling combinations, at the corpus, work, and work part levels.


Field Summary
static byte CORPUS_COUNT
          Corpus count kind.
static byte WORK_COUNT
          Work count kind.
static byte WORK_PART_COUNT
          Work part count kind.
 
Constructor Summary
LemmaPosSpellingCounts()
          Creates a new lemma/pos/spelling counts object.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns true if some other object is equal to this one.
 Corpus getCorpus()
          Gets the corpus.
 int getFreq()
          Gets the frequency.
 int getFreqFirstWordPart()
          Gets the frequency for first word parts.
 java.lang.Long getId()
          Gets the unique id.
 byte getKind()
          Gets the count kind.
 Lemma getLemma()
          Gets the lemma.
 Pos getPos()
          Gets the part of speech.
 Spelling getSpelling()
          Gets the spelling.
 Work getWork()
          Gets the work.
 WorkPart getWorkPart()
          Gets the work part.
 int hashCode()
          Returns a hash code for the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CORPUS_COUNT

public static final byte CORPUS_COUNT
Corpus count kind.

See Also:
Constant Field Values

WORK_COUNT

public static final byte WORK_COUNT
Work count kind.

See Also:
Constant Field Values

WORK_PART_COUNT

public static final byte WORK_PART_COUNT
Work part count kind.

See Also:
Constant Field Values
Constructor Detail

LemmaPosSpellingCounts

public LemmaPosSpellingCounts()
Creates a new lemma/pos/spelling counts object.

Method Detail

getId

public java.lang.Long getId()
Gets the unique id.

Specified by:
getId in interface PersistentObject
Returns:
The unique id.

getKind

public byte getKind()
Gets the count kind.

Returns:
The count kind: CORPUS_COUNT, WORK_COUNT, or WORK_PART_COUNT.

getCorpus

public Corpus getCorpus()
Gets the corpus.

Returns:
The corpus.

getWork

public Work getWork()
Gets the work.

Returns:
The work, or null if corpus count.

getWorkPart

public WorkPart getWorkPart()
Gets the work part.

Returns:
The work part, or null if corpus count or work count.

getLemma

public Lemma getLemma()
Gets the lemma.

Returns:
The lemma.

getPos

public Pos getPos()
Gets the part of speech.

Returns:
The part of speech.

getSpelling

public Spelling getSpelling()
Gets the spelling.

Returns:
The spelling.

getFreq

public int getFreq()
Gets the frequency.

Returns:
The frequency = the number of times the lemma/pos/spelliing combination occurs in the corpus, work, or work part, that is, the number of word parts in the container with the combination.

getFreqFirstWordPart

public int getFreqFirstWordPart()
Gets the frequency for first word parts.

Returns:
The number if first word parts in the corpus, work, or work part with the lemma/pos/spelling combination.

equals

public boolean equals(java.lang.Object obj)
Returns true if some other object is equal to this one.

The two objects are equal if their ids are equal.

Overrides:
equals in class java.lang.Object
Parameters:
obj - The other object.
Returns:
True if this object equals the other object.

hashCode

public int hashCode()
Returns a hash code for the object.

Overrides:
hashCode in class java.lang.Object
Returns:
The hash code.