Commit 38da5ca5 authored by Victor Zimmermann's avatar Victor Zimmermann
Browse files
parents c36e2727 0ebacbd6
Loading
Loading
Loading
Loading
+2 −2
Changes for code/absinth.py: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
import os # for reading files
from tqdm import tqdm # for counting seconds
#from tqdm import tqdm # for counting seconds
import spacy # for nlp
import networkx as nx # for visualisation
import matplotlib.pyplot as plt # for visualisation
@@ -46,7 +46,7 @@ class Graph:
        files = [corpus_path+'/'+f for f in os.listdir(corpus_path)] # list of file paths (note that no other files should be in this directory)
        spaced_word = word.replace('_', ' ') #input words are generally seperated with underscores
        
        for f in tqdm(files[:]): #iterates over corpus
        for f in files[:]: #iterates over corpus
            with open(f, 'r') as source:
                
                try: #some decoding throws the iteration