Last active
May 22, 2020 14:16
-
-
Save aravindpai/70619db5f051e572d9f2454939bf0898 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
#initlialize the vocabulary | |
vocab = list(set(" ".join(corpus))) | |
vocab.remove(' ') | |
#split the word into characters | |
corpus = [" ".join(token) for token in corpus] | |
#appending </w> | |
corpus=[token+' </w>' for token in corpus] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment