Part-of-speech टैगिंग

Python में NLP के लिए Feature Engineering

Rounak Banik

Data Scientist

Applications

  • Word-sense disambiguation
    • "The bear is a majestic animal"
    • "Please bear with me"
  • Sentiment analysis
  • Question answering
  • Fake news और opinion spam का पता लगाना
Python में NLP के लिए Feature Engineering

POS टैगिंग

  • हर शब्द को उसका part of speech असाइन करना.
    "Jane is an amazing guitarist."
    
  • POS Tagging:
    • Janeproper noun
    • isverb
    • andeterminer
    • amazingadjective
    • guitaristnoun
Python में NLP के लिए Feature Engineering

spaCy से POS टैगिंग

import spacy

# Load the en_core_web_sm model
nlp = spacy.load('en_core_web_sm')
# Initiliaze string
string = "Jane is an amazing guitarist"
# Create a Doc object
doc = nlp(string)
Python में NLP के लिए Feature Engineering

spaCy से POS टैगिंग

...
...
# Generate list of tokens and pos tags
pos = [(token.text, token.pos_) for token in doc]
print(pos)
[('Jane', 'PROPN'), 
 ('is', 'VERB'), 
 ('an', 'DET'), 
 ('amazing', 'ADJ'), 
 ('guitarist', 'NOUN')]
Python में NLP के लिए Feature Engineering

spaCy में POS annotations

POS annotations के लिए spaCy डॉक्यूमेंटेशन

Python में NLP के लिए Feature Engineering

अभ्यास करते हैं!

Python में NLP के लिए Feature Engineering

Preparing Video For Download...