Ejemplo n.º 1
0
 def test_english(self):
     create_corpus_from_po(
         os.path.join(TEST_PATH, "test_files", "about.po"),
         os.path.join(TEST_PATH, "temp_files", "source.txt"),
         os.path.join(TEST_PATH, "temp_files", "target.txt"))
     with open(os.path.join(TEST_PATH, "temp_files", "source.txt")) as f:
         self.assertEqual(f.read().strip(),
                          "About MongoDB Documentation\nLicense")
Ejemplo n.º 2
0
 def test_spanish(self):
     create_corpus_from_po(
         os.path.join(TEST_PATH, "test_files", "about.po"),
         os.path.join(TEST_PATH, "temp_files", "source.txt"),
         os.path.join(TEST_PATH, "temp_files", "target.txt"))
     with open(os.path.join(TEST_PATH, "temp_files", "target.txt")) as f:
         self.assertEqual(
             f.read().strip(),
             "Acerca de la documentacion de MongoDB\nLicencia")
Ejemplo n.º 3
0
def po_to_corpus(args):
    create_corpus_from_po(args.t_input_file, args.t_source, args.t_target)
Ejemplo n.º 4
0
def po_to_corpus(args):
    create_corpus_from_po(args.t_input_file, args.t_source, args.t_target)
Ejemplo n.º 5
0
 def test_spanish(self):
     create_corpus_from_po(os.path.join(TEST_PATH, "test_files", "about.po"), os.path.join(TEST_PATH, "temp_files", "source.txt"), os.path.join(TEST_PATH, "temp_files", "target.txt"))
     with open(os.path.join(TEST_PATH,"temp_files", "target.txt")) as f:
         self.assertEqual(f.read().strip(), "Acerca de la documentacion de MongoDB\nLicencia")
Ejemplo n.º 6
0
 def test_english(self):
     create_corpus_from_po(os.path.join(TEST_PATH, "test_files", "about.po"), os.path.join(TEST_PATH, "temp_files", "source.txt"), os.path.join(TEST_PATH,"temp_files", "target.txt"))
     with open(os.path.join(TEST_PATH,"temp_files","source.txt")) as f:
         self.assertEqual(f.read().strip(), "About MongoDB Documentation\nLicense")