@@ -0,0 +1,620 @@
+from classes import Rule, Token%0Afrom scripts.ner import rulesperformance%0A%0A%0Adef test_rulesperformance_rateRulePerformance():%0A    %22%22%22%0A    %0A    %22%22%22%0A%0A    alpha = 0.1%0A    k = 2.0%0A    %0A    rule = Rule(Rule.Type.spelling, 'bb', 1.0)%0A    name = Token('aa-aa', 'bb-bb', 'cc-cc', Token.Type.personal_name)%0A    name.name_probability = 1.0%0A    names = set()%0A    names.add(name)%0A%0A    rulesperformance.rateRulePerformance(names, rule, alpha, k)%0A%0A    expected_strength = (1.0 + alpha) / (1.0 + k * alpha)%0A    expected_occurrences = 1.0%0A%0A    assert rule.strength == expected_strength%0A    assert rule.occurrences == expected_occurrences%0A

Test for 'rulesperformance'.