count occurrences of string in acell of cells array (How many times a string appear) /*naive baies algorthim -cs*/
조회 수: 2 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!