ca.site.elkb
Class RogetText

java.lang.Object
  extended by ca.site.elkb.RogetText
All Implemented Interfaces:
java.io.Serializable

public class RogetText
extends java.lang.Object
implements java.io.Serializable

Represents the Text of Roget's Thesaurus. The following information is maintained for the Text:

This information is also kept for all nouns, adjectives, verbs, adverbs and interjections.

Version:
1.4 2013
Author:
Mario Jarmasz and Alistsair Kennedy
See Also:
Serialized Form

Constructor Summary
RogetText()
          Default constructor.
RogetText(int capacity)
          Constructor which specifies the number of Heads contained in this RogetText.
RogetText(int capacity, java.lang.String fileName)
          Constructor that builds the RogetText object by specifying the number of Heads and using the information contained files which end with .txt.
RogetText(int capacity, java.lang.String fileName, java.lang.String extension)
          Constructor that builds the RogetText object by specifying the number of Heads and using the information contained files which end with the given extension.
RogetText(java.lang.String path)
          Constructor which specifies the directory in which the Heads are found.
 
Method Summary
 void addHead(Head headObj)
          Adds a Head object to this RogetText.
 void addHead(java.lang.String fileName)
          Adds a Head which is contained in the specified file to this RogetText.
 int getAdjCount()
          Returns the number of adjectives in this RogetText.
 int getAdjCRefCount()
          Returns the number of adjective Cross-references in this RogetText.
 int getAdjParaCount()
          Returns the number of adjective Paragraphs in this RogetText.
 int getAdjSeeCount()
          Returns the number of adjective See referencs in this RogetText.
 int getAdjSGCount()
          Returns the number of ajective Semicolon Groups in this RogetText.
 int getAdvCount()
          Returns the number of adverbs in this RogetText.
 int getAdvCRefCount()
          Returns the number of adverb Cross-references in this RogetText.
 int getAdvParaCount()
          Returns the number of adverb Paragraphs in this RogetText.
 int getAdvSeeCount()
          Returns the number of adverb See referencs in this RogetText.
 int getAdvSGCount()
          Returns the number of adverb Semicolon Groups in this RogetText.
 int getCRefCount()
          Returns the number of Cross-references in this RogetText.
 Head getHead(int headNum)
          Returns the Head with the specified number.
 int getHeadCount()
          Returns the number of Heads in this RogetText.
 int getIntCount()
          Returns the number of interjections in this RogetText.
 int getIntCRefCount()
          Returns the number of interjection Cross-references in this RogetText.
 int getIntParaCount()
          Returns the number of interjection Paragraphs in this RogetText.
 int getIntSeeCount()
          Returns the number of interjection See referencs in this RogetText.
 int getIntSGCount()
          Returns the number of interjection Semicolon Groups in this RogetText.
 int getNCount()
          Returns the number of nouns in this RogetText.
 int getNCRefCount()
          Returns the number of noun Cross-references in this RogetText.
 int getNParaCount()
          Returns the number of noun Paragraphs in this RogetText.
 int getNSeeCount()
          Returns the number of noun See referencs in this RogetText.
 int getNSGCount()
          Returns the number of noun Semicolon Groups in this RogetText.
 int getParaCount()
          Returns the number of Paragraphs in this RogetText.
 int getPhrCount()
          Returns the number of phrases in this RogetText.
 int getPhrCRefCount()
          Returns the number of phrase Cross-references in this RogetText.
 int getPhrParaCount()
          Returns the number of phrase Paragraphs in this RogetText.
 int getPhrSeeCount()
          Returns the number of phrase See referencs in this RogetText.
 int getPhrSGCount()
          Returns the number of phrase Semicolon Groups in this RogetText.
 int getPrefCount()
          Returns the number of preface in this RogetText.
 int getPrefCRefCount()
          Returns the number of preface Cross-references in this RogetText.
 int getPrefParaCount()
          Returns the number of preface Paragraphs in this RogetText.
 int getPrefSeeCount()
          Returns the number of preface See referencs in this RogetText.
 int getPrefSGCount()
          Returns the number of preface Semicolon Groups in this RogetText.
 int getPronCount()
          Returns the number of pronoun in this RogetText.
 int getPronCRefCount()
          Returns the number of pronoun Cross-references in this RogetText.
 int getPronParaCount()
          Returns the number of pronoun Paragraphs in this RogetText.
 int getPronSeeCount()
          Returns the number of pronoun See referencs in this RogetText.
 int getPronSGCount()
          Returns the number of pronoun Semicolon Groups in this RogetText.
 int getSeeCount()
          Returns the number of See referencs in this RogetText.
 int getSGCount()
          Returns the number of Semicolon Groups in this RogetText.
 int getVbCount()
          Returns the number of verbs in this RogetText.
 int getVbCRefCount()
          Returns the number of verb Cross-references in this RogetText.
 int getVbParaCount()
          Returns the number of verb Paragraphs in this RogetText.
 int getVbSeeCount()
          Returns the number of verb See referencs in this RogetText.
 int getVbSGCount()
          Returns the number of verb Semicolon Groups in this RogetText.
 int getWordCount()
          Returns the number of words and phrases in this RogetText.
 void printHead(int headNum)
          Prints the contents of a Head specified by its number to the standard output.
 java.lang.String toString()
          Converts to a string representation the RogetText object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RogetText

