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