STAY WITH US

[Hindi]NLP 21# Parts of Speech Visualization |NLP|Python 3|Natural Language Processing|2019

[Hindi]NLP 21# Parts of Speech Visualization  |NLP|Python 3|Natural Language Processing|2019


Code:

# -*- coding: utf-8 -*-
"""NLP_Ex14.ipynb

Automatically generated by Colaboratory.

"""

import spacy

nlp = spacy.load('en_core_web_sm')

doc = nlp(u"The quick brown fox jumped over the lazy dog's back.")

from spacy import displacy

displacy.render(doc, style='dep',jupyter=True)

options = {'distance':110,'compact':'True','color':'yellow','bg':'#09a3d5','font':'Times'}

displacy.render(doc, style='dep',jupyter=True, options=options)

doc2 = nlp(u'my name is vishwajeet s rana. My YouTube channel name is Knowledge Shelf.')

spans = list(doc2.sents)

displacy.serve(spans, style='dep', options={'distance':110})

YouTube:


Recommended Book:

Post a Comment

0 Comments