Algorithm · Apple · Medium
Task In an Apple Machine Learning Engineer phone-screen exercise, build a small text-similarity search engine from scratch using only Python's standard library. Do not use scikit-learn or vectorizer libraries. The required baseline uses plain bag-of-words term counts. The search pipeline must tokenize text, derive a vocabulary from the corpus, convert the query and documents into count vectors, calculate cosine similarity, rank the documents, and return the best matches. 1.…
Checking your access…