@Test public void testMatcher3() throws SequenceException { String patternStr = "B-NP_n I-NP_n* ._p?$"; LayeredTokenPattern pat = new LayeredTokenPattern(patternStr); LayeredTokenMatcher m = pat.matcher(seq); assertTrue(m.find()); assertEquals(5, m.start()); assertEquals(7, m.end()); assertFalse(m.find()); }
public LayeredTokenMatcher matcher(LayeredSequence seq) throws SequenceException { String encoded = encodeSequence(seq); Matcher m = encodedPattern.matcher(encoded); return new LayeredTokenMatcher(m); }
LayeredTokenPattern { public LayeredTokenMatcher matcher(LayeredSequence seq) throws SequenceException { String encoded = encodeSequence(seq); Matcher m = encodedPattern.matcher(encoded); return new LayeredTokenMatcher(m); } }
LayeredTokenPattern { public LayeredTokenMatcher matcher(LayeredSequence seq) throws SequenceException { String encoded = encodeSequence(seq); Matcher m = encodedPattern.matcher(encoded); return new LayeredTokenMatcher(m); } LayeredTokenPattern(String patternString); }
LayeredTokenPattern { public LayeredTokenMatcher matcher(LayeredSequence seq) throws SequenceException { String encoded = encodeSequence(seq); Matcher m = encodedPattern.matcher(encoded); return new LayeredTokenMatcher(m); } LayeredTokenPattern(String patternString); @Override String toString(); LayeredTokenMatcher matcher(LayeredSequence seq); Pattern getEncodedPattern(); }
LayeredTokenPattern { public LayeredTokenMatcher matcher(LayeredSequence seq) throws SequenceException { String encoded = encodeSequence(seq); Matcher m = encodedPattern.matcher(encoded); return new LayeredTokenMatcher(m); } LayeredTokenPattern(String patternString); @Override String toString(); LayeredTokenMatcher matcher(LayeredSequence seq); Pattern getEncodedPattern();  }