Merge pull request #2 from yacy/master

Merge master
pull/52/head
luccioman 9 years ago
commit 78149c9e1b

@ -116,12 +116,14 @@ public class citation {
ArrayList<String> sentences = new ArrayList<String>(); ArrayList<String> sentences = new ArrayList<String>();
if (title != null) for (String s: title) if (s.length() > 0) sentences.add(s); if (title != null) for (String s: title) if (s.length() > 0) sentences.add(s);
if (text != null && !text.isEmpty()) {
SentenceReader sr = new SentenceReader(text); SentenceReader sr = new SentenceReader(text);
StringBuilder line; StringBuilder line;
while (sr.hasNext()) { while (sr.hasNext()) {
line = sr.next(); line = sr.next();
if (line.length() > 0) sentences.add(line.toString()); if (line.length() > 0) sentences.add(line.toString());
} }
}
// for each line make a statistic about the number of occurrences somewhere else // for each line make a statistic about the number of occurrences somewhere else
OrderedScoreMap<String> scores = new OrderedScoreMap<String>(null); // accumulates scores for citating urls OrderedScoreMap<String> scores = new OrderedScoreMap<String>(null); // accumulates scores for citating urls

Loading…
Cancel
Save