summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Peter Christen <mc@yacy.net>2014-12-23 00:37:51 +0100
committerMichael Peter Christen <mc@yacy.net>2014-12-23 00:37:51 +0100
commitcc090bcb01bd240be911426f85e811f4e323c348 (patch)
treedd8eb0b83b343065fd45557aa33fef6b1403b10e
parent003ec43beee848df685e86612eb6c0ba68299f88 (diff)
enhanced initialization of autotagging
-rw-r--r--source/net/yacy/cora/lod/vocabulary/Tagging.java10
1 files changed, 5 insertions, 5 deletions
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<String> synonyms = new HashSet<String>();
synonyms.add(term);
tagloop: for (String synonym: tags) {