The problem is there are some group like auto,business etc and some words in these groups like car,gun etc in a txt file,'text.txt'
sub.autos $tab$ shift clutch car gear clutch car turn advanc repli
sub.autos $tab$ bike long clutch pulsar
talk.politics.gun $tab$ assault AK-47 war assault
talk.politics.gun $tab$ country war terror
and I need to create TF-IDF ( term frequency – inverse document frequency), that is, number of times a word occurs in a particular group in a form of a matrix in which each row will correspond to a group, and each column represents the occurrence of a particular word in respective group.
I know the method for txt file to 1-d array using textread but change it in 2-d made me clueless.i am a beginner in matlab and any help would be appreciated.
PS - tf-idf wiki link http://en.wikipedia.org/wiki/Tf-idf