Exemple #1
0
        public static IKnowledgeBase FromInput(StreamReader input)
        {
            var kb = new KnowledgeBase();

            while (!input.EndOfStream)
            {
                var line = input.ReadLine();
                if (string.IsNullOrEmpty(line))
                {
                    continue;
                }

                var clause = ClauseFromLine(line);

                kb.AddClause(clause);
            }

            return(kb);
        }