A class to help transform a generic grammar into a CNF grammar
Example #1
0
        /// <summary>
        /// Returns a new grammar that is the CNF equivalent of this grammar.
        /// WARNING: currently this does not always preserve probabilities!
        /// </summary>
        public CNFGrammar ToCNF()
        {
            var conv = new CFGtoCNF(this);

            return(conv.Convert());
        }
Example #2
0
		/// <summary>
		/// Returns a new grammar that is the CNF equivalent of this grammar.
		/// WARNING: currently this does not always preserve probabilities!
		/// </summary>
		public CNFGrammar ToCNF() {
			var conv = new CFGtoCNF(this);
			return conv.Convert();
		}