def makeDict(self,str,filename=''):
        if filename == '':
            sentences = str.split('.')
        else:
            print("Making dictionary from",filename+"...")
            path = 'texts/' + filename
            f = open(path,"r")
            sentences = f.read().split('.')

        # add every sentence in the source to the dictionary
        for s in range (0,len(sentences)):
            sentences[s] = sentences[s].strip('\n')
            try:
                sentences[s] = sentences[s].translate(string.maketrans("",""), string.punctuation)
            except __HOLE__:
                sentences[s] = sentences[s].translate({i: "" for i in string.punctuation})
            sentences[s] = sentences[s].lower()
            sentences[s] = sentences[s].split()

        D = {}
        # go through each sentence, add each word to the dictionary, incrementing length each time
        for s in sentences:
            for w in range(0,len(s)):
                self.addWord(D,s,w,self.vision)


        D = self.normalizeFreqs(D)
        D = self.sigScores(D,D)
        return D

    # uses word frequency information to
dataset/ETHPy150Open jbrew/pt-voicebox/vbox.py/Voicebox.makeDict