Jovian
⭐️
Sign In
In [39]:
import jovian
In [1]:
#Sentimental analysis using python
In [3]:
from textblob import TextBlob
import nltk
from newspaper import Article
In [27]:
url='https://towardsdatascience.com/understanding-cv-how-ai-sees-our-world-a977b90bf612'
In [28]:
article=Article(url)
In [29]:
#doing some nlp
article.download()
In [30]:
article.parse()
In [31]:
nltk.download('punkt')
[nltk_data] Downloading package punkt to [nltk_data] C:\Users\poorna\AppData\Roaming\nltk_data... [nltk_data] Package punkt is already up-to-date!
Out[31]:
True
In [32]:
article.nlp()
In [33]:
#get the summary 
text=article.summary

In [34]:
print(text)
Yann LeCun, famous for his work on the convolutional neural networks, applied back-propagation to the convolutional neural networks in 1989. Alex Krizhevsky, along with his AlexNet, won the ImageNet competition on September 30, demonstrated the superior performance of approaches based on convolutional neural networks. Advancing to Deep Learning: Convolutional Neural Networks & Residual Neural Networks“No one tells a child how to see, especially in the early years. Convolutional LayerConvolutional Layer (3x3)Convolutional Layer usually appears as the first layer of a Convolutional Neural Network. Neural Networks Makes Judgements Based on Textures, Image from Original PaperThe neural networks are also vulnerable to high-frequency disturbances.
In [35]:
obj=TextBlob(text)
In [36]:
sentiment=obj.sentiment.polarity
In [37]:
print(sentiment)
0.13055555555555556
In [40]:
if sentiment==0:
    print('The text is neutal')
elif sentiment>0:
    print("The text is positive")
else:
    print("The text is negative")
    
    
The text is positive
In [ ]:
jovian.commit()
[jovian] Saving notebook..
In [ ]: