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

Sanitizer Structure #6

Open
bodo-hugo-barwich opened this issue Dec 17, 2022 · 4 comments
Open

Sanitizer Structure #6

bodo-hugo-barwich opened this issue Dec 17, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@bodo-hugo-barwich
Copy link
Owner

To improve the module API a structure that holds important information about the request will be introduced with this development.

@bodo-hugo-barwich bodo-hugo-barwich self-assigned this Dec 17, 2022
@bodo-hugo-barwich bodo-hugo-barwich added the enhancement New feature or request label Dec 17, 2022
@bodo-hugo-barwich
Copy link
Owner Author

This development will introduce the TextSanitizer structure that holds data which is reusable in subsequent requests and possible can be initialized from the hosting application.

Important is that the current API that is already published must not break and will continue to be supported.

@bodo-hugo-barwich
Copy link
Owner Author

The TextSanitizer becomes more powerful with the "ConversionMap" which is constantly adjusted to improve the sanitizing capabilities.
So, an objective of this development is also to expose this to the application to improve its customisability and perhaps the data overhead for some use cases.

@bodo-hugo-barwich
Copy link
Owner Author

Another important improvement is also that runtime verbosity options are not any longer parsed as text but rather set as bool value and can be set at struct create time which is also a Micro Optimization.

@bodo-hugo-barwich
Copy link
Owner Author

To make the ConversionMap configurable the internal transliteration structure can be configured through the structures ConversionMap and LanguageMap.
These structures will be serializable through the serde and serde_derive crates.
The new TextSanitizer::new_with_conversion_map(), TextSanitizer::set_conversion_map() and TextSanitizter::set_language_map() methods are used to extend or replace the internal transliteration map.

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

1 participant