@Test public void lengthTest3() { String[] testSentence = new String[] {"This", "is", "an", "example", "sentence"}; int testTokenIndex = 1; int suffixLength = 5; AdaptiveFeatureGenerator generator = new SuffixFeatureGenerator(suffixLength); generator.createFeatures(features, testSentence, testTokenIndex, null); Assert.assertEquals(2, features.size()); Assert.assertEquals("suf=s", features.get(0)); Assert.assertEquals("suf=is", features.get(1)); }
@Override public void createFeatures(List<String> features, String[] tokens, int index, String[] previousOutcomes) { String[] suffs = getSuffixes(tokens[index]); for (String suff : suffs) { features.add("suf=" + suff); } }
SuffixFeatureGenerator implements AdaptiveFeatureGenerator { @Override public void createFeatures(List<String> features, String[] tokens, int index, String[] previousOutcomes) { String[] suffs = getSuffixes(tokens[index]); for (String suff : suffs) { features.add("suf=" + suff); } } }
SuffixFeatureGenerator implements AdaptiveFeatureGenerator { @Override public void createFeatures(List<String> features, String[] tokens, int index, String[] previousOutcomes) { String[] suffs = getSuffixes(tokens[index]); for (String suff : suffs) { features.add("suf=" + suff); } } SuffixFeatureGenerator();  SuffixFeatureGenerator(int suffixLength); }
SuffixFeatureGenerator implements AdaptiveFeatureGenerator { @Override public void createFeatures(List<String> features, String[] tokens, int index, String[] previousOutcomes) { String[] suffs = getSuffixes(tokens[index]); for (String suff : suffs) { features.add("suf=" + suff); } } SuffixFeatureGenerator();  SuffixFeatureGenerator(int suffixLength); @Override void createFeatures(List<String> features, String[] tokens, int index,
      String[] previousOutcomes); }
SuffixFeatureGenerator implements AdaptiveFeatureGenerator { @Override public void createFeatures(List<String> features, String[] tokens, int index, String[] previousOutcomes) { String[] suffs = getSuffixes(tokens[index]); for (String suff : suffs) { features.add("suf=" + suff); } } SuffixFeatureGenerator();  SuffixFeatureGenerator(int suffixLength); @Override void createFeatures(List<String> features, String[] tokens, int index,
      String[] previousOutcomes);  }