/// <summary> /// Return the node containing the head tag for this node (or /// <code>null</code> if none), as recorded in this node's {@link /// CoreLabel <code>CoreLabel</code>}. (In contrast to {@link /// edu.stanford.nlp.ling.CategoryWordTag /// <code>CategoryWordTag</code>}, we store head words and head /// tags as references to nodes, not merely as <code>string</code>s.) /// </summary> /// <returns>the node containing the head tag for this node</returns> public TreeGraphNode HeadTagNode() { TreeGraphNode htn = SafeCast(_label.Get(typeof(TreeCoreAnnotations.HeadTagAnnotation))); if (htn == null || (htn.TreeGraph() != null && !(htn.TreeGraph().Equals(this.TreeGraph())))) { return(null); } return(htn); }
// TODO it's not really clear what graph the copy should be a part of public TreeGraphNode(TreeGraphNode t) : this(t, t._parent) { this.SetTreeGraph(t.TreeGraph()); }