edu.washington.cs.knowitall.sequence
Interface LayeredSequence
- All Known Implementing Classes:
- BIOLayeredSequence, ChunkedArgumentExtraction, ChunkedExtraction, ChunkedSentence, NormalizedField, SimpleLayeredSequence
public interface LayeredSequence
Represents a layered sequence of strings. An example of a layered sequence is
a POS-tagged sentence, which has a word layer, and a POS tag layer.
This interface defines the basic functionality expected from a layered
sequence, namely the ability to access the value of the sequence at a given
index of the given layer.
- Author:
- afader
get
String get(String layerName,
int index)
- Parameters:
layerName - index -
- Returns:
- the value at the given position.
- Throws:
IndexOutOfBoundsException - if the index is out of range
IllegalArgumentException - if a layer with name layerName does not exist
getLayerNames
Collection<String> getLayerNames()
- Returns:
- the layer names
hasLayer
boolean hasLayer(String layerName)
- Parameters:
layerName -
- Returns:
- true if this sequence has a layer with the given name
getNumLayers
int getNumLayers()
- Returns:
- the number of layers
getLength
int getLength()
- Returns:
- the length of the sequence
Copyright © 2010-2012 University of Washington CSE. All Rights Reserved.