|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--dragon.ml.seqmodel.data.BasicDataSequence
Basic data structure for sequence data
Copyright: Copyright (c) 2005
Company: IST, Drexel University
| Constructor Summary | |
BasicDataSequence()
|
|
BasicDataSequence(int length)
|
|
| Method Summary | |
void |
add(BasicToken token)
|
DataSequence |
copy()
Makes a copy of the current data sequence |
int |
getLabel(int pos)
Gets the label of the token in the given position |
int |
getOriginalLabel(int pos)
Gets the original label of the token in the given position. |
Dataset |
getParent()
Gets the dataset object which the current data sequence belongs to |
int |
getSegmentEnd(int segmentStart)
Gets the ending position of the segment beginning at the given position |
BasicToken |
getToken(int pos)
Gets the token in the given position of the sequence |
int |
length()
|
void |
setLabel(int pos,
int label)
Sets the label to the token in the given position. |
void |
setParent(Dataset parent)
Sets the dataset object which the current data sequence belongs to |
void |
setSegment(int segmentStart,
int segmentEnd,
int label)
Marks the bondary of the segment and sets the given label to all tokens of the segment. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BasicDataSequence()
public BasicDataSequence(int length)
| Method Detail |
public DataSequence copy()
DataSequence
copy in interface DataSequencepublic Dataset getParent()
DataSequence
getParent in interface DataSequencepublic void setParent(Dataset parent)
DataSequence
setParent in interface DataSequenceparent - the parsent datasetpublic int length()
length in interface DataSequencepublic int getLabel(int pos)
DataSequence
getLabel in interface DataSequencepos - the position in the sequence
public int getOriginalLabel(int pos)
DataSequence
getOriginalLabel in interface DataSequencepos - the position in the sequence
public BasicToken getToken(int pos)
DataSequence
getToken in interface DataSequencepos - the position of the token
public void setLabel(int pos,
int label)
DataSequence
setLabel in interface DataSequencepos - the position of the tokenlabel - the label for the positionpublic void add(BasicToken token)
public int getSegmentEnd(int segmentStart)
DataSequence
getSegmentEnd in interface DataSequencesegmentStart - the starting position of the segment
public void setSegment(int segmentStart,
int segmentEnd,
int label)
DataSequence
setSegment in interface DataSequencesegmentStart - the starting position of the segmentsegmentEnd - the ending position of the segmentlabel - the lable for the segment
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||