NLP फीचर इंजीनियरिंग परिचय

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

Rounak Banik

Data Scientist

सांख्यिकीय डेटा

Iris डेटासेट

sepal length sepal width petal length petal width class
6.3 2.9 5.6 1.8 Iris-virginica
4.9 3.0 1.4 0.2 Iris-setosa
5.6 2.9 3.6 1.3 Iris-versicolor
6.0 2.7 5.1 1.6 Iris-versicolor
7.2 3.6 6.1 2.5 Iris-virginica
Python में NLP के लिए Feature Engineering

वन-हॉट एनकोडिंग

sex
female
male
female
male
female
...
Python में NLP के लिए Feature Engineering

वन-हॉट एनकोडिंग

sex one-hot encoding
female
male
female
male
female
... ...
Python में NLP के लिए Feature Engineering

वन-हॉट एनकोडिंग

sex one-hot encoding sex_female sex_male
female 1 0
male 0 1
female 1 0
male 0 1
female 1 0
... ... ... ...
Python में NLP के लिए Feature Engineering

pandas के साथ वन-हॉट एनकोडिंग

# Import the pandas library
import pandas as pd

# Perform one-hot encoding on the 'sex' feature of df df = pd.get_dummies(df, columns=['sex'])
Python में NLP के लिए Feature Engineering

टेक्स्ट डेटा

Movie Review डेटासेट

review class
This movie is for dog lovers. A very poignant... positive
The movie is forgettable. The plot lacked... negative
A truly amazing movie about dogs. A gripping... positive
Python में NLP के लिए Feature Engineering

टेक्स्ट प्री-प्रोसेसिंग

  • लोअरकेस में बदलना
    • उदाहरण: Reduction से reduction
  • बेस-फॉर्म में बदलना
    • उदाहरण: reduction से reduce
Python में NLP के लिए Feature Engineering

वेक्टराइज़ेशन

review class
This movie is for dog lovers. A very poignant... positive
The movie is forgettable. The plot lacked... negative
A truly amazing movie about dogs. A gripping... positive
Python में NLP के लिए Feature Engineering

वेक्टराइज़ेशन

0 1 2 ... n class
0.03 0.71 0.00 ... 0.22 positive
0.45 0.00 0.03 ... 0.19 negative
0.14 0.18 0.00 ... 0.45 positive
Python में NLP के लिए Feature Engineering

बेसिक फीचर्स

  • शब्दों की संख्या
  • अक्षरों की संख्या
  • औसत शब्द-लंबाई
  • ट्वीट्स

Silverado Records का ट्वीट

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

POS टैगिंग

Word POS
I Pronoun
have Verb
a Article
dog Noun
Python में NLP के लिए Feature Engineering

नेम्ड एंटिटी रिकग्निशन

  • क्या noun व्यक्ति, संगठन या देश दर्शाता है?

एक व्यक्ति, एक देश का झंडा और TED का लोगो

Noun NER
Brian Person
DataCamp Organization
Python में NLP के लिए Feature Engineering

कवर किए गए कॉन्सेप्ट

  • टेक्स्ट प्री-प्रोसेसिंग
  • बेसिक फीचर्स
  • वर्ड फीचर्स
  • वेक्टराइज़ेशन
Python में NLP के लिए Feature Engineering

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

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

Preparing Video For Download...