• R/O
  • SSH
  • HTTPS

chaki: 提交


Commit MetaInfo

修订版627 (tree)
时间2020-05-14 18:16:06
作者tomorita

Log Message

Text2CorpusにおけるAppendBunrui処理で文字コードがUTF-8固定になっていたのを修正

更改概述

差异

--- trunk/ChaKi.NET/src/ImportWordRelation/Properties/AssemblyInfo.cs (revision 626)
+++ trunk/ChaKi.NET/src/ImportWordRelation/Properties/AssemblyInfo.cs (revision 627)
@@ -12,5 +12,5 @@
1212 [assembly: AssemblyCulture("")]
1313 [assembly: ComVisible(false)]
1414 [assembly: Guid("6a95808a-d1e3-47de-bb62-7ed7a281ac0b")]
15-[assembly: AssemblyVersion("3.13.625.0")]
16-[assembly: AssemblyFileVersion("3.13.625.0")]
15+[assembly: AssemblyVersion("3.13.626.0")]
16+[assembly: AssemblyFileVersion("3.13.626.0")]
--- trunk/ChaKi.NET/src/Text2Corpus/Helpers/MecabHelper.cs (revision 626)
+++ trunk/ChaKi.NET/src/Text2Corpus/Helpers/MecabHelper.cs (revision 627)
@@ -229,10 +229,10 @@
229229 return result.ToArray();
230230 }
231231
232- public static void AppendBunrui(BunruiOutputFormat bunruiOutputFormat, string infile, string outfile)
232+ public static void AppendBunrui(BunruiOutputFormat bunruiOutputFormat, string infile, string outfile, Encoding enc)
233233 {
234- using (var sr = new StreamReader(infile))
235- using (var sw = new StreamWriter(outfile, false))
234+ using (var sr = new StreamReader(infile, enc))
235+ using (var sw = new StreamWriter(outfile, false, enc))
236236 {
237237 string l;
238238 while ((l = sr.ReadLine()) != null)
--- trunk/ChaKi.NET/src/Text2Corpus/Properties/AssemblyInfo.cs (revision 626)
+++ trunk/ChaKi.NET/src/Text2Corpus/Properties/AssemblyInfo.cs (revision 627)
@@ -12,5 +12,5 @@
1212 [assembly: AssemblyCulture("")]
1313 [assembly: ComVisible(false)]
1414 [assembly: Guid("a8cf8403-eb88-418f-bf54-56aeaef39268")]
15-[assembly: AssemblyVersion("3.13.625.0")]
16-[assembly: AssemblyFileVersion("3.13.625.0")]
15+[assembly: AssemblyVersion("3.13.626.0")]
16+[assembly: AssemblyFileVersion("3.13.626.0")]
--- trunk/ChaKi.NET/src/Text2Corpus/TextToCorpusWorker.cs (revision 626)
+++ trunk/ChaKi.NET/src/Text2Corpus/TextToCorpusWorker.cs (revision 627)
@@ -247,7 +247,7 @@
247247 string finalresult = tmpfile3;
248248 if (!m_DoChunking)
249249 {
250- MecabHelper.AppendBunrui(m_BunruiOutputFormat, tmpfile3, tmpfile2);
250+ MecabHelper.AppendBunrui(m_BunruiOutputFormat, tmpfile3, tmpfile2, MecabHelper.MecabEncoding);
251251 finalresult = tmpfile2;
252252 }
253253 ReportDetail($" After Mecab: {Abbrev(ReadStartingText(finalresult, MecabHelper.MecabEncoding))}...");
@@ -265,7 +265,7 @@
265265 ReportDetail($" Cabocha Encoding={CabochaHelper.CabochaEncoding.WebName}");
266266 CabochaHelper.InvokeCabocha(tmpfile1, tmpfile2, m_CabochaDicPath);
267267 outenc = CabochaHelper.CabochaEncoding;
268- MecabHelper.AppendBunrui(m_BunruiOutputFormat, tmpfile2, tmpfile3);
268+ MecabHelper.AppendBunrui(m_BunruiOutputFormat, tmpfile2, tmpfile3, outenc);
269269 finalresult = tmpfile3;
270270 ReportDetail($" After Cabocha: {Abbrev(ReadStartingText(finalresult, outenc))}...");
271271 }
@@ -290,7 +290,7 @@
290290 ReportDetail(" Start Cabocha (IPADIC).");
291291 ReportDetail($" Cabocha Encoding={CabochaHelper.CabochaEncoding.WebName}");
292292 CabochaHelper.InvokeCabocha(finalresult, tmpfile1, null);
293- MecabHelper.AppendBunrui(m_BunruiOutputFormat, tmpfile1, tmpfile3);
293+ MecabHelper.AppendBunrui(m_BunruiOutputFormat, tmpfile1, tmpfile3, CabochaHelper.CabochaEncoding);
294294 finalresult = tmpfile3;
295295 ReportDetail($" After Cabocha: {Abbrev(ReadStartingText(finalresult, CabochaHelper.CabochaEncoding))}...");
296296 }
--- trunk/ChaKi.NET/src/Timings/Properties/AssemblyInfo.cs (revision 626)
+++ trunk/ChaKi.NET/src/Timings/Properties/AssemblyInfo.cs (revision 627)
@@ -12,5 +12,5 @@
1212 [assembly: AssemblyCulture("")]
1313 [assembly: ComVisible(false)]
1414 [assembly: Guid("ff6652ed-b932-466b-944b-ce88d698979b")]
15-[assembly: AssemblyVersion("3.13.625.0")]
16-[assembly: AssemblyFileVersion("3.13.625.0")]
15+[assembly: AssemblyVersion("3.13.626.0")]
16+[assembly: AssemblyFileVersion("3.13.626.0")]
Show on old repository browser