Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reverse transliteration ability #3

Open
adnikiforov opened this issue Sep 11, 2020 · 4 comments
Open

Add reverse transliteration ability #3

adnikiforov opened this issue Sep 11, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@adnikiforov
Copy link
Owner

adnikiforov commented Sep 11, 2020

There is one transliteration schema with ability to reverse transliteration: ISO 9:1995 (https://dangry.ru/iuliia/#unambiguous)

That's the plan:

  • Add ability to mark certain schemas as 'reversible' (probably yaml config, schemas maintainer does not provide such info)
  • Add ability to reverse transliteration (basically pass Cyrillic string to .translit and get Latin string back)
  • Add specs for this implementation
@adnikiforov adnikiforov added the enhancement New feature or request label Sep 14, 2020
@theendcomplete
Copy link
Contributor

theendcomplete commented Sep 18, 2020

hi
What do you think about adding .untranslit method?

In this method it would be possible to filter only supported reversed schemas.

this method could use only reversable schemas and with this method i would be musch easier to implement transliteration/untransliteration with external schemas in future (I think this would be great improvement).

something like this:
iuliia -t 'какой-то текст' --schema /path/to/schema.json

iuliia -u 'kakoy-to tekst' --schema /path/to/reversed_schema.json

@adnikiforov
Copy link
Owner Author

.untranslit seems interesting. So will it throw an exception if no reversible schema used to reverse?

About external schemas, I'm not sure that will be that much of a needed feature, cause nalgeon maintain available schemas, and we just use schemas he provide. Sure we can add such feature, I'll think over it. In that issue let's target only reverse translit using existing schemas.

@theendcomplete
Copy link
Contributor

theendcomplete commented Sep 18, 2020

.untranslit seems interesting. So will it throw an exception if no reversible schema used to reverse?

Raising the exception when user specified incorrect schema is sure a good thing.

And someday it could become warning. We can try to untranslit non-reversable schemas with no guarantees warning.

But for current issue roadmap is:

  • Add ability to mark certain schemas as 'reversible' (probably yaml config, schemas maintainer does not provide such info)

  • Add ability to reverse transliteration (basically pass Cyrillic (with check that it is Cyrillic) string to .untranslit and get Latin string back)

  • Add specs for this implementation

@adnikiforov
Copy link
Owner Author

Also, it might be nice to add reversible_schemas method to return only reversible schemas.

Anyway, roadmap is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants