Parsing in NLP is the process of determining the syntactic structure of a text. It works by analyzing the text constituent words and it bases itself on the underlying grammar of the specific language in which the text has been written. The outcome of parsing is a parse tree of each sentence part of the input text. A parse tree is an ordered, rooted tree that represents the syntactic structure of a sentence according to some context-free grammar (a set of rules that describe all the possible strings in a given formal language). Let's make an example. Consider the English language and the following example grammar:
sentence -> noun-phrase, verb-phrase
noun-phrase -> proper-noun
noun-phrase -> determiner, noun
verb-phrase -> verb, noun-phrase
Consider the phrase Guglielmo wrote a book and apply the parsing process to it. The output would be a parse tree like this:
Currently, the approaches to automated machine-based parsing are statistical, probabilistic, or ML.