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

Better word detection. Simpler splitting code. #15

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

atnbueno
Copy link

  • Was the /(< ([^>]+)<)/g regex trying to delete HTML tags? If so, I fixed it
  • The two last replacements do the same as .trim()
  • With normalize+replace words with diacritics are counted properly. Not perfect, but usually enough for a few languages.

Fixes #13 and #14 (and not only for Spanish)

* Was the `/(< ([^>]+)<)/g` regex trying to delete HTML tags? If so, I fixed it
* The two last replacements do the same as `.trim()`
* With `normalize`+`replace` words with diacritics are counted properly. Not perfect, but usually enough for a few languages.
Base automatically changed from master to main February 19, 2021 16:24
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.

Not counting HTML tags?
1 participant