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

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

public class LemmaCorpusCounts
extends java.lang.Object
implements PersistentObject

Lemma/corpus counts.

These count objects provide summary statistics for lemma/corpus combinations. Given a lemma and a corpus, we can quickly provide the following information using a two-column index on corpus/lemma:

These objects are used to quickly construct get info windows for words and lemmas and lexicon windows.


Constructor Summary
LemmaCorpusCounts()
          Creates a new lemma/corpus counts object.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns true if some other object is equal to this one.
 int getColFreq()
          Gets the collection frequency.
 Corpus getCorpus()
          Gets the corpus.
 int getDocFreq()
          Gets the document frequency.
 java.lang.Long getId()
          Gets the unique id.
 Lemma getLemma()
          Gets the lemma.
 java.lang.String getMajorClass()
          Gets the lemma's major word class.
 int getNumMajorClass()
          Gets the major word class count.
 int getRank1()
          Gets the lower rank.
 int getRank2()
          Gets the upper rank.
 Spelling getTag()
          Gets the lemma's tag.
 WordClass getWordClass()
          Gets the lemma's word class.
 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
 

Constructor Detail

LemmaCorpusCounts

public LemmaCorpusCounts()
Creates a new lemma/corpus counts object.

Method Detail

getId

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

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

getCorpus

public Corpus getCorpus()
Gets the corpus.

Returns:
The corpus.

getLemma

public Lemma getLemma()
Gets the lemma.

Returns:
The lemma.

getTag

public Spelling getTag()
Gets the lemma's tag.

Returns:
The lemma's tag.

getWordClass

public WordClass getWordClass()
Gets the lemma's word class.

Returns:
The lemma's word class.

getMajorClass

public java.lang.String getMajorClass()
Gets the lemma's major word class.

Returns:
The lemma's major word class.

getColFreq

public int getColFreq()
Gets the collection frequency.

Returns:
The collection frequency = the number of times the lemma occurs in the corpus.

getDocFreq

public int getDocFreq()
Gets the document frequency.

Returns:
The doucment frequency = the number of works in the corpus in which the lemma occurs.

getRank1

public int getRank1()
Gets the lower rank.

Returns:
The lower rank of this lemma among all the lemmas with the same major word class in the corpus.

getRank2

public int getRank2()
Gets the upper rank.

Returns:
The upper rank of this lemma among all the lemmas with the same major word class in the corpus.

getNumMajorClass

public int getNumMajorClass()
Gets the major word class count.

Returns:
The number of distinct lemmas in the corpus with the same major word class as this lemma.

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.