NPVNP extends BaleenAnnotator { public static String trimPunctuation(String s) { return s.replaceAll("^[^a-zA-Z0-9]*", "").replaceAll("[^a-zA-Z0-9]*$", ""); }  static String trimPunctuation(String s); @Override AnalysisEngineAction getAction(); static final String PARAM_ONLY_EXISTING; }
@Test public void trimPunctuation() { assertEquals("hello", NPVNP.trimPunctuation(", hello")); assertEquals("hello", NPVNP.trimPunctuation("hello)")); assertEquals("hello", NPVNP.trimPunctuation(", hello)")); assertEquals("012abc", NPVNP.trimPunctuation("012abc")); }