Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
241: Implement the CharNormalizer trait on the LowercaseNormalizer struct r=ManyTheFish a=Bradshaw # Pull Request ## Related issue Fixes #239 ## What does this PR do? - Implements `CharNormalizer` for `LowercaseNormalizer` - Removes the previous `Normalizer` trait implementation - Updates tests to include an initialized `char_map` field on the produced `Token` ## PR checklist Please check if your PR fulfills the following requirements: - [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)? - Yes, and as explained in #239, it leads to a correctly populated `char_map` - [x] Have you read the contributing guidelines? - [x] Have you made sure that the title is accurate and descriptive of the changes? ## Some quick notes I based my implementation on [`CompatibilityDecompositionNormalizer`](https://github.com/meilisearch/charabia/blob/de62ab9b889061126b0a8473aa53bf6288a99679/charabia/src/normalizer/compatibility_decomposition.rs#L17-L31). This leads to duplicated code. I considered adding a function that both implementations could share, if that seems more appropriate, I can propose an alternate solution. Co-authored-by: Gaeel Bradshaw <gaeel@spaceshipsin.space>
- Loading branch information