2012-05-02
I think I got it to work. The tests do what I think they're doing, and "classify" does what I expect. I wasn't able to run it with the corpora that we were given for the NLP class, but with silly simple test "strings" of a, b, c, d's, it classifies them properly. Maybe it's a fluke... But let's see.
As a reminder to us, everything I did is inside a large TODO space.
Code I wrote is:
- classify(self, words)
- normalizeProbabilities(self, klass, words)
- addExample(self, klass, words)