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
with open (f, "r+") as myfile: | |
s=myfile.read() | |
ret = re.sub(';',' ', s) | |
ret = re.sub(',1\n',';1\n', s) | |
ret = re.sub(',0\n',';0\n', s) | |
myfile.write(ret) |
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 os | |
import gc | |
import csv | |
import numpy as np # linear algebra | |
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) | |
from nltk import TweetTokenizer | |
from nltk.corpus import stopwords | |
from sklearn.feature_extraction.text import TfidfVectorizer | |
from keras.preprocessing.text import Tokenizer | |
from keras.preprocessing.sequence import pad_sequences |
NewerOlder