sentRep
Class RogetSentenceFactory

java.lang.Object
  extended by sentRep.RogetSentenceFactory
All Implemented Interfaces:
SentenceFactory

public class RogetSentenceFactory
extends java.lang.Object
implements SentenceFactory

Used to generate a sentence with Roget's concepts added to it.

Version:
1.3 Nov 2009
Author:
Alistair Kennedy

Nested Class Summary
 
Nested classes/interfaces inherited from interface sentRep.SentenceFactory
SentenceFactory.Resource
 
Field Summary
 RogetELKB elkb
           
 
Constructor Summary
RogetSentenceFactory()
          Builds a Roget's Sentence Representation maker
RogetSentenceFactory(java.lang.String year)
          Builds a Roget's Sentence Representation maker
 
Method Summary
 Sentence buildRepresentationVector(java.lang.String[] sWords)
          This finds all the words in sWords that appear in Roget's Thesaurus and represents them as weighted head groups, heads, pos's and paragraphs.
 Sentence buildRepresentationVector(java.lang.String[] sWords, int maxPhraseLength)
          This finds all the words in sWords that appear in Roget's Thesaurus and represents them as weighted head groups, heads, pos's and paragraphs.
 Sentence buildRepresentationVector(java.lang.String[] sWords, int maxPhraseLength, double mean)
          This finds all the words in sWords that appear in Roget's Thesaurus and represents them as weighted head groups, heads, pos's and paragraphs.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

elkb

public RogetELKB elkb
Constructor Detail

RogetSentenceFactory

public RogetSentenceFactory(java.lang.String year)
Builds a Roget's Sentence Representation maker

Parameters:
year -

RogetSentenceFactory

public RogetSentenceFactory()
Builds a Roget's Sentence Representation maker

Method Detail

buildRepresentationVector

public Sentence buildRepresentationVector(java.lang.String[] sWords)
This finds all the words in sWords that appear in Roget's Thesaurus and represents them as weighted head groups, heads, pos's and paragraphs. Words not found in Roget's will be included, but without any representation from Roget's Thesuaurs.

Specified by:
buildRepresentationVector in interface SentenceFactory
Parameters:
sWords -
Returns:
Sentence

buildRepresentationVector

public Sentence buildRepresentationVector(java.lang.String[] sWords,
                                          int maxPhraseLength)
This finds all the words in sWords that appear in Roget's Thesaurus and represents them as weighted head groups, heads, pos's and paragraphs. Words not found in Roget's will be included, but without any representation from Roget's Thesuaurs. Max phrase length is defined by caller.

Specified by:
buildRepresentationVector in interface SentenceFactory
Parameters:
sWords -
maxPhraseLength -
Returns:
Sentence

buildRepresentationVector

public Sentence buildRepresentationVector(java.lang.String[] sWords,
                                          int maxPhraseLength,
                                          double mean)
This finds all the words in sWords that appear in Roget's Thesaurus and represents them as weighted head groups, heads, pos's and paragraphs. Words not found in Roget's will be included, but without any representation from Roget's Thesuaurs. Max phrase length is defined by caller as is the mean.

Specified by:
buildRepresentationVector in interface SentenceFactory
Parameters:
sWords -
maxPhraseLength -
mean -
Returns:
Sentence