Example #1
0
def open_nfc(script_code: str, token_type: str) -> pynini.Fst:
  return u.OpenFstFromBrahmicFar('nfc', script_code, token_type)
Example #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)
Example #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)
Example #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)
Example #5
0
 def test_sigma_utf8(self, script: str, prop: pynini.FstProperties):
     fst = u.OpenFstFromBrahmicFar('sigma', script, token_type='utf8')
     self.assertFstCompliesWithProperties(fst, prop)