KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
You may have noticed that we now show an edit summary on Community Wiki posts: community wiki 220 revisions, 48 users I'd like to also show the user who "most owns" the final content displayed on the page, as a percentage of the remaining text: community wiki 220 revisions, 48 users kronoz 87% Yes, there could be top (n) "owners", but for now I want the top 1. Assume you have this data structure, a list of user/text pairs ordered chronologically by the time of the post: User Id Post-Text ------- --------- 12 The quick brown fox jumps over the lazy dog. 27 The quick brown fox jumps, sometimes. 30 I always see the speedy brown fox jumping over the lazy dog. Which of these users most "owns" the final text? I'm looking for a reasonable algorithm -- it can be an approximation, it doesn't have to be perfect -- to determine the owner. Ideally expressed as a percentage score. Note that we need to factor in edits, deletions, and insertions, so the final result feels reasonable and right. You can use any stackoverflow post with a decent revision history (not just retagging, but frequent post body changes) as a test corpus. Here's a good one, with 15 revisions from 14 different authors. Who is the "owner"? https://stackoverflow.com/revisions/327973/list Click "view source" to get the raw text of each revision. I should warn you that a pure algorithmic solution might end up being a form of the Longest Common Substring Problem . But as I mentioned, approximations and estimates are fine too if they work well. Solutions in any language are welcome , bu
Tags (comma-separated)
Save Edits
Cancel