STAY WITH US

[Hindi]NLP 12# Tokenization Part-1 |NLP|Python 3|Natural Language Processing|2019

[Hindi]NLP 12# Tokenization Part-1 |NLP|Python 3|Natural Language Processing|2019

Code:

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

Automatically generated by Colaboratory.

"""

import spacy

nlp = spacy.load("en_core_web_sm")

txt1 = '"We\'re moving to A.P.!"'

print(txt1)

doc = nlp(txt1)

for token in doc:
  print(token.text)

doc2 = nlp("We're here to help! send snail-mail, email knowledgeshelfit@gmail.com or visit us at https://www.knowledgeshelfit.com!")

for t in doc2:
  print(t)

doc3 = nlp("A 5km Mumbai cab ride costs is $10.")

c

doc4 = nlp("Let's visit st. Louis in the U.S. next year.")

for t in doc4:
  print(t)

len(doc4)

doc4.vocab

len(doc4.vocab)

YouTube:

Recommended Book:


Click Me

Post a Comment

0 Comments