/// <summary>This constructor is used to recreate a CorefMention following serialization.</summary> public CorefMention(Dictionaries.MentionType mentionType, Dictionaries.Number number, Dictionaries.Gender gender, Dictionaries.Animacy animacy, int startIndex, int endIndex, int headIndex, int corefClusterID, int mentionID, int sentNum, IntTuple position, string mentionSpan) { this.mentionType = mentionType; this.number = number; this.gender = gender; this.animacy = animacy; this.startIndex = startIndex; this.endIndex = endIndex; this.headIndex = headIndex; this.corefClusterID = corefClusterID; this.mentionID = mentionID; this.sentNum = sentNum; this.position = position; this.mentionSpan = mentionSpan; }
/// <summary>This constructor builds the external CorefMention class from the internal Mention.</summary> public CorefMention(Mention m, IntTuple pos) { mentionType = m.mentionType; number = m.number; gender = m.gender; animacy = m.animacy; startIndex = m.startIndex + 1; endIndex = m.endIndex + 1; headIndex = m.headIndex + 1; corefClusterID = m.corefClusterID; sentNum = m.sentNum + 1; mentionID = m.mentionID; mentionSpan = m.SpanToString(); // index starts from 1 position = new IntTuple(2); position.Set(0, pos.Get(0) + 1); position.Set(1, pos.Get(1) + 1); m.headWord.Set(typeof(CorefCoreAnnotations.CorefClusterIdAnnotation), corefClusterID); }