
Wanted: locating positions in edited text files
I am looking for an algorithm or even just a strategy for describing
locations in a text file in a manner that will be relatively immune to
editing changes made later to the file. I am doing an analysis of a file
that may be undergoing later editing and want to be able to map annotations
made to the original file onto the edited version of the file. I realize
that there is no general, "perfect" solution to this problem, but there are
many common cases that should be handleable. The desired characteristics of
such an algorithm are, in descending order of importance:
o high probability of mapping the old location to "the" new location
o some sort of characterization of the "quality" of the mapping (i.e., how
likely is it to be "correct"?)
o good "decay" characteristics vs. amount of editing done to the file
o time to do the mapping is fairly small, especially if a number of
locations in the same file need to be mapped all at once
o space required for any auxiliary data structures is reasonable
My company is willing to pay for concrete information or source code, so
even if you have a proprietary solution to this problem we can still talk.
In addition to any news replies I would appreciate e-mail replies. Thanks.
Roger Scott
PROCASE Corp.