A factory maintenance desk searches repair notes and needs the adjacent words bearing and seized to stay together, because that pair names a failure neither word names alone. Which representation keeps that short run of tokens intact?
Select an answer to reveal the explanation.
Short Explanation
A two-word warning clipped together is different from two sticky notes that can drift apart. An n-gram keeps bearing and seized side by side as one short run, which is the unit your search needs. The trap is a bag of words, which counts the two tokens and throws their order away.
Full Explanation
An n-gram treats a short sequence of neighboring tokens as a single feature. A two-token n-gram stores bearing seized as one unit, so the search can match the failure named by that pair rather than by either word alone. A bag of words counts the tokens separately and discards order, so the adjacent run is gone. Two words that both appear somewhere in the note, but not side by side, do not form that n-gram. TF-IDF on single words reweights each word by how widely it appears and still represents the note as isolated terms, not as the preserved pair. Stop-word removal deletes common grammar words; bearing and seized are content words that remain separate tokens, and removing other words does not bind them. Exam caveat: an n-gram preserves local order for a chosen short length, and it does not by itself treat distant synonyms as the same meaning. Operational check: inspect the feature list for a note that says bearing seized and confirm the combined run appears as one feature, not only as two independent counts.