diff --git a/source/net/yacy/cora/lod/vocabulary/Tagging.java b/source/net/yacy/cora/lod/vocabulary/Tagging.java index 159aa9f22..1426495d9 100644 --- a/source/net/yacy/cora/lod/vocabulary/Tagging.java +++ b/source/net/yacy/cora/lod/vocabulary/Tagging.java @@ -208,7 +208,9 @@ public class Tagging { String[] tags; int p; String line; + Pattern kommapattern = Pattern.compile(","); try { + String[] pl; vocloop: while ((line = list.take()) != Files.POISON_LINE) { line = line.trim(); p = line.indexOf('#'); @@ -226,10 +228,8 @@ public class Tagging { continue vocloop; } } - String[] pl = parseLine(line); - if (pl == null) { - continue vocloop; - } + pl = parseLine(line); + if (pl == null) continue vocloop; if (pl[1] == null) { term = normalizeKey(pl[0]); v = normalizeTerm(pl[0]); @@ -240,7 +240,7 @@ public class Tagging { } term = normalizeKey(pl[0]); v = pl[1]; - tags = v.split(","); + tags = kommapattern.split(v); Set synonyms = new HashSet(); synonyms.add(term); tagloop: for (String synonym: tags) {