small fixes

pull/1/head
Michael Peter Christen 13 years ago
parent 49be60a7c8
commit 254adea51c

@ -122,7 +122,6 @@ public final class Condenser {
Map.Entry<MultiProtocolURI, String> entry;
if (indexText) {
assert document.getText() != null : document.dc_identifier();
createCondensement(document.getText(), meaningLib);
// the phrase counter:
// phrase 0 are words taken from the URL
@ -304,7 +303,7 @@ public final class Condenser {
word = wordenum.nextElement().toString().toLowerCase(Locale.ENGLISH);
if (this.languageIdentificator != null) this.languageIdentificator.add(word);
if (word.length() < wordminsize) continue;
// distinguish punctuation and words
wordlen = word.length();
if (wordlen == 1 && SentenceReader.punctuation(word.charAt(0))) {
@ -320,7 +319,7 @@ public final class Condenser {
if (last_index && (wordminsize > 2 || word.equals("of"))) comb_indexof = true;
last_last = word.equals("last");
last_index = word.equals("index");
// store word
allwordcounter++;
currsentwords.add(word);

@ -329,7 +329,7 @@ public final class CharBuffer extends Writer {
}
public byte[] getBytes() {
return UTF8.getBytes(new String(this.buffer, this.offset, this.length));
return UTF8.getBytes(this.toString());
}
public CharBuffer trim(final int start) {

@ -2418,7 +2418,7 @@ public final class Switchboard extends serverSwitch
final String id = UTF8.String(new DigestURI(doc.dc_identifier(), null).hash());
final String iquh = UTF8.String(in.queueEntry.url().hash());
if ( !id.equals(iquh) ) {
this.log.logWarning("doc="
this.log.logWarning("condenseDocument consistency check doc="
+ id
+ ":"
+ doc.dc_identifier()

Loading…
Cancel
Save