|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.columbia.cs.ref.model.FeaturableObject
edu.columbia.cs.ref.model.Sentence
public class Sentence
The Class Sentence represents sentences that are present in a document.
A sentence is composed by three basic attributes:
1) The document where the sentence is contained
2) The starting index of the sentence in the document
3) The length of the sentence
Constructor Summary | |
---|---|
Sentence(Document d,
int offset,
int length)
Instantiates a new sentence. |
Method Summary | |
---|---|
int |
getLength()
Gets the length of the sentence. |
int |
getOffset()
Gets the starting index of the sentence in the document. |
java.lang.String |
getValue()
Gets the value of the sentence. |
Sentence |
merge(Sentence nextSentence)
Merge. |
void |
setLength(int length)
Sets the length of the sentence. |
void |
setOffset(int offset)
Sets the starting index of the sentence in the document. |
java.lang.String |
toString()
|
Methods inherited from class edu.columbia.cs.ref.model.FeaturableObject |
---|
getFeatures, setFeatures |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Sentence(Document d, int offset, int length)
d
- the doffset
- the offsetlength
- the lengthMethod Detail |
---|
public void setOffset(int offset)
offset
- the new starting index of the sentence in the documentpublic int getOffset()
public void setLength(int length)
length
- the new length of the sentencepublic int getLength()
public java.lang.String getValue()
public java.lang.String toString()
toString
in class java.lang.Object
public Sentence merge(Sentence nextSentence)
nextSentence
- the next sentence
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |