/// <summary> Constructor.</summary> /// <param name="documentID">- ID of the document which this sentence belong to /// </param> /// <param name="sentenceID">- ID of the sentence /// </param> /// <param name="endOfDocument">- If this flag is true, this sentence is the last one of the document. /// </param> public Sentence(int documentID, int sentenceID, bool endOfDocument, System.String[] plainEojeols, Eojeol[] eojeols) { base.DocumentID = documentID; base.SentenceID = sentenceID; base.EndOfDocument = endOfDocument; this.eojeols = eojeols; this.plainEojeols = plainEojeols; if (eojeols != null && plainEojeols != null) { if (plainEojeols.Length <= eojeols.Length) { length = eojeols.Length; } else { length = plainEojeols.Length; } } else { length = 0; } }
/// <summary> Adds eojeols that are morphologically analyzed about one eojeol /// to the end of the sentence. /// </summary> /// <param name="eojeols">- morphologically analyzed eojeol list about one eojeol /// </param> /// <returns> true: when it is added correctly, otherwise false /// </returns> public virtual bool addEojeolSet(Eojeol[] eojeols) { eojeolSetArray.Add(eojeols); return true; }
/// <summary> Set an eojeol at the specified index with morphemes and their tags.</summary> /// <param name="index">- the index of the eojeol to set up /// </param> /// <param name="morphemes">- the new morpheme list /// </param> /// <param name="tags">- the new tag list /// </param> public virtual void setEojeol(int index, System.String[] morphemes, System.String[] tags) { Eojeol eojeol = new Eojeol(morphemes, tags); eojeols[index] = eojeol; }
/// <summary> Set an eojeol at the specified index.</summary> /// <param name="index">- the index of the eojeol to set up /// </param> /// <param name="eojeol">- the new eojeol /// </param> public virtual void setEojeol(int index, Eojeol eojeol) { eojeols[index] = eojeol; }
/// <summary> Set an eojeol at the specified index with morphemes and their tags.</summary> /// <param name="index">- the index of the eojeol to set up /// </param> /// <param name="morphemes">- the new morpheme list /// </param> /// <param name="tags">- the new tag list /// </param> public virtual void setEojeol(int index, System.String[] morphemes, System.String[] tags) { Eojeol eojeol = new Eojeol(morphemes, tags); eojeols[index] = eojeol; }
/// <summary> Set an eojeol at the specified index.</summary> /// <param name="index">- the index of the eojeol to set up /// </param> /// <param name="eojeol">- the new eojeol /// </param> public virtual void setEojeol(int index, Eojeol eojeol) { eojeols[index] = eojeol; }