f.write(" ".join(negative)) f.close() f = open(positiveresult, "w") f.write(" ".join(positive)) f.close() #Run Modules in the for loop #Get total number of comments f = open(filename, "rb") numline = len(f.readlines())-4 f.close() #Word Analysis c.characterize(results, filename) overallSecondarys = c.nonTrivial(words,numline,results, ignoreWords, filename) for overallSecondary in overallSecondarys: overall = c.topicList(overallSecondary, filename, ignoreWords) results.write("\n************************************************") results.write("\nSecondary Analysis of " + overallSecondary + ": ") c.nonTrivialSecondary(overallSecondary, overall, c.wordCount(filename, overallSecondary), results, ignoreWords, filename) #Negative Section results.write("\n----------------------------------------------") results.write("\nAnalysis of all Negative Comments: ") #Names nameofnames.write("\n----------------------------------------------") nameofnames.write("\nNegative Comments") c.namethatname(nameofnames, letter, text, 1, filename)