Skip to content

Conversation

SR-Rubel
Copy link

Summary

This PR fixes a SyntaxWarning in context_word_embs.py raised by Python 3.12+ due to unescaped regex sequences like \s and \W.

Changes

  • Use raw strings for regex: r'(?<=\s|\W)' and r'(?=\s|\W)'

Why?

  • Fixes compatibility issues with Python 3.12+.
  • Resolves warning shown in issue.

Related

Fixes #350

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.

SyntaxWarning from invalid escape sequences in regex patterns (Python 3.12+)
1 participant