lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tommaso Teofili (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-4782) Let the NaiveBayes classifier have a fallback docCount method if codec doesn't support Terms#docCount()
Date Thu, 21 Feb 2013 09:52:12 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-4782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13583060#comment-13583060
] 

Tommaso Teofili commented on LUCENE-4782:
-----------------------------------------

thanks Robert, that may make sense but I'm not really sure as in 4.x we still support 3x codecs
in general.
Also I noticed that other methods used in the classification module that depend on the underlying
codec may return -1 (unsupported).
I'll have a deeper look and see if it really make sense to 'fallback' such calls or either
it'd be safer and reasonable to follow your suggestion.
                
> Let the NaiveBayes classifier have a fallback docCount method if codec doesn't support
Terms#docCount()
> -------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-4782
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4782
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/classification
>            Reporter: Tommaso Teofili
>            Assignee: Tommaso Teofili
>             Fix For: 4.2, 5.0
>
>
> In _SimpleNaiveBayesClassifier_ _docsWithClassSize_ variable is initialized to _MultiFields.getTerms(this.atomicReader,
this.classFieldName).getDocCount()_ which may be -1 if the codec doesn't support doc counts,
therefore there should be an alternative way to initialize such a variable with the documents
count.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message