From f3bf2e379e5ccd28d30dfa59300571d6ae6f4f36 Mon Sep 17 00:00:00 2001 From: f1ori Date: Wed, 22 Oct 2008 07:35:49 +0000 Subject: [PATCH] should compile again git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5291 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaCondenser.java | 6 +++--- source/de/anomic/plasma/plasmaParserDocument.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/de/anomic/plasma/plasmaCondenser.java b/source/de/anomic/plasma/plasmaCondenser.java index 3183575d1..f399a17bb 100644 --- a/source/de/anomic/plasma/plasmaCondenser.java +++ b/source/de/anomic/plasma/plasmaCondenser.java @@ -320,7 +320,7 @@ public final class plasmaCondenser { } // read source - final sievedWordsEnum wordenum = new sievedWordsEnum(is, charset); + final sievedWordsEnum wordenum = new sievedWordsEnum(is); while (wordenum.hasMoreElements()) { word = (new String(wordenum.nextElement())).toLowerCase(Locale.ENGLISH); // TODO: does toLowerCase work for non ISO-8859-1 chars? if (languageIdentificator != null) languageIdentificator.add(word); @@ -498,7 +498,7 @@ public final class plasmaCondenser { public static Enumeration wordTokenizer(final String s, final String charset) { try { - return new sievedWordsEnum(new ByteArrayInputStream(s.getBytes()), charset); + return new sievedWordsEnum(new ByteArrayInputStream(s.getBytes(), "UTF-8")); } catch (final Exception e) { return null; } @@ -720,7 +720,7 @@ public final class plasmaCondenser { // returns a word/indexWord relation map if (text == null) return null; final ByteArrayInputStream buffer = new ByteArrayInputStream(text); - return new plasmaCondenser(buffer, charset, 2, 1).words(); + return new plasmaCondenser(buffer, "UTF-8", 2, 1).words(); } public static Map getWords(final String text) { diff --git a/source/de/anomic/plasma/plasmaParserDocument.java b/source/de/anomic/plasma/plasmaParserDocument.java index 263882661..66fefeecd 100644 --- a/source/de/anomic/plasma/plasmaParserDocument.java +++ b/source/de/anomic/plasma/plasmaParserDocument.java @@ -282,7 +282,7 @@ dc_rights public Iterator getSentences(final boolean pre) { if (this.text == null) return null; - final plasmaCondenser.sentencesFromInputStreamEnum e = plasmaCondenser.sentencesFromInputStream(getText(), this.charset); + final plasmaCondenser.sentencesFromInputStreamEnum e = plasmaCondenser.sentencesFromInputStream(getText()); e.pre(pre); return e; }