Last active
October 11, 2020 19:41
-
-
Save guilhermefgs/1733a349925321676cb3d2ad0bd41630 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
import nltk | |
# id do corpus | |
# no nosso caso estamos usando id machado | |
nltk_id = 'machado' | |
# eh necessario baixar o corpus | |
nltk.download(nltk_id) | |
# agora o corpus esta acessivel | |
# visualizando as obras disponiveis | |
print(nltk.corpus.machado.readme()) | |
# ou | |
print(nltk.corpus.machado.fileids()) | |
# apos escolher a obra | |
# salvamos a string em uma variavel | |
dom_casmurro = nltk.corpus.machado.raw('romance/marm08.txt') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment