Pink Floyd गानों की similarity निकालना
इस अंतिम अभ्यास में, आपको ब्रिटिश बैंड Pink Floyd के तीन गानों के बोल दिए गए हैं: 'High Hopes', 'Hey You' और 'Mother'. इन गानों के बोल क्रमशः hopes, hey और mother के रूप में उपलब्ध हैं.
आपका कार्य mother और hopes, तथा mother और hey के बीच पेयरवाइज़ similarity की गणना करना है.
यह अभ्यास पाठ्यक्रम का हिस्सा है
Python में NLP के लिए Feature Engineering
अभ्यास निर्देश
mother,hopesऔरheyके लिएDocऑब्जेक्ट बनाएँ.motherऔरhopesके बीच similarity की गणना करें.motherऔरheyके बीच similarity की गणना करें.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
# Create Doc objects
mother_doc = nlp(____)
hopes_doc = nlp(____)
hey_doc = nlp(hey)
# Print similarity between mother and hopes
print(mother_doc.____(hopes_doc))
# Print similarity between mother and hey
print(mother_doc.____(____))