@Test public void testParse() { assertNull(EmbeddedFunctions.parseWord("gr")); assertNull(EmbeddedFunctions.parseWord("are")); assertNull(EmbeddedFunctions.parseWord("THE")); assertEquals("foo", EmbeddedFunctions.parseWord("foo")); assertEquals("foo", EmbeddedFunctions.parseWord("fOoS")); }
@Deprecated(since = "11.1") public static final String parseWord(String string) { int len = string.length(); if (len < 3) { return null; } StringBuilder sb = new StringBuilder(len); for (int i = 0; i < len; i++) { char c = Character.toLowerCase(string.charAt(i)); if (c == '\u00e6') { sb.append("ae"); } else if (c >= '\u00e0' && c <= '\u00ff') { sb.append(UNACCENTED.charAt((c) - 0xe0)); } else if (c == '\u0153') { sb.append("oe"); } else { sb.append(c); } } int l = sb.length(); if (l > 3 && sb.charAt(l - 1) == 's') { sb.setLength(l - 1); } String word = sb.toString(); if (stopWords.contains(word)) { return null; } return word; }
EmbeddedFunctions { @Deprecated(since = "11.1") public static final String parseWord(String string) { int len = string.length(); if (len < 3) { return null; } StringBuilder sb = new StringBuilder(len); for (int i = 0; i < len; i++) { char c = Character.toLowerCase(string.charAt(i)); if (c == '\u00e6') { sb.append("ae"); } else if (c >= '\u00e0' && c <= '\u00ff') { sb.append(UNACCENTED.charAt((c) - 0xe0)); } else if (c == '\u0153') { sb.append("oe"); } else { sb.append(c); } } int l = sb.length(); if (l > 3 && sb.charAt(l - 1) == 's') { sb.setLength(l - 1); } String word = sb.toString(); if (stopWords.contains(word)) { return null; } return word; } }
EmbeddedFunctions { @Deprecated(since = "11.1") public static final String parseWord(String string) { int len = string.length(); if (len < 3) { return null; } StringBuilder sb = new StringBuilder(len); for (int i = 0; i < len; i++) { char c = Character.toLowerCase(string.charAt(i)); if (c == '\u00e6') { sb.append("ae"); } else if (c >= '\u00e0' && c <= '\u00ff') { sb.append(UNACCENTED.charAt((c) - 0xe0)); } else if (c == '\u0153') { sb.append("oe"); } else { sb.append(c); } } int l = sb.length(); if (l > 3 && sb.charAt(l - 1) == 's') { sb.setLength(l - 1); } String word = sb.toString(); if (stopWords.contains(word)) { return null; } return word; }  }
EmbeddedFunctions { @Deprecated(since = "11.1") public static final String parseWord(String string) { int len = string.length(); if (len < 3) { return null; } StringBuilder sb = new StringBuilder(len); for (int i = 0; i < len; i++) { char c = Character.toLowerCase(string.charAt(i)); if (c == '\u00e6') { sb.append("ae"); } else if (c >= '\u00e0' && c <= '\u00ff') { sb.append(UNACCENTED.charAt((c) - 0xe0)); } else if (c == '\u0153') { sb.append("oe"); } else { sb.append(c); } } int l = sb.length(); if (l > 3 && sb.charAt(l - 1) == 's') { sb.setLength(l - 1); } String word = sb.toString(); if (stopWords.contains(word)) { return null; } return word; }  static boolean isInTree(Serializable id, Serializable baseId); static boolean isInTree(Connection conn, Serializable id, Serializable baseId); @Deprecated static boolean isAccessAllowed(Serializable id, Set<String> principals, Set<String> permissions); @Deprecated static boolean isAccessAllowed(Connection conn, Serializable id, Set<String> principals,
            Set<String> permissions); static boolean isAccessAllowed(Connection conn, Serializable id, Set<String> principals,
            Set<String> permissions, boolean disableVersionACL, boolean disableReadVersionPermission); @Deprecated(since = "11.1") static String parseFullText(String string1, String string2); @Deprecated(since = "11.1") static final String parseWord(String string); static Set<String> split(String string); static Set<String> split(String string, char sep); }
EmbeddedFunctions { @Deprecated(since = "11.1") public static final String parseWord(String string) { int len = string.length(); if (len < 3) { return null; } StringBuilder sb = new StringBuilder(len); for (int i = 0; i < len; i++) { char c = Character.toLowerCase(string.charAt(i)); if (c == '\u00e6') { sb.append("ae"); } else if (c >= '\u00e0' && c <= '\u00ff') { sb.append(UNACCENTED.charAt((c) - 0xe0)); } else if (c == '\u0153') { sb.append("oe"); } else { sb.append(c); } } int l = sb.length(); if (l > 3 && sb.charAt(l - 1) == 's') { sb.setLength(l - 1); } String word = sb.toString(); if (stopWords.contains(word)) { return null; } return word; }  static boolean isInTree(Serializable id, Serializable baseId); static boolean isInTree(Connection conn, Serializable id, Serializable baseId); @Deprecated static boolean isAccessAllowed(Serializable id, Set<String> principals, Set<String> permissions); @Deprecated static boolean isAccessAllowed(Connection conn, Serializable id, Set<String> principals,
            Set<String> permissions); static boolean isAccessAllowed(Connection conn, Serializable id, Set<String> principals,
            Set<String> permissions, boolean disableVersionACL, boolean disableReadVersionPermission); @Deprecated(since = "11.1") static String parseFullText(String string1, String string2); @Deprecated(since = "11.1") static final String parseWord(String string); static Set<String> split(String string); static Set<String> split(String string, char sep);  }