• R/O
  • SSH
  • HTTPS

chaki: Commit


Commit MetaInfo

Revisión653 (tree)
Tiempo2021-01-23 22:58:40
Autortomorita

Log Message

XML Export(KWIC)で例外が出ていたのを修正.

Cambiar Resumen

Diferencia incremental

--- trunk/ChaKi.NET/src/CreateAssemblyInfo.vbs (revision 652)
+++ trunk/ChaKi.NET/src/CreateAssemblyInfo.vbs (revision 653)
@@ -130,7 +130,7 @@
130130 lastVersionStr = objStream.ReadLine()
131131 objStream.Close
132132
133-If lastVersionStr <> versionStr Then
133+If true Then
134134 MsgBox "Updating AssemblyInfo's : " + versionStr
135135 ' AssemblyInfo.csを生成
136136 For Each info in AssemblyList
--- trunk/ChaKi.NET/src/Entity/Corpora/HeadInfo.cs (revision 652)
+++ trunk/ChaKi.NET/src/Entity/Corpora/HeadInfo.cs (revision 653)
@@ -10,5 +10,6 @@
1010 None = 0,
1111 Independent = 1,
1212 Ancillary = 2,
13+ Reserved = 3,
1314 }
1415 }
--- trunk/ChaKi.NET/src/Entity/Corpora/Word.cs (revision 652)
+++ trunk/ChaKi.NET/src/Entity/Corpora/Word.cs (revision 653)
@@ -108,6 +108,7 @@
108108 set { headInfo = value; }
109109 }
110110
111+ [XmlIgnore]
111112 // word_word table mapping (but not defined in Word.hbm.xml)
112113 public virtual Iesi.Collections.Generic.ISet<int> MappedTo
113114 {
@@ -126,6 +127,8 @@
126127 get { return lexeme; }
127128 set { lexeme = value; }
128129 }
130+
131+ [XmlIgnore]
129132 public virtual Segment Bunsetsu
130133 {
131134 get { return bunsetsu; }
--- trunk/ChaKi.NET/src/ImportWordRelation/Properties/AssemblyInfo.cs (revision 652)
+++ trunk/ChaKi.NET/src/ImportWordRelation/Properties/AssemblyInfo.cs (revision 653)
@@ -12,5 +12,5 @@
1212 [assembly: AssemblyCulture("")]
1313 [assembly: ComVisible(false)]
1414 [assembly: Guid("6a95808a-d1e3-47de-bb62-7ed7a281ac0b")]
15-[assembly: AssemblyVersion("3.16.651.0")]
16-[assembly: AssemblyFileVersion("3.16.651.0")]
15+[assembly: AssemblyVersion("3.14.652.0")]
16+[assembly: AssemblyFileVersion("3.14.652.0")]
--- trunk/ChaKi.NET/src/Service/Export/ExportServiceXml.cs (revision 652)
+++ trunk/ChaKi.NET/src/Service/Export/ExportServiceXml.cs (revision 653)
@@ -1,4 +1,5 @@
11 using System;
2+using System.Linq;
23 using System.Collections.Generic;
34 using System.Text;
45 using ChaKi.Entity.Corpora;
@@ -27,8 +28,36 @@
2728 {
2829 throw new Exception(string.Format("Sentence not found. Corpus={0}, senID={1}", ki.Crps.Name, ki.SenID));
2930 }
30- XmlSerializer ser = new XmlSerializer(typeof(Sentence));
31- ser.Serialize(m_XmlWriter, sen);
31+ var sen2 = new SentenceWrapped() { Sen = sen };
32+ XmlSerializer ser = new XmlSerializer(typeof(SentenceWrapped));
33+ ser.Serialize(m_XmlWriter, sen2);
3234 }
35+
36+
37+ // Sentence型をSerializeするための内部型
38+ // KWIC Export専用なので文節情報は出力しない.
39+ [XmlInclude(typeof(Word))]
40+ [XmlRoot("Sentence")]
41+ public class SentenceWrapped
42+ {
43+ public SentenceWrapped() { }
44+
45+ private Sentence m_Sen;
46+ [XmlIgnore]
47+ public Sentence Sen
48+ {
49+ set {
50+ m_Sen = value;
51+ this.Words = m_Sen.GetWords(0).ToList();
52+ }
53+ }
54+
55+ public int ID => m_Sen?.ID??-1;
56+
57+ public List<Word> Words { get; private set; }
58+ public int StartChar => m_Sen?.StartChar ?? -1;
59+ public int EndChar => m_Sen?.EndChar ?? -1;
60+ public int Pos => m_Sen?.Pos ?? -1;
61+ }
3362 }
3463 }
--- trunk/ChaKi.NET/src/Text2Corpus/Properties/AssemblyInfo.cs (revision 652)
+++ trunk/ChaKi.NET/src/Text2Corpus/Properties/AssemblyInfo.cs (revision 653)
@@ -12,5 +12,5 @@
1212 [assembly: AssemblyCulture("")]
1313 [assembly: ComVisible(false)]
1414 [assembly: Guid("a8cf8403-eb88-418f-bf54-56aeaef39268")]
15-[assembly: AssemblyVersion("3.16.651.0")]
16-[assembly: AssemblyFileVersion("3.16.651.0")]
15+[assembly: AssemblyVersion("3.14.652.0")]
16+[assembly: AssemblyFileVersion("3.14.652.0")]
--- trunk/ChaKi.NET/src/Timings/Properties/AssemblyInfo.cs (revision 652)
+++ trunk/ChaKi.NET/src/Timings/Properties/AssemblyInfo.cs (revision 653)
@@ -12,5 +12,5 @@
1212 [assembly: AssemblyCulture("")]
1313 [assembly: ComVisible(false)]
1414 [assembly: Guid("ff6652ed-b932-466b-944b-ce88d698979b")]
15-[assembly: AssemblyVersion("3.16.651.0")]
16-[assembly: AssemblyFileVersion("3.16.651.0")]
15+[assembly: AssemblyVersion("3.14.652.0")]
16+[assembly: AssemblyFileVersion("3.14.652.0")]
Show on old repository browser