-
Notifications
You must be signed in to change notification settings - Fork 1
/
TF-IDF(AoF).txt
15 lines (13 loc) · 1.79 KB
/
TF-IDF(AoF).txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Code
% Code for TF-IDF with average Occurence Frequency %
head(Automotive2)
textdata=Automotive2.text;
head(textdata);
documents=preprocessed(textdata);
bag=bagOfWords(documents);
bag=removeEmptyDocuments(bag);
aof=sum(sum(bag.Counts(:)))/bag.NumWords;
bag=removeInfrequentWords(bag,aof);
m=tfidf(bag);
x=full(m);
%The keywords and their tf-idf score are represented in matrix 'x'%