示例#1
0
 /// <summary>
 /// Creates a new Engine object with the specified vocabulary.
 /// </summary>
 /// <param name="vocabulary">The vocabulary to load in this instance.</param>
 public Engine(IVocabulary vocabulary)
 {
     if (vocabulary == null) throw new ArgumentNullException("vocabulary");
     _vocabulary = vocabulary;
     _vars = new VarStore();
     _subs = new SubStore();
 }
示例#2
0
 /// <summary>
 /// Creates a new Engine object that loads vocabulary from a path according to the specified filtering option.
 /// </summary>
 /// <param name="vocabularyPath">The path to the dictionary files to load.</param>
 /// <param name="filter">The filtering option to apply when loading the files.</param>
 public Engine(string vocabularyPath, NsfwFilter filter)
 {
     LoadVocab(vocabularyPath, filter);
     _vars = new VarStore();
     _subs = new SubStore();
 }
示例#3
0
 /// <summary>
 /// Creates a new Engine object with no vocabulary.
 /// </summary>
 public Engine()
 {
     LoadVocab("", DefaultNsfwFilter);
     _vars = new VarStore();
     _subs = new SubStore();
 }