You are on page 1of 5

Name

ID no
Programme B.tech Electronics
Engineering, Semester
- VIII
Subject Code R4EC4123P
Date of Experiment
Date of Submission
Faculty Name Dr. Karuna Bhalerao
Shivankit 191060068
Group Members Rajat Bhoir 191060055
Vignesh Ramasubramaniam
191060074
Kunal Tawde 191060041
Jatin Salve 191060059
Experiment 2
Title: Syntax Modeling for Words

Aim: To implement syntax modeling for words

Theory:

Syntax modeling in natural language processing (NLP) is the process of analyzing


and modeling the grammatical structure of sentences in a language. The goal of
syntax modeling is to capture the relationships between the words in a sentence and
their syntactic roles, such as subject, verb, object, etc.

Here's an example of syntax modeling in NLP:

Consider the following sentence:

The cat sat on the mat.

In this sentence, we can identify the subject "cat", the verb "sat", and the object
"mat". We can also identify that "the" and "on" are prepositions that link the subject
and object.

One way to model this sentence's syntax is by using a parse tree, which represents
the sentence's structure as a hierarchical tree.
Example:
The syntax tree for the sentence given below is as follows:
I drive a car to my college.

Code:
Output:
Conclusion:

You might also like