org.cogroo.text.impl
Class SentenceImpl

java.lang.Object
  extended by org.cogroo.text.impl.SentenceImpl
All Implemented Interfaces:
Sentence

public class SentenceImpl
extends Object
implements Sentence

The Sentence class contains the position of the sentence in the text and the list of word in it.


Constructor Summary
SentenceImpl(int start, int end, Document theDocument)
           
SentenceImpl(int start, int end, List<Token> tokens, Document theDocument)
           
 
Method Summary
 Node asTree()
           
 boolean equals(Object obj)
           
 List<Chunk> getChunks()
           
 int getEnd()
           
 int getStart()
           
 List<SyntacticChunk> getSyntacticChunks()
           
 String getText()
           
 List<Token> getTokens()
           
 double getTokensProb()
           
 int hashCode()
           
 void setBoundaries(int start, int end)
           
 void setChunks(List<Chunk> chunks)
           
 void setSyntacticChunks(List<SyntacticChunk> syntacticChunks)
           
 void setTokens(List<Token> tokens)
           
 void setTokensProb(double prob)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SentenceImpl

public SentenceImpl(int start,
                    int end,
                    Document theDocument)

SentenceImpl

public SentenceImpl(int start,
                    int end,
                    List<Token> tokens,
                    Document theDocument)
Method Detail

getText

public String getText()
Specified by:
getText in interface Sentence
Returns:
the String of the sentence

getTokens

public List<Token> getTokens()
Specified by:
getTokens in interface Sentence

setTokens

public void setTokens(List<Token> tokens)
Specified by:
setTokens in interface Sentence

getChunks

public List<Chunk> getChunks()
Specified by:
getChunks in interface Sentence

setChunks

public void setChunks(List<Chunk> chunks)
Specified by:
setChunks in interface Sentence

getSyntacticChunks

public List<SyntacticChunk> getSyntacticChunks()
Specified by:
getSyntacticChunks in interface Sentence

setSyntacticChunks

public void setSyntacticChunks(List<SyntacticChunk> syntacticChunks)
Specified by:
setSyntacticChunks in interface Sentence

asTree

public Node asTree()
Specified by:
asTree in interface Sentence

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getStart

public int getStart()
Specified by:
getStart in interface Sentence

getEnd

public int getEnd()
Specified by:
getEnd in interface Sentence

setBoundaries

public void setBoundaries(int start,
                          int end)
Specified by:
setBoundaries in interface Sentence

getTokensProb

public double getTokensProb()
Specified by:
getTokensProb in interface Sentence

setTokensProb

public void setTokensProb(double prob)
Specified by:
setTokensProb in interface Sentence


Copyright © 2012-2013 CoGrOO. All Rights Reserved.