Implement find_near_duplicates(texts, threshold=0.8): return every pair of texts whose TF-IDF cosine similarity over character n-grams is at least threshold.
n has no n-grams of that length).tf[i, v]: raw count of n-gram v in text i.df[v] is the number of texts containing v (natural log, no sublinear TF).tfidf = tf * idf, then L2-normalize each row (an all-zero row stays zero).i < j; keep pairs with similarity >= threshold.Return a list of (i, j, sim) tuples sorted by (i, j), sim rounded to 4 decimals. Return [] if there are fewer than two texts.