示例#1
0
def idf():
	event_name = raw_input("Enter event name: ")
	start_date = raw_input("Enter start date, time (yyyy-mm-dd hh:MM): ")
	end_date = raw_input("Enter finish date, time (yyyy-mm-dd hh:MM): ") 

	print "Start: %s, End: %s, Event: %s" %(start_date, end_date, event_name)

	word_stddev, word_idf = stddev.get_word_IDFcomplete(start_date, end_date, select=True, threshold=0.3)

	# file names
	dir_name = "out/"

	# sd_fname = event_name + "sd" + ".csv"
	idf_fname = event_name + ".csv"

	fileio.write_idf_to_file(word_idf, dir_name + idf_fname)
示例#2
0
def idf():
	event_name = raw_input("Enter event name: ")
	start_date = raw_input("Enter start date, time (yyyy-mm-dd hh:MM): ")
	end_date = raw_input("Enter finish date, time (yyyy-mm-dd hh:MM): ") 

	print "Start: %s, End: %s, Event: %s" %(start_date, end_date, event_name)

	word_stddev, word_idf = stddev.get_word_IDFcomplete(start_date, end_date, select=True, threshold=0.3)

	# file names
	dir_name = "I_ii-iv_WordsIdfSeries/"

	# create the directory if it doesn't exist yet
	os.system("mkdir " + dir_name)

	# sd_fname = event_name + "sd" + ".csv"
	idf_fname = event_name + ".csv"

	fileio.write_idf_to_file(word_idf, dir_name + idf_fname)