def create_graph_from_formatted_document(formatted_document): #create list of words from document then use that list to #create frequency spectrum. take that frequency #spectrum and graph it list_of_words = df.list_words(formatted_document) frequency_matrix = df.list_frequency(list_of_words) dictionary = number_key(frequency_matrix) edge_set = create_edge_set(dictionary, list_of_words) graph_of_document = create_graph(dictionary, edge_set) #because graph is all numbers and to get what word that is you have #to put that number into the frequency matrix frequency[i][0] return (graph_of_document, frequency_matrix, dictionary)