예제 #1
0
        public Sentence BuildResponse(string[] message)
        {
            if (message == null)
            {
                throw new ArgumentNullException("message");
            }

            if (Filter)
            {
                return(InternalResponse(MarkovTools.Filter(message)));
            }
            else
            {
                return(InternalResponse(message));
            }
        }
예제 #2
0
        public void Add(string[] sentence, string source)
        {
            if (sentence == null)
            {
                throw new ArgumentNullException("sentence");
            }

            if (Filter)
            {
                InternalAdd(MarkovTools.Filter(sentence), source);
            }
            else
            {
                InternalAdd(sentence, source);
            }
        }
예제 #3
0
        public void Remove(string[] sentence)
        {
            if (sentence == null)
            {
                throw new ArgumentNullException("sentence");
            }

            if (Filter)
            {
                brain.RemoveSentence(MarkovTools.Filter(sentence));
            }
            else
            {
                brain.RemoveSentence(sentence);
            }
        }