Now let's focus on NLU, and to understand it, first we need to understand context-free grammar (CFG) and how it is used in NLU.
Context-free grammar is defined by its four main components. Those four components are shown in this symbolic representation of CFG:
- A set of non-terminal symbols, N
- A set of terminal symbols, T
- A start symbol, S, which is a non-terminal symbol
- A set of rules called production rules P, for generating sentences
Let's take an example to get better understanding of the context-free grammar terminology:
X ->
Here, X-> is called the phrase structure rule or production rule, P. X ε N means X belongs to non-terminal symbol; ε {N or T} means belongs to either terminal symbols or non-terminal symbols. X can be rewritten in the form of . The rule tells you which element can be rewritten to generate...