public RogetText()
Default constructor.


RogetText

public RogetText(int capacity)
Constructor which specifies the number of Heads contained in this RogetText.

Parameters:
capacity -

RogetText

public RogetText(int capacity,
                 java.lang.String fileName)
Constructor that builds the RogetText object by specifying the number of Heads and using the information contained files which end with .txt.

Parameters:
capacity -
fileName -

RogetText

public RogetText(java.lang.String path)
Constructor which specifies the directory in which the Heads are found.

Parameters:
path -

RogetText

public RogetText(int capacity,
                 java.lang.String fileName,
                 java.lang.String extension)
Constructor that builds the RogetText object by specifying the number of Heads and using the information contained files which end with the given extension.

Parameters:
capacity -
fileName -
extension -
Method Detail

addHead

public void addHead(Head headObj)
Adds a Head object to this RogetText.

Parameters:
headObj -

addHead

public void addHead(java.lang.String fileName)
Adds a Head which is contained in the specified file to this RogetText.

Parameters:
fileName -

getHead

public Head getHead(int headNum)
Returns the Head with the specified number.

Parameters:
headNum -
Returns:
Head

getHeadCount

public int getHeadCount()
Returns the number of Heads in this RogetText.

Returns:
number of heads

getParaCount

public int getParaCount()
Returns the number of Paragraphs in this RogetText.

Returns:
number of paragraphs

getNParaCount

public int getNParaCount()
Returns the number of noun Paragraphs in this RogetText.

Returns:
number of noun paragraphs

getAdjParaCount

public int getAdjParaCount()
Returns the number of adjective Paragraphs in this RogetText.

Returns:
number of adjective paragraphs

getVbParaCount

public int getVbParaCount()
Returns the number of verb Paragraphs in this RogetText.

Returns:
number of verb paragraphs

getAdvParaCount

public int getAdvParaCount()
Returns the number of adverb Paragraphs in this RogetText.

Returns:
number of adverb paragraphs

getIntParaCount

public int getIntParaCount()
Returns the number of interjection Paragraphs in this RogetText.

Returns:
number of interjection paragraphs

getPhrParaCount

public int getPhrParaCount()
Returns the number of phrase Paragraphs in this RogetText.

Returns:
number of phrase paragraphs

getPrefParaCount

public int getPrefParaCount()
Returns the number of preface Paragraphs in this RogetText.

Returns:
number of preface paragraphs

getPronParaCount

public int getPronParaCount()
Returns the number of pronoun Paragraphs in this RogetText.

Returns:
number of pronoun paragraphs

getSGCount

public int getSGCount()
Returns the number of Semicolon Groups in this RogetText.

Returns:
number of semicolon groups

getNSGCount

public int getNSGCount()
Returns the number of noun Semicolon Groups in this RogetText.

Returns:
number of noun semicolon groups

getAdjSGCount

public int getAdjSGCount()
Returns the number of ajective Semicolon Groups in this RogetText.

Returns:
number of adjective semicolon groups

getVbSGCount

public int getVbSGCount()
Returns the number of verb Semicolon Groups in this RogetText.

Returns:
number of verb semicolon groups

getAdvSGCount

public int getAdvSGCount()
Returns the number of adverb Semicolon Groups in this RogetText.

Returns:
number of adverb semicolon groups

getIntSGCount

