Home > asr > dictWrite.m

dictWrite

PURPOSE ^

dictWrite: Write a dict to a dict file

SYNOPSIS ^

function dictWrite(dict, dictFile)

DESCRIPTION ^

 dictWrite: Write a dict to a dict file
    Usage: dictWrite(dict, dictFile)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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);

Generated on Tue 01-Jun-2010 09:50:19 by m2html © 2003