-
-
Notifications
You must be signed in to change notification settings - Fork 783
Integrating transliteration into Locales with ABC refactoring #3813
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
base: master
Are you sure you want to change the base?
Conversation
9c231c1 to
67457fc
Compare
|
Is there a way to add the new Python libraries as dependencies to github? I.e. https://pypi.org/project/cantonese-romanisation/ and https://pypi.org/project/Unidecode/ and https://pypi.org/project/OpenCC/ |
|
You need to add them in the package description. |
lonvia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added comments for the changes we discussed at the last meeting so that they are not forgotten and added some small nitpicking style comments.
|
|
||
| # Nothing? Return any of the other names as a default. | ||
| return next(iter(names.values())) | ||
| return (next(iter(names.values())), "default") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to do the same partition trick here. The random choice of names can still contain a name tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code I believe is what is currently in the master branch! This was the logic used before, so I thought that this avoided the name tag issue, since the default is normally tag-less
| def display_name(self, names: Optional[Mapping[str, str]]) -> str: |
431b6f2 to
ea2efca
Compare
31891d4 to
4687d92
Compare
38c60b6 to
b8bdaf8
Compare
- Refactored code for better readability and modularity, adding a new ABC for locales - Added transliteration support, including Latin transliteration, and integrated it into the library - Migrated country and language data to the nominatim_api for improved localization - Rewrote tests to use actual result objects instead of mocks - Integrated YAML configuration for language normalization and updated dependency management - Improved handling of optional dependencies and added GitHub workflows for testing them first pass in adding transliteration, still issues with searching Dandong Minor issue, realized also I need to add mock information about the Dandong database in order to test mypy fixed Testing linting fix Made from_accept_languages an abstract class, make display name and display name locale defined in base Changed from global to attribute, removed mock search updated .toml for dependenies fixed issue with display name with locales renaming and adding lang info file linting issues integrated yaml reading from config fixed issue with test normalization removed old locales class tried to add localize and localize results as abstract methods, had to change signature refactored code a bit, rewrote test to use actual result object not just mock restructured code for readablity, added a latin transliterator, however tests are failing on github that are not failing locally fixed mypy issues with base.py integrated latin transliteration for cleaner code made some comments better reverted back to original git ignore Dict to mapping change Double quotes to single quotes data country and language migration to api added optional dependencies add optional dependencies better job at optional imports lint Added data information in init Added more dependencies to fix import issue Trying to fix import Revert server glue Added fix for linter than is not on local machine Lint fighting linter added git workflow for optional dependencies trying agfain for optional linting again:( optional dependencies github again trying to fix opt dependencies 24 opt dep again lint reverted data country info removed wrong get
4f1cd4c to
efd5a3d
Compare
Refactoring of
nominatim_apito integrate transliteration, whilst refactoring localization, and adding optional dependencies for said transliteration.localizer) and new transliteration logic (transliterator)transliteratordata/languages.yamlTransliterateLocales