lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (Created) (JIRA)" <>
Subject [jira] [Created] (LUCENE-3696) building a kuromoji dictionary is very slow and eventually fails if you use java 5
Date Sat, 14 Jan 2012 17:45:40 GMT
building a kuromoji dictionary is very slow and eventually fails if you use java 5

                 Key: LUCENE-3696
             Project: Lucene - Java
          Issue Type: Bug
    Affects Versions: 3.6
            Reporter: Robert Muir

Note: This only affects you if you use java 5 on 3.x, and it only affects you if you want
to download/rebuild the dictionary. 
the analyzer itself works fine on 3.x with java 5.

With java 6, building a kuromoji dictionary is quite fast:
     [java] building tokeninfo dict...
     [java]   parse...
     [java]   sort...
     [java]   encode...
     [java]   53645 nodes, 253185 arcs, 1954817 bytes...   done
     [java] done
     [java] building unknown word dict...done
     [java] building connection costs...done

Total time: 6 seconds

However, if you use java 5, it takes forever and eventually runs out of memory in the CSV
parsing phase.
So we might need to optimize the CSV parser (like precompile its patterns).

     [java] building tokeninfo dict...
     [java]   parse...
     [java] Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
     [java] 	at java.util.regex.Pattern.newSlice(
     [java] 	at java.util.regex.Pattern.atom(
     [java] 	at java.util.regex.Pattern.sequence(
     [java] 	at java.util.regex.Pattern.expr(
     [java] 	at java.util.regex.Pattern.compile(
     [java] 	at java.util.regex.Pattern.<init>(
     [java] 	at java.util.regex.Pattern.compile(
     [java] 	at java.lang.String.replaceAll(
     [java] 	at org.apache.lucene.analysis.kuromoji.util.CSVUtil.unQuoteUnEscape(
     [java] 	at org.apache.lucene.analysis.kuromoji.util.CSVUtil.parse(
     [java] 	at org.apache.lucene.analysis.kuromoji.util.TokenInfoDictionaryBuilder.buildDictionary(
     [java] 	at
     [java] 	at
     [java] 	at org.apache.lucene.analysis.kuromoji.util.DictionaryBuilder.main(

/home/rmuir/workspace/lucene-branch3x2/lucene/contrib/analyzers/kuromoji/build.xml:75: Java
returned: 1

Total time: 2 minutes 4 seconds

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message