Sentdiff: Diff for Writing
github.com
github.com
It would be awesome to visualize wikipedia edits overtime. I don't really care about what the text says, just how blocks of it change over time. I am after the ascetics present in the ever flowing change of data. I think your script might be a good starting point. Think of the videos of a flowers growing, that compress months into a few seconds. Do something similar with wikipedia edits.
It looks at paragraphs, sentences, sub-sentence structures, words. It even draws little sparkgraph-ish diagrams. It is not really that long (250 lines by wc) but it has been a huge time sink for tweaking.
For an example of some heavy editing: http://kmkeen.com/inabow/2009-01-07-11-22-00.html
Any suggestions, thoughts, etc. would be greatly appreciated.
It might sort of drown you (a 15-word sentence totally changed to a different 15-word sentence would take up 30 lines. My default terminal size holds 36 lines.
But really because I never thought of it. Might give it a try and see if it's better.
The original sentence is: "He went to the stoar." Person A sends this to person B for review. While Person B is reviewing this, Person A changes the sentence to "Bill went to the stoar.". Then, Person B sends back the spelling correction; "He went to the store.".
If the sentence translated to one line for `diff` to work on, this would be a merge conflict. If each word was its own line, this would merge cleanly.
i also found dwdiff, which you may like because it is very similar and very unixy http://www.linux.com/feature/114176
def file_with_split_sentences(old)
contents = File.read(old).split_keep_after(/[\.!\?] *[A-Z\n]/, 2)
begin newname = "#{old}-sdiff-#{random_chars 5}"; end while File.exists?(newname)
File.open(newname, "w") { |file| file.write contents.join("\n")}
newname
end
fnames = ARGV[-2..-1].collect{|f| file_with_split_sentences f.chomp}
system "diff #{ARGV[0...-2].join " "} #{fnames.join " "}"
"rm #{fnames.join " "}"Never really looked at the git source code, so I'm not sure how easy it would be to do.
git diff --color-words
(and a pony--I know, why not implement it myself?)