예제 #1
0
 def testVariant3(self):
     result = punctuation.quantify_variant(self.analysis, 2)
     expected = {
                 ':': 4 * 1 / 7.0,
                 ',': 4 * 2 / 7.0,
                 '.': 4 * 1 / 7.0,
                 '"': 4 * 2 / 7.0,
                 }
     self.assertDictContainsSubset(expected, result)
예제 #2
0
 def testVariant1(self):
     result = punctuation.quantify_variant(self.analysis, 0)
     expected = {
                 ':': 1 / 2000.0,
                 ',': 2 / 2000.0,
                 '.': 1 / 2000.0,
                 '"': 2 / 2000.0,
                 }
     self.assertDictContainsSubset(expected, result)