Esempio n. 1
0
        public AMRRelation Clone()
        {
            var rel = new AMRRelation();

            rel.Head  = this.Head;
            rel.Tail  = this.Tail;
            rel.label = this.label;
            return(rel);
        }
Esempio n. 2
0
        public void ReadXML(XElement graphelement)
        {
            name = int.Parse(graphelement.Attribute("id").Value);

            var xmlnodes = from c in graphelement.Elements("nodes").Elements("node")
                           select c;

            foreach (var xmlnode in xmlnodes)
            {
                var node = new AMRNode();
                node.ReadXML(xmlnode, this.name);
                this.Nodes.Add(node);
            }

            var edgesxml = from c in graphelement.Elements("edges").Elements("edge")
                           select c;

            foreach (var xmledge in edgesxml)
            {
                var relation = new AMRRelation();
                relation.ReadXML(xmledge);
                this.Relations.Add(relation);
            }
        }