Beispiel #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 RantEngine(IRantVocabulary vocabulary)
 {
     if (vocabulary == null)
     {
         throw new ArgumentNullException("vocabulary");
     }
     _vocabulary = vocabulary;
 }
Beispiel #2
0
        private void LoadVocab(string path, NsfwFilter filter)
        {
            if (_vocabulary != null)
            {
                return;
            }

            if (!String.IsNullOrEmpty(path))
            {
                _vocabulary = RantVocabulary.FromDirectory(path, filter);
            }
        }