__init__.py 299 B

123456789101112131415
  1. # @package ext
  2. __doc__ = """
  3. Persian transliteration hooks.
  4. conforms to https://www.loc.gov/catdir/cpso/romanization/persian.pdf
  5. """
  6. def s2r_on_tx_token_match(ctx):
  7. """
  8. Apply special substitution rules according to ALA-LC spec.
  9. """
  10. if ctx.token == "ا":
  11. # Note 1