Semantic Processing

Semantic Processing - Natural Language Processing

Syntactic processing - the study of grammar to understand the meaning of sentences.

Semantic Processing - understanding the sentence without the need for grammar, making machines understand the intent of sentences, the meaning of ambiguous words, dealing with synonyms, detecting sarcasm, etc.

Introduction to Knowledge Graphs

text data is aggregated on the graph-based data structure where entities are related in some sense representing nodes. Edge represents Semantic relation. 



Different types of Knowledge graphs are as follows:

1. WordNet: this is a lexical database of semantic relations between words. it is developed by Princeton University
    * Nouns, verbs, adjectives, and adverbs of a particular word are grouped.
    * Each sense contains a glossary and example sentences.
    http://wordnetweb.princeton.edu/perl/webwn
2. ConceptNet: This is a freely available semantic network that is designed to help computers understand the meanings of words that people use. It is developed by MIT.


RELATIONS BETWEEN SENSES:

* Hypernm: Relation between concepts and their superordinates.
    E.G., Fruit is hypernym of mango
* Hyponyms: Relation between a concept and its subordinate.
    E.G., Apple is a hyponym of fruit
* Holonym: Relation between a whole and its parts.
    E.G., Face is a holonym of eyes
* Meronym: Relation between a part and its whole.
    E.G., the Engine is a menonym of car

Packages required for wordnet:

!pip install nltk
from nltk import download
download('wordnet')
from nltk.corpus import wordnet

#Synsets
tractor = wordnet.synset('tractor') #synset will give all the graph present in wordset

#Definition of senses
[sys.definition() for sys in tractor]

#hypernyms 
tractor =  wordnet.synset('tractor.n.01')
tractor.hypernyms()

#meronyms
wheeled_vehicle = wordnet.synset('wheeled_vehicle.n.01')
wheel_vehicle.part_meronyms()

Comments

Popular posts from this blog

Domain Check Tool

Docker

Unlocking the Secrets of Natural Language Processing: How AI Is Changing Communication