/// <summary> /// Creates a new Engine object with the specified vocabulary. /// </summary> /// <param name="dictionary">The vocabulary to load in this instance.</param> public RantEngine(IRantDictionary dictionary) { if (dictionary == null) { throw new ArgumentNullException("dictionary"); } _dictionary = dictionary; }
private void LoadVocab(string path, NsfwFilter filter) { if (_dictionary != null) { return; } if (!String.IsNullOrEmpty(path)) { _dictionary = RantDictionary.FromDirectory(path, filter); } }