Last active
June 18, 2023 05:35
-
-
Save kylebgorman/d32ce28f938239a4d63302c46d08420c to your computer and use it in GitHub Desktop.
Applies NLTK PTB tokenizer to input text
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
#!/usr/bin/env python | |
import fileinput | |
import nltk | |
if __name__ == "__main__": | |
for line in fileinput.input(): | |
print(" ".join(nltk.word_tokenize(line))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment