Machine Learning versus Deep Learning¶
- Hello. I'm DVM who is talking about Deep Learning versus Machine Learning
- Today, I'm going to talk about Machine Learning about Natural Language Processing
In [1]:
from IPython.display import Image
Image('wordnet.png',height='400',width='400')
Out[1]:
- Most of Nautral Language Processing is made by RNN Deep Learning
- Because It is very powerful and accurate than normal machine learning
- But,today will talk about machine learning which name is wordnet.
- The advantage of word net is faster and more simple than deep learning.
- So many people use word net find the keyword
What's the natural language processing
- Natural language processing make computer understand the word
- It have 3 types such as thesaurus, static method and estimated method.
- Today i will talk about Thesaurus.
Let's download NLTK library¶
In [2]:
!pip install nltk
In [3]:
from nltk.corpus import wordnet
In [4]:
wordnet.synsets('AI')
Out[4]:
The word I want to talk about is "artificial intelligence"¶
In [5]:
_AI = wordnet.synset('artificial_intelligence.n.01')
Let's find the definition of "AI"¶
In [6]:
_AI.definition()
Out[6]:
Let's see what is in AI Group!¶
In [7]:
_AI.lemma_names()
Out[7]:
Let's find parents and children relation ships¶
In [8]:
_AI.hypernym_paths()[0]
Out[8]:
Let's calculate word similarity¶
In [9]:
_CS = wordnet.synset('computer_science.n.01')
_KD = wordnet.synset('knowledge_domain.n.01')
_EG = wordnet.synset('engineering.n.02')
In [10]:
_AI.path_similarity(_CS)
Out[10]:
In [11]:
_AI.path_similarity(_KD)
Out[11]:
In [12]:
_AI.path_similarity(_EG)
Out[12]:
No comments:
Post a Comment