-
Notifications
You must be signed in to change notification settings - Fork 1
/
edurate.py
33 lines (27 loc) · 1.13 KB
/
edurate.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"""Performs NLP on student responses to teaching evaluation."""
import sys
import logging
import spreadsheet
from parse_arguments import parse_arguments
from read_responses import read_responses
from graphing import graph
from edurate_gensim import gensim_analysis
if __name__ == "__main__":
print("Welcome to Edurate")
print("https://github.com/Edurate/edurate")
logging.info("Analyzes the Google form responses with gensim and " +
"returns the repeated words, graphs, or archives the file")
EDU_ARGS = parse_arguments(sys.argv[1:])
SPREADSHEET_LIST = spreadsheet.read_from_spreadsheet()
DATA = spreadsheet.get_graph_data(SPREADSHEET_LIST)
if EDU_ARGS.graph:
print("Creating Graphs...")
graph(DATA)
spreadsheet.create_csv(SPREADSHEET_LIST, EDU_ARGS.file)
RESPONSES = read_responses(EDU_ARGS.file)
RESPONSES = spreadsheet.filter_dates(RESPONSES)
RESPONSES = spreadsheet.flip_responses(RESPONSES)
QUESTION_NUMBER = 7
for index, response in enumerate(RESPONSES[8:12]):
gensim_analysis(response, QUESTION_NUMBER, EDU_ARGS.topics)
QUESTION_NUMBER += 1