public int getIntSGCount()
Returns the number of interjection Semicolon Groups in this RogetText.

Returns:
number of interjection semicolon groups

getPhrSGCount

public int getPhrSGCount()
Returns the number of phrase Semicolon Groups in this RogetText.

Returns:
number of phrase semicolon groups

getPrefSGCount

public int getPrefSGCount()
Returns the number of preface Semicolon Groups in this RogetText.

Returns:
number of preface semicolon groups

getPronSGCount

public int getPronSGCount()
Returns the number of pronoun Semicolon Groups in this RogetText.

Returns:
number of pronoun semicolon groups

getSeeCount

public int getSeeCount()
Returns the number of See referencs in this RogetText.

Returns:
number of see references

getNSeeCount

public int getNSeeCount()
Returns the number of noun See referencs in this RogetText.

Returns:
number of noun see references

getAdjSeeCount

public int getAdjSeeCount()
Returns the number of adjective See referencs in this RogetText.

Returns:
number of adjective see references

getVbSeeCount

public int getVbSeeCount()
Returns the number of verb See referencs in this RogetText.

Returns:
number of verb see references

getAdvSeeCount

public int getAdvSeeCount()
Returns the number of adverb See referencs in this RogetText.

Returns:
number of adverb see references

getIntSeeCount

public int getIntSeeCount()
Returns the number of interjection See referencs in this RogetText.

Returns:
number of interjection see references

getPhrSeeCount

public int getPhrSeeCount()
Returns the number of phrase See referencs in this RogetText.

Returns:
number of phrase see references

getPrefSeeCount

public int getPrefSeeCount()
Returns the number of preface See referencs in this RogetText.

Returns:
number of preface see references

getPronSeeCount

public int getPronSeeCount()
Returns the number of pronoun See referencs in this RogetText.

Returns:
number of pronoun see references

getCRefCount

public int getCRefCount()
Returns the number of Cross-references in this RogetText.

Returns:
number of crossreferences

getNCRefCount

public int getNCRefCount()
Returns the number of noun Cross-references in this RogetText.

Returns:
number of noun crossreferences

getAdjCRefCount

public int getAdjCRefCount()
Returns the number of adjective Cross-references in this RogetText.

Returns:
number of adjective crossreferences

getVbCRefCount

public int getVbCRefCount()
Returns the number of verb Cross-references in this RogetText.

Returns:
number of verb crossreferences

getAdvCRefCount

public int getAdvCRefCount()
Returns the number of adverb Cross-references in this RogetText.

Returns:
number of adverb crossreferences

getIntCRefCount

public int getIntCRefCount()
Returns the number of interjection Cross-references in this RogetText.

Returns:
number of interjection crossreferences

getPhrCRefCount

public int getPhrCRefCount()
Returns the number of phrase Cross-references in this RogetText.

Returns:
number of phrase crossreferences

getPrefCRefCount

public int getPrefCRefCount()
Returns the number of preface Cross-references in this RogetText.

Returns:
number of preface crossreferences

getPronCRefCount

public int getPronCRefCount()
Returns the number of pronoun Cross-references in this RogetText.

Returns:
number of pronoun crossreferences

getWordCount

public int getWordCount()
Returns the number of words and phrases in this RogetText.

Returns:
number of words

getNCount

public int getNCount()
Returns the number of nouns in this RogetText.

Returns:
number of nouns

getAdjCount

public int getAdjCount()
Returns the number of adjectives in this RogetText.

Returns:
number of adjectives

getVbCount

public int getVbCount()
Returns the number of verbs in this RogetText.

Returns:
number of verbs

getAdvCount

public int getAdvCount()
Returns the number of adverbs in this RogetText.

Returns:
number of adverbs

getIntCount

public int getIntCount()
Returns the number of interjections in this RogetText.

Returns:
number of interjections

getPhrCount

public int getPhrCount()
Returns the number of phrases in this RogetText.

Returns:
number of phrases

getPrefCount

public int getPrefCount()
Returns the number of preface in this RogetText.

Returns:
number of preface

getPronCount

public int getPronCount()
Returns the number of pronoun in this RogetText.

Returns:
number of pronoun

toString

public java.lang.String toString()
Converts to a string representation the RogetText object.

Overrides:
toString in class java.lang.Object

printHead

public void printHead(int headNum)
Prints the contents of a Head specified by its number to the standard output.

Parameters:
headNum -