Created
May 22, 2020 14:04
-
-
Save aravindpai/86be1b66f092ea919bb0ea4c3ffedea7 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
#importing library | |
import pandas as pd | |
#reading .txt file | |
text = pd.read_csv("sample.txt",header=None) | |
#converting a dataframe into a single list | |
corpus=[] | |
for row in text.values: | |
tokens = row[0].split(" ") | |
for token in tokens: | |
corpus.append(token) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment