예제 #1
0
        // ----------------------------------------------------------------------------------------
        /// <!-- SplitCorpus -->
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        private string[] SplitCorpus()
        {
            string[] line = null;
            string   doc  = FilesIO.GetStringFromFile(CorpusPath, ""); line = doc.Split("\r\n".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);

            return(line);
        }
예제 #2
0
        // ----------------------------------------------------------------------------------------
        /// <!-- FixImport -->
        /// <summary>
        ///
        /// </summary>
        /// <param name="oldPath"></param>
        /// <param name="newPath"></param>
        private static void FixImport(string oldPath, string newPath)
        {
            string oldSchema = FilesIO.GetStringFromFile(oldPath, "");
            string newSchema = FixImport(oldSchema);

            newSchema = Regex.Replace(newSchema, "encoding=\"utf-16\"", "encoding=\"utf-8\"");
            FilesIO.WriteStringToFile(newPath, newSchema, false);
        }