A weighted context-free grammar (WCFG) is a more general category of context-free grammar, where each production has a numeric weight associated with it. The weight of a specific parse tree in a WCFG is the product[12] (or sum[13] ) of all rule weights in the tree. Each rule weight is included as often as the rule is used in the tree.