Exemplo n.º 1
0
def getBOWTrain(td,filename):
	# Generating the wordList
	wordList = getWordList(td)
	filen = filename + "_wordList.csv"
	cf.writeWordListToCSV(wordList,filen);

	# reading saved WordList
	#wordList = getWordListFromCSV('training_wordList.csv');

	#Bag Of Words model generation
	bow = generateBagOfWords(td,wordList)
	filen = filename + "_BOW.csv"
	cf.writeListToCSV(bow,filen)
	return bow
Exemplo n.º 2
0
def getBOWTrain(td, filename):
    # Generating the wordList
    wordList = getWordList(td)
    filen = filename + "_wordList.csv"
    cf.writeWordListToCSV(wordList, filen)

    # reading saved WordList
    #wordList = getWordListFromCSV('training_wordList.csv');

    #Bag Of Words model generation
    bow = generateBagOfWords(td, wordList)
    filen = filename + "_BOW.csv"
    cf.writeListToCSV(bow, filen)
    return bow
Exemplo n.º 3
0
def getBOW(td,trainWordList,filename):
	#Bag Of Words model generation
	bow = generateBagOfWords(td,trainWordList)
	filen = filename + "_BOW.csv"
	cf.writeListToCSV(bow,filen)
	return bow
Exemplo n.º 4
0
def getBOW(td, trainWordList, filename):
    #Bag Of Words model generation
    bow = generateBagOfWords(td, trainWordList)
    filen = filename + "_BOW.csv"
    cf.writeListToCSV(bow, filen)
    return bow