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

CV2-5412: Different way to replace new lines for fastext #459

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

computermacgyver
Copy link
Contributor

Description

No idea why, but the re.sub approach isn't replacing all newlines. I've tested with failing examples and .replace is working on these. Given the issue is only related to \n and not to \r (https://github.com/facebookresearch/fastText/blob/1142dc4c4ecbc19cc16eee5cdd28472e689267e6/python/fasttext_module/fasttext/FastText.py#L219), I've updated the replace method.

Lesson: Simply is better 🙃

Reference: CV2-5412

How has this been tested?

Has it been tested locally? Are there automated tests?

Have you considered secure coding practices when writing this code?

Please list any security concerns that may be relevant.

@DGaffney DGaffney merged commit 4ea9708 into develop Oct 3, 2024
4 checks passed
@computermacgyver computermacgyver deleted the CV2-5412-fix-fasttext-2 branch October 3, 2024 13:48
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.

2 participants