Session Ready
Exercise

Comparing similarities

In this exercise, you'll be using spaCy's similarity methods to compare Doc, Token and Span objects and get similarity scores. The medium English model is already available as the nlp object.

Instructions 1/3
undefined XP
  • 1
    • Use the doc.similarity method to compare doc1 to doc2 and print the result.
    • 2
      • Use the token.similarity method to compare token1 to token2 and print the result.
    • 3
      • Create spans for "great restaurant"/"really nice bar".
      • Use span.similarity to compare them and print the result.