/// <summary>This is provided as a simple way to make a CoreLabel for a word from a String.</summary> /// <remarks> /// This is provided as a simple way to make a CoreLabel for a word from a String. /// It's often useful in fixup or test code. It sets all three of the Text, OriginalText, /// and Value annotations to the given value. /// </remarks> /// <param name="word">The word string to make a CoreLabel for</param> /// <returns>A CoreLabel for this word string</returns> public static Edu.Stanford.Nlp.Ling.CoreLabel WordFromString(string word) { Edu.Stanford.Nlp.Ling.CoreLabel cl = new Edu.Stanford.Nlp.Ling.CoreLabel(); cl.SetWord(word); cl.SetOriginalText(word); cl.SetValue(word); return(cl); }
/// <summary> /// Returns a new CoreLabel instance based on the contents of the given /// CoreLabel. /// </summary> /// <remarks> /// Returns a new CoreLabel instance based on the contents of the given /// CoreLabel. It copies the contents of the other CoreLabel. /// <i>Implementation note:</i> this is a the same as the constructor /// that takes a CoreMap, but is needed to ensure unique most specific /// type inference for selecting a constructor at compile-time. /// </remarks> /// <param name="label">The CoreLabel to copy</param> public CoreLabel(Edu.Stanford.Nlp.Ling.CoreLabel label) : this((ICoreMap)label) { }