Permalink
Browse files

death to camelCase

  • Loading branch information...
1 parent 0631e18 commit 459fdf9439037a5d1b8c987e4b37c514222e0cf7 @rouge8 committed Apr 26, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 who_from.py
View
@@ -42,7 +42,7 @@ def classify(self, words):
return max(score.iteritems(), key=operator.itemgetter(1))[0]
- def addExample(self, klass, words):
+ def add_example(self, klass, words):
self.doccounts[klass] += 1
self.vocab.update(words)
self.classcounts[klass] += len(words)
@@ -109,7 +109,7 @@ def build_classifier(train):
n = NaiveBayes()
for klass in train:
for sms in train[klass]:
- n.addExample(klass, tokenize(sms.text))
+ n.add_example(klass, tokenize(sms.text))
n.calculate_probs()
# print 'PRIORS ARE', n.priors
@@ -159,8 +159,8 @@ def interactive(classifier):
run_naive_bayes(*people_with_many_texts(threshold))
print
- train, test = split_me_not_me(1.0)
- train, test = people_with_many_texts(threshold)
+ # train, test = split_me_not_me(1.0)
+ # train, test = people_with_many_texts(threshold)
# classifier = build_classifier(train)
# interactive(classifier)

0 comments on commit 459fdf9

Please sign in to comment.