Provide a best-guess of a movie/TV quote and get streaming links to the scene.

From a “pre-AI” era, uses a home-rolled fuzzy matching system:

  • Subtitle files are parsed into stemmed n-grams with frequency ranking
  • User request also parsed to stemmed n-grams
  • Levenshtein distance comparison to match user/subtitle n-grams
    • Would have liked one weighted for QWERTY input but don’t think I did that
  • Of the set of highest-n matches, sort by inverse frequency for most unique/likely match
  • Use subtitle metadata to obtain timestamp and other scene info, create streaming link for available services and return to user

This project was a lot of fun… unfortunately it opens up a whole can of worms regarding copyright and such, so it will remain as a personal exercise in learning NLP.

Demo