Ejemplo n.º 1
0
 def test_docfreq(self):
     with captured_output() as (out, _, _):
         dump_model(self._get_args(input=paths.DOCFREQ))
     self.assertEqual(out.getvalue()[:len(self.DOCFREQ_DUMP)],
                      self.DOCFREQ_DUMP)
     ending = "\nNumber of documents: 1000\n"
     self.assertEqual(out.getvalue()[-len(ending):], ending)
Ejemplo n.º 2
0
 def test_id2vec(self):
     with captured_output() as (out, _, _):
         dump_model(self._get_args(input=paths.ID2VEC))
     self.assertEqual(out.getvalue(), self.ID2VEC_DUMP)
Ejemplo n.º 3
0
 def test_coocc(self):
     with captured_output() as (out, _, _):
         dump_model(self._get_args(input=paths.COOCC))
     self.assertEqual(out.getvalue(), self.COOCC_DUMP)
Ejemplo n.º 4
0
 def test_bow(self):
     with captured_output() as (out, _, _):
         dump_model(self._get_args(input=paths.BOW))
     self.assertEqual(out.getvalue(), self.BOW_DUMP)