Rank: 1774 based on 82 downloads (last 30 days) and 9 files submitted
photo

Samyukta Ramnath

E-mail
Company/University
BITS Pilani

Personal Profile:

 

Watch this Author's files

 

Files Posted by Samyukta Ramnath View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
09 Jun 2014 Screenshot SentenceParseNew.m The Main File which uses and calls all other functions Author: Samyukta Ramnath machine learning 3 0
23 Jul 2013 Screenshot Training Data for SentenceParseNew TrainingDataSPNew is the training data for SentenceParseNew Author: Samyukta Ramnath training data 6 0
23 Jul 2013 Screenshot POS Tag for first word in the sentence Finds the most probable Parts Of Speech tag for the first word in a sentence Author: Samyukta Ramnath pos tag 8 0
22 Jul 2013 Screenshot Probability of Words following the first word in a sentence Part of SentenceParseNew uploaded earlier Author: Samyukta Ramnath pos tag 12 0
22 Jul 2013 Screenshot POS Tag for rest of words in Sentence function : Part of SentenceParseNew submitted earlier. Author: Samyukta Ramnath pos tags 4 0
Comments and Ratings on Samyukta Ramnath's Files View all
Updated File Comment by Comments Rating
08 Sep 2014 BayesClassify Takes in text input, and classifies it into one of five categories. Author: Samyukta Ramnath Yongcheng Jing

19 Jul 2013 fileOpen Used to open a text file and put the data in it into a cell array. Author: Samyukta Ramnath Jan Simon

I've added a longer comment here, which unfortunately vanished after I've posted the fix for the typo. How annoying! So let me try it again:

Hard coding the folder name in the code reduces the use for the community. It would be much better to let dirName be an input argument.

The "count" is not used anywhere, such that omitting it would be cleaner.

The last FID is replied, but all former ones are overwritten. Beside the fact, that this is not useful, the opened files are not closed inside the function. This will let Matlab stop with an error for about 250 opened files.

The last loop is meaningless and wastes time only:
for j = 1 : size(files), data{j}; end
Nothing happens here. Notice that SIZE replies a vector and that 1:SIZE(files) might do something unexpected.

Therefore I suggest a simplified version:

function data = fileOpen(dirName, delimiter)
files = dir(fullfile(dirName, delimiter));
data = cell(numel(files), 1);
for k = 1:numel(files)
data{k} = fileread(fullfile(dirName, files{k}.name));
end

19 Jul 2013 fileOpen Used to open a text file and put the data in it into a cell array. Author: Samyukta Ramnath Jan Simon

Sorry, a typo: Use "k" instead of "i" inside the loop:

data{k} = fileread(fullfile(dirName, files{k}.name));

Contact us