diff --git a/build.properties b/build.properties index eb0ace2ca..609f6b4b2 100644 --- a/build.properties +++ b/build.properties @@ -3,7 +3,7 @@ javacSource=1.5 javacTarget=1.5 # Release Configuration -releaseVersion=0.572 +releaseVersion=0.573 stdReleaseFile=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz embReleaseFile=yacy_emb_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz proReleaseFile=yacy_pro_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz diff --git a/htroot/yacy/user/ysearchitem.html b/htroot/yacy/user/ysearchitem.html index f08884729..e911c3f0d 100644 --- a/htroot/yacy/user/ysearchitem.html +++ b/htroot/yacy/user/ysearchitem.html @@ -60,10 +60,10 @@ progressbar.step(1);
#(topwords)#::Category: -
diff --git a/source/de/anomic/plasma/plasmaCondenser.java b/source/de/anomic/plasma/plasmaCondenser.java index 4c2bc8377..3f642703e 100644 --- a/source/de/anomic/plasma/plasmaCondenser.java +++ b/source/de/anomic/plasma/plasmaCondenser.java @@ -872,9 +872,9 @@ public final class plasmaCondenser { } static StringBuffer readSentence(Reader reader, boolean pre) throws IOException { - StringBuffer s = new StringBuffer(20); + StringBuffer s = new StringBuffer(40); int nextChar; - char c, lc = (char) 0; + char c, lc = ' '; // starting with ' ' as last character prevents that the result string starts with a ' ' // find sentence end for (;;) { @@ -885,13 +885,18 @@ public final class plasmaCondenser { } c = (char) nextChar; if (pre && ((c == (char) 10) || (c == (char) 13))) break; - if ((c == (char) 8) || (c == (char) 10) || (c == (char) 13)) c = ' '; + if (c < ' ') c = ' '; if ((lc == ' ') && (c == ' ')) continue; // ignore double spaces s.append(c); if (htmlFilterContentScraper.punctuation(c)) break; lc = c; } + if (s.length() == 0) return s; + if (s.charAt(s.length() - 1) == ' ') { + s.trimToSize(); + s.deleteCharAt(s.length() - 1); + } return s; }