thesis-anne/Starter.py

32 lines
633 B
Python
Raw Normal View History

2018-09-07 12:16:47 +00:00
'''
Starter
=============
starter program
'''
from BagOfWords import BagOfWords
from CsvHandler import CsvHandler
from DecisionTree import DecisionTree
from NaiveBayes import NaiveBayes
#from Requester import Requester
from SVM import SVM
2018-09-07 12:16:47 +00:00
print('# starting program')
print('#')
2018-09-07 12:16:47 +00:00
# only if new unlabeled(!) data set is required:
2018-09-07 12:16:47 +00:00
# Requester.save_articles_from_webhoseio()
2018-09-07 12:16:47 +00:00
file = 'classification_labelled_corrected.csv'
# read csv file
print('# reading dataset')
print('#')
2018-09-07 12:16:47 +00:00
dataset = CsvHandler.read_csv(file)
# DecisionTree.make_tree(dataset)
NaiveBayes.make_naive_bayes(dataset)
SVM.make_svm(dataset)
2018-09-07 12:16:47 +00:00
print('# ending program')