This is one of the methods mentioned in the article. I don't have implementation experience with the other string distance measures in the article (under "normalized string" in the table), except for Q-grams. Compared to the above method Q-grams don't scale as well and are not as robust because it doesn't encapsulate an understanding of the semantics of the text.
[1] github.com/facebookresearch/faiss
[2] github.com/google-research/google-research/tree/master/scann
[3] www.pinecone.io
In the structural-comparison case, I imagine you might have better luck with just doing cosine similarity across the term frequency vector or some such, possibly doing random projection first to reduce dimensionality.
Or really, an LSH would do the trick.
- https://dzone.com/articles/build-a-plagiarism-checker-using-...
We used something similar to build a “similar articles” feature & it gave us de-duplication essentially for free.