ayanonagon / Parsimmon

Parsimmon is a wee linguistics toolkit for iOS written in Swift.
MIT License
708 stars 46 forks source link

Return confidence/probability percentage from classifyTokens #10

Open tptee opened 9 years ago

tptee commented 9 years ago

Hi,

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

ayanonagon commented 9 years ago

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

ayanonagon commented 9 years ago

@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:

tptee commented 9 years ago

+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 notifications@github.com 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.