Example #1
0
 protected virtual void Write(string localName, Morpheme morpheme)
 {
     m_xmlWriter.WriteStartElement(localName);
     m_xmlWriter.WriteAttributeString("id", morpheme.ID);
     m_xmlWriter.WriteElementString("Description", morpheme.Description);
     if (morpheme.Gloss != null)
     {
         m_xmlWriter.WriteElementString("Gloss", morpheme.Gloss.Description);
     }
     m_xmlWriter.WriteEndElement();
 }
Example #2
0
        public int CompareTo(Allomorph other)
        {
            if (other == null)
            {
                return(1);
            }

            int res = Morpheme.GetHashCode().CompareTo(other.Morpheme.GetHashCode());

            if (res != 0)
            {
                return(res);
            }

            return(Index.CompareTo(other.Index));
        }
Example #3
0
		private XElement CreateMorphemeElement(Morpheme morpheme)
		{
			var msaID = (int?) morpheme.Properties["ID"] ?? 0;
			IMoMorphSynAnalysis msa;
			if (msaID == 0 || !m_cache.ServiceLocator.GetInstance<IMoMorphSynAnalysisRepository>().TryGetObject(msaID, out msa))
				return null;
			return HCParser.CreateMorphemeElement(msa);
		}
Example #4
0
		protected virtual void Write(string localName, Morpheme morpheme)
		{
			m_xmlWriter.WriteStartElement(localName);
			m_xmlWriter.WriteAttributeString("id", morpheme.ID);
			m_xmlWriter.WriteElementString("Description", morpheme.Description);
			if (morpheme.Gloss != null)
				m_xmlWriter.WriteElementString("Gloss", morpheme.Gloss.Description);
			m_xmlWriter.WriteEndElement();
		}
Example #5
0
		protected virtual XElement Write(string name, Morpheme morpheme)
		{
			XElement elem = Write(name, (HCObject) morpheme);
			if (morpheme.Gloss != null)
				elem.Add(new XElement("Gloss", morpheme.Gloss.Description));
			return elem;
		}