Skip to content
Snippets Groups Projects
Commit ad3c15a9 authored by Rawel's avatar Rawel
Browse files

Added tqdm for better progress tracking

parent ccd860db
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@ import subprocess
from joblib import dump
from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer
from tqdm import tqdm
class BagOfWords:
......@@ -21,8 +22,10 @@ class BagOfWords:
def create_bag_of_words():
all_words = open("words.c", "w+")
for path in glob.glob("Training/vccs/**/*.json", recursive=True) + glob.glob(
"Training/unclassified/**/*.json", recursive=True
for path in tqdm(
glob.glob("Training/vccs/**/*.json", recursive=True)
+ glob.glob("Training/unclassified/**/*.json", recursive=True),
desc="Creating bag of words",
):
with open(path, "r+") as json_file:
raw_data = json.load(json_file)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment