/** * @return the stem value if there is a {@link Stem} annotation linked to this token. */ public String getStemValue() { Stem stem = getStem(); return stem != null ? stem.getValue() : null; }
/** * @return the stem value if there is a {@link Stem} annotation linked to this token. */ public String getStemValue() { Stem stem = getStem(); return stem != null ? stem.getValue() : null; }
public static void assertStem(String[] aExpected, Collection<Stem> aActual) { if (aExpected == null) { return; } List<String> expected = asList(aExpected); List<String> actual = new ArrayList<String>(); for (Stem a : aActual) { actual.add(a.getValue()); } System.out.printf("%-20s - Expected: %s%n", "Stems", asCopyableString(expected)); System.out.printf("%-20s - Actual : %s%n", "Stems", asCopyableString(actual)); assertEquals(asCopyableString(expected, true), asCopyableString(actual, true)); }
public static void assertStem(String[] aExpected, Collection<Stem> aActual) { if (aExpected == null) { return; } List<String> expected = asList(aExpected); List<String> actual = new ArrayList<String>(); for (Stem a : aActual) { actual.add(a.getValue()); } System.out.printf("%-20s - Expected: %s%n", "Stems", asCopyableString(expected)); System.out.printf("%-20s - Actual : %s%n", "Stems", asCopyableString(actual)); assertEquals(asCopyableString(expected, true), asCopyableString(actual, true)); }