Esempio n. 1
0
 /// <summary>
 /// Kopierkonstruktor mit tiefer Kopie.
 /// </summary>
 public Allomorph(Allomorph am)
 {
     this.allo       = new List <Sign>(Functions.DeepClone(am.Allo));
     this.lemma      = new List <Sign>(Functions.DeepClone(am.Lemma));
     this.tbl        = am.Tbl;
     this.pos        = am.pos;
     this.cats       = am.Cats;
     this.additional = new Dictionary <string, string>(am.Additional);
 }
Esempio n. 2
0
        /// <summary>
        /// Neuen Knoten einfügen.
        /// </summary>
        public void Insert(List <Sign> ll, string tree, AlloTbl atbl, List <Sign> lemma, string[] cats, Dictionary <String, String> additional, String pos)
        {
            string tbl;

            if (tree.Equals(""))
            {
                tbl = atbl.Tbl;
            }
            else
            {
                tbl = tree;
            }

            Node current = this.root;

            if (ll.Count == 0)
            {
                current.Last = true;
            }

            for (int i = 0; i < ll.Count; i++)
            {
                Node child = current.ChildNode(ll [i]);
                if (child != null)
                {
                    current = child;
                }
                else
                {
                    current.Children.Add(ll [i], new Node(ll [i]));
                    current = current.ChildNode(ll [i]);
                }

                if (i == ll.Count - 1)
                {
                    current.Last = true;
                    Allomorph allo = new Allomorph(ll, lemma, tbl, cats, additional, pos);
                    current.AlloList.Add(allo);
                }
            }
        }