Home > asr > sylRead.m

sylRead

PURPOSE ^

sylRead: Read a .syl file

SYNOPSIS ^

function output=sylRead(sylFile)

DESCRIPTION ^

 sylRead: Read a .syl file

    For example:
        sylFile='tangPoem.hanyu.syl';
        output=sylRead(sylFile)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function output=sylRead(sylFile)
0002 % sylRead: Read a .syl file
0003 %
0004 %    For example:
0005 %        sylFile='tangPoem.hanyu.syl';
0006 %        output=sylRead(sylFile)
0007 
0008 %    Roger Jang, 20071128
0009 
0010 contents=textread(sylFile, '%s', 'delimiter', '\n', 'whitespace', '');
0011 for i=1:length(contents)
0012     line=contents{i};
0013     items=split(line, 9);
0014     output(i).sentenceSyl=strrep(items{1}, '-', ' ');
0015     output(i).textIndex=eval(items{2});
0016 end

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