示例#1
0
        /// <summary>
        /// Creates rule for note.
        /// </summary>
        /// <returns></returns>
        public NotenizerNoteRule CreateRule()
        {
            this._rule = new NotenizerNoteRule();
            this._rule.Match = new Match(NotenizerConstants.MaxMatchValue);
            this._rule.SentencesTerminators = new SentencesTerminators(this._noteParts.Select(x => x.InitializedNoteParticles.Count).ToList<int>());

            return this._rule;
        }
示例#2
0
 /// <summary>
 /// Aplies rule.
 /// </summary>
 /// <param name="note"></param>
 /// <param name="noteRule"></param>
 private void ApplyRule(NotenizerNote note, NotenizerNoteRule noteRule)
 {
     note.SplitToSentences(noteRule.SentencesTerminators);
     note.Rule = noteRule;
 }