示例#1
0
 private void TaggingcC()
 {
     foreach (TextGridItem tgi in ItemDict["CC"])
     {
         string tagText     = StringProcess.NormXSil(tgi.Text);
         string overlapText = StringProcess.NormOverlap(tagText);
         string cleanText   = StringProcess.CleanupChsString(overlapText, true);
         tgi.UpdateText(cleanText);
     }
 }
示例#2
0
        private static IEnumerable <Tuple <string, string> > MatchPairFiles(string pathLine)
        {
            string srcFilePath = pathLine.Split('\t')[1];
            string tgtFilePath = pathLine.Split('\t')[3];

            Console.WriteLine("Processing " + srcFilePath);
            var srcList = File.ReadLines(srcFilePath).Select(x => new InfoLine(x).Transcription).Select(x => StringProcess.CleanupEnuString(x));
            var tgtList = File.ReadLines(tgtFilePath).Select(x => new InfoLine(x).Transcription).Select(x => StringProcess.CleanupChsString(x));

            return(srcList.Zip(tgtList, (x, y) => new Tuple <string, string>(x, y)).Where(ValidPair));
        }