dictWrite: Write a dict to a dict file Usage: dictWrite(dict, dictFile)
0001 function dictWrite(dict, dictFile) 0002 % dictWrite: Write a dict to a dict file 0003 % Usage: dictWrite(dict, dictFile) 0004 0005 fid=fopen(dictFile, 'w'); 0006 0007 sylNum=length(dict); 0008 for i=1:sylNum 0009 fprintf(fid, '%s\t', dict(i).word); 0010 for j=1:length(dict(i).model)-1 0011 fprintf(fid, '%s ', dict(i).model{j}); 0012 end 0013 fprintf(fid, '%s\r\n', dict(i).model{end}); 0014 end 0015 fclose(fid);