public class BasicDataSequence extends Object implements DataSequence
Basic data structure for sequence data
Copyright: Copyright (c) 2005
Company: IST, Drexel University
| Constructor and Description |
|---|
BasicDataSequence() |
BasicDataSequence(int length) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public BasicDataSequence()
public BasicDataSequence(int length)
public DataSequence copy()
DataSequencecopy in interface DataSequencepublic Dataset getParent()
DataSequencegetParent in interface DataSequencepublic void setParent(Dataset parent)
DataSequencesetParent in interface DataSequenceparent - the parsent datasetpublic int length()
length in interface DataSequencepublic int getLabel(int pos)
DataSequencegetLabel in interface DataSequencepos - the position in the sequencepublic int getOriginalLabel(int pos)
DataSequencegetOriginalLabel in interface DataSequencepos - the position in the sequencepublic BasicToken getToken(int pos)
DataSequencegetToken in interface DataSequencepos - the position of the tokenpublic void setLabel(int pos,
int label)
DataSequencesetLabel in interface DataSequencepos - the position of the tokenlabel - the label for the positionpublic void add(BasicToken token)
public int getSegmentEnd(int segmentStart)
DataSequencegetSegmentEnd in interface DataSequencesegmentStart - the starting position of the segmentpublic void setSegment(int segmentStart,
int segmentEnd,
int label)
DataSequencesetSegment in interface DataSequencesegmentStart - the starting position of the segmentsegmentEnd - the ending position of the segmentlabel - the lable for the segmentCopyright © 2018 JULIE Lab, Germany. All rights reserved.