コード例 #1
0
 public StringSequenceAnnotationPattern(Type textKey, IDictionary <IList <string>, object> targets, bool ignoreCase)
 {
     this.textKey = textKey;
     phraseTable  = new PhraseTable(false, ignoreCase, false);
     foreach (IList <string> target in targets.Keys)
     {
         phraseTable.AddPhrase(target, null, targets[target]);
         if (maxNodes < 0 || target.Count > maxNodes)
         {
             maxNodes = target.Count;
         }
     }
 }
コード例 #2
0
 public StringSequenceAnnotationPattern(Type textKey, ICollection <IList <string> > targets, bool ignoreCase)
 {
     this.textKey = textKey;
     phraseTable  = new PhraseTable(false, ignoreCase, false);
     foreach (IList <string> target in targets)
     {
         phraseTable.AddPhrase(target);
         if (maxNodes < 0 || target.Count > maxNodes)
         {
             maxNodes = target.Count;
         }
     }
 }