शुरू करेंमुफ़्त में शुरू करें

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.____(____))
कोड संपादित करें और चलाएँ