Parsimmon icon indicating copy to clipboard operation
Parsimmon copied to clipboard

Return confidence/probability percentage from classifyTokens

Open tptee opened this issue 10 years ago • 3 comments

Hi,

Would be awesome if we could access a confidence level/percentage from ParsimmonNaiveBayesClassifer.classifyTokens method, maybe some easily-digestible human-friendly value.

tptee avatar Dec 28 '14 05:12 tptee

I agree. Thanks for the feedback! Always open for pull-requests as well. :octocat:

ayanonagon avatar Jan 03 '15 22:01 ayanonagon

@tptee Not sure if Swift is something that interests you, but I’m in the middle of making a Swift version of Parsimmon, and because Swift supports tuples, the API can be something like:

let (category, confidence) = classifier.classify("I swear that this is not spam")

which would be pretty slick I think. :smile:

ayanonagon avatar Feb 15 '15 16:02 ayanonagon

+1 looks awesome!

I don't have the NLP background to help with algorithms, but I'd love to contribute in some way to your Swift rewrite!

On Feb 15, 2015, at 11:44 AM, Ayaka Nonaka [email protected] wrote:

@tptee https://github.com/tptee Not sure if Swift is something that interests you, but I’m in the middle of making a Swift version of Parsimmon, and because Swift supports tuples, the API can be something like:

let (category, confidence) = classifier.classify("I swear that this is not spam") which would be pretty slick I think.

— Reply to this email directly or view it on GitHub https://github.com/ayanonagon/Parsimmon/issues/10#issuecomment-74424910.

tptee avatar Feb 16 '15 04:02 tptee