Before embeddings, and still underneath most search, text is counted rather than understood. N-grams are the smallest useful unit of that.
Write ngram_counts(text, n, top_k) returning a list of (ngram, count) pairs.
n consecutive tokens, joined with a single spacetop_kThe tie-break is not decoration. Without it the same input returns different results on different runs, and a ranking nobody can reproduce is a ranking nobody can debug.
Build the architecture on a canvas: place the components, configure them, connect them into a data flow, and write a short reason for each one. The AI reviewer grades your design against a rubric written specifically for this problem.
Minimum 5 components · needs a wide desktop screen