count occurrences of string in acell of cells array (How many times a string appear) /*naive baies algorthim -cs*/
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
i have given alarge single cell name Vocabulary.
Vocabulary = {'aaa','acc','champion'...,'zzz'} //all the words existing in all documents below without repitions
i also have given acell of cells array named alldocuments
alldocuments={{37*1 cell} ,{128*1 cell}...}
each cell includes words and category /* there are 3 categories sports ,science ,politics */
for example :
sports=alldoucments{1} 'aaa' , 'c','zzz','a','c','aaa'... /* 37 *1 cell/*
science=alldoucments {2} ='aaa' ,'q' ... /* 128*1 cell */
sports=alldocuments{3}= 'champoin', 'first'...
my main goal is to count for each word in vocabulary the number of occurrences according to the categories. for example { sports = 'aaa'=100 'acc'=0 'champion'=1000 ... scince ='aaa'=2 'acc'=5 champion=320... and so on for politics if anyone can help me he will save my week not only my day!!:) Your suggestion and ideas are highly appreciated. Thanx in advance
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!