Pink Floyd 노래 유사도 계산하기
마지막 연습 문제에서는 영국 밴드 Pink Floyd의 세 곡, 'High Hopes', 'Hey You', 'Mother'의 가사가 주어졌습니다. 각 가사는 각각 hopes, hey, mother로 제공됩니다.
여러분의 과제는 mother와 hopes, 그리고 mother와 hey 사이의 쌍별 유사도를 계산하는 것입니다.
이 연습은 강의의 일부입니다
Python으로 배우는 NLP 피처 엔지니어링
연습 안내
mother,hopes,hey에 대한Doc객체를 만드세요.mother와hopes의 유사도를 계산하세요.mother와hey의 유사도를 계산하세요.
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
# 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.____(____))