<commit_before><commit_msg>test task with code stub<commit_after>from unittest import TestCase
from docclass import Classifier
from docclass import getwords


class TestClassifier(TestCase):

    def testClassifier(self):
        c = Classifier(getwords)
        c.train("nobody owns the water", "Good")
        c.train("the quick rabbit jumps fences", "Good")
        c.train("buy pharmaceuticals now", "Bad")
        c.train("make quick money at the online casino", "Bad")
        c.train("the quick brown fox jumps", "Good")
        c.train("next meeting is at night", "Good")
        c.train("meeting with your superstar", "Bad")
        c.train("money like water", "Bad")

        goodProb = c.prob("the money jumps", "Good")
        badProb = c.prob("the money jumps", "Bad")




{'fraction_non_alphanumeric': 0.12356687898089172, 'fraction_numerical': 0.0, 'mean_word_length': 3.1587301587301586, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '917671', 'n_tokens_mistral': 239, 'n_tokens_neox': 221, 'n_words': 76}