Ejemplo n.º 1
0
 def test_make_frequencies(self):
     """Test frequency builder."""
     frequencies = Frequency()
     text = 'Quo Quo Quo Quo usque tandem abutere, Catilina Catilina Catilina, patientia nostra nostra ?'.lower()
     count = frequencies.counter_from_str(text)
     target = Counter({'quo': 4, 'catilina': 3, 'nostra': 2, 'patientia': 1, 'abutere': 1, 'usque': 1, 'tandem': 1})
     self.assertEqual(count, target)
Ejemplo n.º 2
0
 def test_make_frequencies(self):
     """Test frequency builder."""
     frequencies = Frequency()
     text = 'Quo Quo Quo Quo usque tandem abutere, Catilina Catilina Catilina, patientia nostra nostra ?'.lower()
     count = frequencies.counter_from_str(text)
     target = Counter({'quo': 4, 'catilina': 3, 'nostra': 2, 'patientia': 1, 'abutere': 1, 'usque': 1, 'tandem': 1})
     self.assertEqual(count, target)
Ejemplo n.º 3
0
 def test_make_frequencies(self):
     """Test frequency builder."""
     frequencies = Frequency()
     text = "Quo Quo Quo Quo usque tandem abutere, Catilina Catilina Catilina, patientia nostra nostra ?".lower()
     count = frequencies.counter_from_str(text)
     target = Counter({"quo": 4, "catilina": 3, "nostra": 2, "patientia": 1, "abutere": 1, "usque": 1, "tandem": 1})
     self.assertEqual(count, target)