Exemplo n.º 1
0
def open_nfc(script_code: str, token_type: str) -> pynini.Fst:
  return u.OpenFstFromBrahmicFar('nfc', script_code, token_type)
Exemplo n.º 2
0
 def test_fixed(self, script: str, token_type: str):
     fst = u.OpenFstFromBrahmicFar('fixed', script, token_type)
     self.assertFstProbablyFunctional(fst, token_type, samples=1e6)
Exemplo n.º 3
0
 def test_fixed(self, script: str, prop: pynini.FstProperties,
                token_type: str):
     fst = u.OpenFstFromBrahmicFar('fixed', script, token_type)
     self.assertFstCompliesWithProperties(fst, prop)
Exemplo n.º 4
0
 def test_visual_norm(self, script: str, token_type: str):
     fst = u.OpenFstFromBrahmicFar('visual_norm', script, token_type)
     self.assertFstProbablyFunctional(fst,
                                      token_type,
                                      samples=test_util.NUM_TEST_SAMPLES)
Exemplo n.º 5
0
 def test_sigma_utf8(self, script: str, prop: pynini.FstProperties):
     fst = u.OpenFstFromBrahmicFar('sigma', script, token_type='utf8')
     self.assertFstCompliesWithProperties(fst, prop)