To overcome these obstacles we restrict attention to structurally unambiguous CFGs (SUCFGs) and their weighted/probabilistic versions (SUWCFGs/SUPCFGs).
A context-free grammar is termed ambiguous if there exists more than one derivation tree for the same word.
We term a CFG structurally ambiguous if there exists more than one
derivation tree with the same structure for the same word.
A context-free language is termed inherently ambiguous if it cannot be derived by an unambiguous CFG.
Note that a CFG which is unambiguous is also structurally unambiguous, while the other direction is not necessarily true.
For instance,
the language \(\lbrace a^n b^n c^md^m~|~ n\ge 1, m\ge 1\rbrace \cup \lbrace a^n b^m c^md^n~|~ n\ge 1,m\ge 1\rbrace \)  which is inherently ambiguous [1]} is not inherently structurally ambiguous.
Therefore
we have relaxed the classical unambiguity requirement.
