Created
October 11, 2019 13:44
-
-
Save morkapronczay/85ba323f992c2042199b58b9a9cf59f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from nltk.tokenize import RegexpTokenizer | |
# tokenized text - remove punctuation | |
tokenizer = RegexpTokenizer(r'\w+') | |
texts_split = {lan: {key: tokenizer.tokenize(text) for key, text in texts[lan].items()} for lan in languages} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment