Text2CorpusにおけるAppendBunrui処理で文字コードがUTF-8固定になっていたのを修正
@@ -12,5 +12,5 @@ | ||
12 | 12 | [assembly: AssemblyCulture("")] |
13 | 13 | [assembly: ComVisible(false)] |
14 | 14 | [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")] |
@@ -229,10 +229,10 @@ | ||
229 | 229 | return result.ToArray(); |
230 | 230 | } |
231 | 231 | |
232 | - public static void AppendBunrui(BunruiOutputFormat bunruiOutputFormat, string infile, string outfile) | |
232 | + public static void AppendBunrui(BunruiOutputFormat bunruiOutputFormat, string infile, string outfile, Encoding enc) | |
233 | 233 | { |
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)) | |
236 | 236 | { |
237 | 237 | string l; |
238 | 238 | while ((l = sr.ReadLine()) != null) |
@@ -12,5 +12,5 @@ | ||
12 | 12 | [assembly: AssemblyCulture("")] |
13 | 13 | [assembly: ComVisible(false)] |
14 | 14 | [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")] |
@@ -247,7 +247,7 @@ | ||
247 | 247 | string finalresult = tmpfile3; |
248 | 248 | if (!m_DoChunking) |
249 | 249 | { |
250 | - MecabHelper.AppendBunrui(m_BunruiOutputFormat, tmpfile3, tmpfile2); | |
250 | + MecabHelper.AppendBunrui(m_BunruiOutputFormat, tmpfile3, tmpfile2, MecabHelper.MecabEncoding); | |
251 | 251 | finalresult = tmpfile2; |
252 | 252 | } |
253 | 253 | ReportDetail($" After Mecab: {Abbrev(ReadStartingText(finalresult, MecabHelper.MecabEncoding))}..."); |
@@ -265,7 +265,7 @@ | ||
265 | 265 | ReportDetail($" Cabocha Encoding={CabochaHelper.CabochaEncoding.WebName}"); |
266 | 266 | CabochaHelper.InvokeCabocha(tmpfile1, tmpfile2, m_CabochaDicPath); |
267 | 267 | outenc = CabochaHelper.CabochaEncoding; |
268 | - MecabHelper.AppendBunrui(m_BunruiOutputFormat, tmpfile2, tmpfile3); | |
268 | + MecabHelper.AppendBunrui(m_BunruiOutputFormat, tmpfile2, tmpfile3, outenc); | |
269 | 269 | finalresult = tmpfile3; |
270 | 270 | ReportDetail($" After Cabocha: {Abbrev(ReadStartingText(finalresult, outenc))}..."); |
271 | 271 | } |
@@ -290,7 +290,7 @@ | ||
290 | 290 | ReportDetail(" Start Cabocha (IPADIC)."); |
291 | 291 | ReportDetail($" Cabocha Encoding={CabochaHelper.CabochaEncoding.WebName}"); |
292 | 292 | CabochaHelper.InvokeCabocha(finalresult, tmpfile1, null); |
293 | - MecabHelper.AppendBunrui(m_BunruiOutputFormat, tmpfile1, tmpfile3); | |
293 | + MecabHelper.AppendBunrui(m_BunruiOutputFormat, tmpfile1, tmpfile3, CabochaHelper.CabochaEncoding); | |
294 | 294 | finalresult = tmpfile3; |
295 | 295 | ReportDetail($" After Cabocha: {Abbrev(ReadStartingText(finalresult, CabochaHelper.CabochaEncoding))}..."); |
296 | 296 | } |
@@ -12,5 +12,5 @@ | ||
12 | 12 | [assembly: AssemblyCulture("")] |
13 | 13 | [assembly: ComVisible(false)] |
14 | 14 | [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")] |