repost: https://blog.darknedgy.net/technology/2020/05/02/0/index.htm...
original: https://blog.darknedgy.net/technology/2020/05/02/0/
repost: https://blog.darknedgy.net/technology/2020/05/02/0/index.htm...
original: https://blog.darknedgy.net/technology/2020/05/02/0/
First, the URLs are perfectly identical minus the filename. You could compare paths, minus query string and filename, and that would give you a rough score of likely similarity for further checking. There would be false positives for sites that use the query string as part of their navigation the way HN does.
Then, you could test the social media meta tags (particularly title and author, if it's there), and a hash of the body text (normalized, all lowercase, etc.) for similarity to other possibly similar submissions.
Dupes could be automatically marked as such or flagged for review.
The kind of approach you're describing (compare paths, minus this and that, get a rough score for similarity checking, then a miracle occurs, then you can detect duplicates properly) is a recipe for sinking in the quicksand of corner cases, of which the web has an endless supply. Sorry for being ill-tempered! I don't mean to pick on your response. It's just that we've tried many things in the past. The people who make belittling comments about duplicate detection (not you, the GP) appear to have no idea how difficult it is to get it right, even when you're not dev-resource-constrained as we are.
We also spent months, years ago, working on trying to identify duplicate content on some fingerprinting basis. There was even the fantasy that you could identify two articles that weren't duplicates but were about the same story. This is a research-level problem.
Any real solution here would not be algorithmic, but would rather involve better support for users to supply human curation, e.g. by reporting duplicates that the system missed.
Edit: I see that I've reiterated what majewsky already said, just in a crappier mood.