org.cogroo.text.impl
Class SentenceImpl
java.lang.Object
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.
SentenceImpl
public SentenceImpl(int start,
int end,
Document theDocument)
SentenceImpl
public SentenceImpl(int start,
int end,
List<Token> tokens,
Document theDocument)
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.