Explain syntax and semantic analysis of NLP in detail.


Syntax analysis:
    ·         It is also known as Parsing.

·     It is the step in NLP where the input utterance is being checked to ensure that its syntax is correct, and the structured representations of the possible parses are generated.

    ·         A grammar is used to determine what sentences are legal.

    ·         The grammar is applied using a parsing algorithm to produce a structure representation or a parse tree.

    ·         Ex.:




Semantic analysis:

·         Once the grammatical correctness of the sentence is 
checked, the next step is to extract the meaning of the sentence.

   ·         We use First Order Logic (FOL) as the language for AI agent.

   ·         Thus, semantic interpretation is the process of associating an FOL expression with a phrase.

   ·         We can represent the semantic by augmenting the rule by adding an argument to each constituent.

   ·         This argument represents the semantic of the expression.

   ·         Ex.: Consider a rule which describes grid locations – NP à Digit Digit.


This rule would be augmented as 

   follows– 

         NP ([x, y]) à Digit (x) Digit(y)

No comments:

Post a Comment