ComenzarEmpieza gratis

Calcular la similitud de canciones de Pink Floyd

En este ejercicio final, tienes las letras de tres canciones de la banda británica Pink Floyd: "High Hopes", "Hey You" y "Mother". Las letras están disponibles como hopes, hey y mother, respectivamente.

Tu tarea es calcular la similitud por pares entre mother y hopes, y entre mother y hey.

Este ejercicio forma parte del curso

Ingeniería de características para NLP en Python

Ver curso

Instrucciones del ejercicio

  • Crea objetos Doc para mother, hopes y hey.
  • Calcula la similitud entre mother y hopes.
  • Calcula la similitud entre mother y hey.

Ejercicio interactivo práctico

Prueba este ejercicio y completa el código de muestra.

# 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.____(____))
Editar y ejecutar código