diff --git a/source/net/yacy/cora/language/synonyms/SynonymLibrary.java b/source/net/yacy/cora/language/synonyms/SynonymLibrary.java index 82fa88095..aaa52a8b1 100644 --- a/source/net/yacy/cora/language/synonyms/SynonymLibrary.java +++ b/source/net/yacy/cora/language/synonyms/SynonymLibrary.java @@ -63,8 +63,8 @@ public class SynonymLibrary { if (line.charAt(line.length() - 1) == '}') line = line.substring(0, line.length() - 1); if (line.charAt(0) == '{') line = line.substring(1); String[] words = CommonPattern.COMMA.split(line); - Set synonyms = new HashSet(); - Set keys = new HashSet(); + Set synonyms = new HashSet(words.length); + Set keys = new HashSet(words.length); for (String word: words) { word = word.trim(); if (word.length() < 2) continue; @@ -102,7 +102,7 @@ public class SynonymLibrary { /** * for a given word, return a list of synonym words * @param word - * @return a list of synonyms bot without the requested word + * @return a list of synonyms but without the requested word */ public static Set getSynonyms(String word) { if (word == null) return null;