diff --git a/source/net/yacy/document/SnippetExtractor.java b/source/net/yacy/document/SnippetExtractor.java index 4414119ff..803fa35bf 100644 --- a/source/net/yacy/document/SnippetExtractor.java +++ b/source/net/yacy/document/SnippetExtractor.java @@ -48,7 +48,7 @@ public class SnippetExtractor { int linenumber = 0; int fullmatchcounter = 0; lookup: for (final StringBuilder sentence: sentences) { - hs = WordTokenizer.hashSentence(sentence.toString(), null, 100); + hs = WordTokenizer.hashSentence(sentence.toString(), 100); positions = new TreeSet(); for (final byte[] word: queryhashes) { pos = hs.get(word); @@ -127,7 +127,7 @@ public class SnippetExtractor { byte[] hash; // find all hashes that appear in the sentence - final Map hs = WordTokenizer.hashSentence(sentence, null, 100); + final Map hs = WordTokenizer.hashSentence(sentence, 100); final Iterator j = queryhashes.iterator(); Integer pos; int p, minpos = sentence.length(), maxpos = -1; diff --git a/source/net/yacy/document/WordTokenizer.java b/source/net/yacy/document/WordTokenizer.java index 6e8a23d32..598cd0f64 100644 --- a/source/net/yacy/document/WordTokenizer.java +++ b/source/net/yacy/document/WordTokenizer.java @@ -178,9 +178,9 @@ public class WordTokenizer implements Enumeration { * @param sentence the sentence to be tokenized * @return a ordered map containing word hashes as key and positions as value. The map is orderd by the hash ordering */ - public static SortedMap hashSentence(final String sentence, final WordCache meaningLib, int maxlength) { + public static SortedMap hashSentence(final String sentence, int maxlength) { final SortedMap map = new TreeMap(Base64Order.enhancedCoder); - WordTokenizer words = new WordTokenizer(new SentenceReader(sentence), meaningLib); + WordTokenizer words = new WordTokenizer(new SentenceReader(sentence), null); try { int pos = 0; StringBuilder word; diff --git a/source/net/yacy/search/snippet/MediaSnippet.java b/source/net/yacy/search/snippet/MediaSnippet.java index c88890007..2d2e3d3cb 100644 --- a/source/net/yacy/search/snippet/MediaSnippet.java +++ b/source/net/yacy/search/snippet/MediaSnippet.java @@ -177,8 +177,8 @@ public class MediaSnippet implements Comparable, Comparator, Comparator= 0 || u.indexOf("favicon",0) >= 0) continue; if (ientry.height() > 0 && ientry.height() < 32) continue; if (ientry.width() > 0 && ientry.width() < 32) continue; @@ -226,7 +226,7 @@ public class MediaSnippet implements Comparable, Comparator hs = WordTokenizer.hashSentence(sentence, null, 100); + final SortedMap hs = WordTokenizer.hashSentence(sentence, 100); final Iterator j = queryhashes.iterator(); byte[] hash; Integer pos; @@ -254,8 +254,8 @@ public class MediaSnippet implements Comparable, Comparator, Comparator, Comparator m = WordTokenizer.hashSentence(sentence, null, 100).keySet(); + final Set m = WordTokenizer.hashSentence(sentence, 100).keySet(); //for (byte[] b: m) System.out.println("sentence hash: " + ASCII.String(b)); //for (byte[] b: queryhashes) System.out.println("queryhash: " + ASCII.String(b)); ArrayList o = new ArrayList(queryhashes.size());