Created
August 24, 2020 21:45
-
-
Save sevperez/5bc95027710765bf9a5678ee2e1c31f8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# load the full text and put it through the pipeline | |
def load_text_doc(file_path): | |
with open(file_path) as f: | |
txt = f.read() | |
return txt | |
moby_path = "moby_dick.txt" | |
moby_dick_text = load_text_doc(moby_path) | |
moby_dick = nlp(moby_dick_text) | |
print_doc_info(moby_dick) | |
# Num sentences: 9966 | |
# Num tokens: 253928 | |
# Num words: 253928 | |
# Num entities: 7955 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment