Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 24616 invoked from network); 26 Aug 2009 17:22:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Aug 2009 17:22:25 -0000 Received: (qmail 75045 invoked by uid 500); 26 Aug 2009 17:22:24 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 74964 invoked by uid 500); 26 Aug 2009 17:22:23 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 74727 invoked by uid 99); 26 Aug 2009 17:22:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Aug 2009 17:22:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Aug 2009 17:22:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4BAA2234C044 for ; Wed, 26 Aug 2009 10:21:59 -0700 (PDT) Message-ID: <1998195149.1251307319295.JavaMail.jira@brutus> Date: Wed, 26 Aug 2009 10:21:59 -0700 (PDT) From: "Robert Muir (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Updated: (LUCENE-1817) it is impossible to use a custom dictionary for SmartChineseAnalyzer In-Reply-To: <1547027088.1250514314900.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-1817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Muir updated LUCENE-1817: -------------------------------- Attachment: dataFiles.zip the two files in this directory need to be placed in smartcn/test under o/a/l/analysis/cn/smart/hmm/customDictionaryDCT > it is impossible to use a custom dictionary for SmartChineseAnalyzer > -------------------------------------------------------------------- > > Key: LUCENE-1817 > URL: https://issues.apache.org/jira/browse/LUCENE-1817 > Project: Lucene - Java > Issue Type: Bug > Components: contrib/analyzers > Reporter: Robert Muir > Priority: Minor > Attachments: dataFiles.zip, LUCENE-1817-mark-cn-experimental.patch, LUCENE-1817.patch > > > it is not possible to use a custom dictionary, even though there is a lot of code and javadocs to allow this. > This is because the custom dictionary is only loaded if it cannot load the built-in one (which is of course, in the jar file and should load) > {code} > public synchronized static WordDictionary getInstance() { > if (singleInstance == null) { > singleInstance = new WordDictionary(); // load from jar file > try { > singleInstance.load(); > } catch (IOException e) { // loading from jar file must fail before it checks the AnalyzerProfile (where this can be configured) > String wordDictRoot = AnalyzerProfile.ANALYSIS_DATA_DIR; > singleInstance.load(wordDictRoot); > } catch (ClassNotFoundException e) { > throw new RuntimeException(e); > } > } > return singleInstance; > } > {code} > I think we should either correct this, document this, or disable custom dictionary support... -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org