From ea05c7d46314d8aa27f3578e01aa1d4c20336fa3 Mon Sep 17 00:00:00 2001 From: low012 Date: Tue, 31 Jul 2007 21:27:28 +0000 Subject: [PATCH] *) characters are saved in ASCII-safe notation in language data files now ('\u0063' instead of 'a'), this hopefully avoids lots of problems git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4019 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- .../language/languageDataExtractor.java | 45 +++++++++++-------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/source/de/anomic/language/languageDataExtractor.java b/source/de/anomic/language/languageDataExtractor.java index 485ea2237..973bd3610 100644 --- a/source/de/anomic/language/languageDataExtractor.java +++ b/source/de/anomic/language/languageDataExtractor.java @@ -7,7 +7,7 @@ // // This File is contributed by Marc Nause // -// $LastChangedDate: 2007-07-29 $ +// $LastChangedDate: 2007-07-31 $ // $LastChangedRevision: $ // $LastChangedBy: low012 $ // @@ -52,7 +52,6 @@ // The program can be started with the following arguments: // // input=filename name of the file the text is stored in -// output=filename name of the file the data will be stored in // name=langugaename name of the language the text is written in // name=code code of the language the text is written in (e.g. en-GB) @@ -143,21 +142,29 @@ public class languageDataExtractor { //Trying to read from input file and put quantity of letters into map. try { - while ((line = inputFile.readLine()) != null) { - for(int i=0;i\n"; mapiter = map.keySet().iterator(); while(mapiter.hasNext()){ - key = mapiter.next().toString().charAt(0); - sKey = "" + key; - file += "\n \n "+key+"\n "+(Float.parseFloat(map.get(sKey).toString())/quantity*100)+"\n \n"; + + sKey = mapiter.next().toString(); + file += "\n \n "+sKey+"\n "+(Float.parseFloat(map.get(sKey).toString())/quantity*100)+"\n \n"; } file += "\n";