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

Implement the CharNormalizer trait on the LowercaseNormalizer struct #241

Conversation

Bradshaw
Copy link
Contributor

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:

  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Some quick notes

I based my implementation on CompatibilityDecompositionNormalizer.

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.

@Bradshaw Bradshaw force-pushed the implement-charnormalizer-on-lowercasenormalizer-239 branch from 278c2b6 to f171034 Compare September 15, 2023 13:53
@Bradshaw
Copy link
Contributor Author

Force-pushed to correct the use statements so they match the existing style.

Copy link
Member

@ManyTheFish ManyTheFish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Thank you @Bradshaw for your contribution,

have a nice day!

bors merge

@meili-bors
Copy link
Contributor

meili-bors bot commented Sep 19, 2023

Build succeeded:

@Bradshaw Bradshaw closed this Sep 19, 2023
@meili-bors meili-bors bot merged commit 944cf62 into meilisearch:main Sep 19, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement the CharNormalizer trait on the LowercaseNormalizer struct
2 participants