1 package sequence;
2
3 import java.io.Serializable;
4
5 import types.SparseVector;
6
7 public interface SequenceFeatureFunction extends Serializable {
8
9 /*** apply the feature function to an entire sequence of y's */
10 public SparseVector apply(SparseVector[] x, int[] y);
11
12 /***
13 * apply the feature function to a pair of tags (label positions)
14 *
15 * @param x
16 * entire input sequence
17 * @param ytm1
18 * label at position t-1
19 * @param yt
20 * label at position t
21 * @param t
22 * position of interest. Should be 0<=t<x.length where t=0
23 * ignores ytm1. ignores the second label.
24 */
25 public SparseVector apply(SparseVector[] x, int ymt1, int yt, int t);
26
27 public int wSize();
28
29 }