November 1, 200718 yr Hi all, I'm sure I've seen this posted somewhere on FM Forums, but I can't locate it. I'm looking for a way to track changes/edits in a text field. IOW I want to do the following: Sample original text - I sell oranges, plums and peaches. Sample edited text - I sell oranges, [color:red]apples, plums and peaches. [color:red]I also sell pumpkins. Any help is appreciated!
November 1, 200718 yr It's easy to find the point where the edited text BEGINS to depart from the original. It is very difficult (if not impossible) to determine where the edit ends and the text returns to the original. Case in point: Original text = "I sell oranges, plums and peaches." Edited text = "I sell oranges, [color:red]ap[color:red]pl[color:red]es, plums and peaches. I also sell pumpkins."
November 2, 200718 yr Wonderful attitude, Kent! I go on those highs ... and just because they are brief (sometimes only seconds) that doesn't mean they aren't great anyway! :laugh2:
November 4, 200718 yr Hi all I am aware of that problem and it wasn't inside my first CF, but that ( first CF ) wasn't Case sensitive. So "I sell orange" and "i sell orange" was accepted. Another problem is puntaction, like commas and full-stops... I don't know if it is impossible, but I'm trying to solve those problems.
November 4, 200718 yr Hi Kent I think that this is what you need : I'll made another effort to get rid of punctuation so that: Sample original text - I sell oranges and peaches. Sample edited text - I sell oranges, plums and peaches. ... that now writes: I sell [color:red]oranges, plums and peaches. will be corrected to: I sell oranges[color:red], plums and peaches. Compare.zip
November 4, 200718 yr Hi Daniele, I can't understand how you are improving it (see first example) because the breaks all seem the same to me. But I notice that punctuation clearly appears to trip you up (see second example) ... because when you change that comma to a period (to match original text) then it produces a correct result. You are close.
November 4, 200718 yr Hi LaRetta as you can see, "oranges." is different from "oranges,", so the second one becomes red. I just said that there are problems with punctuation... I'm still working on :
November 5, 200718 yr Hi Kent I need to know: what if "original" has words ( and punctuations ) that aren't into "comparison" ? Like: Original: I sell oranges and mellons. Comparison: I sell oranges, plums and peaches. This result is good for you: I sell oranges[color:red], plums and [color:red]peaches. ??
November 5, 200718 yr Author Hi Daniele, Ideally the omitted text would appear in the same position as in the original, but formatted with strike thru style. If that's beyond what you're willing or able to do, you wouldn't hear any complaints out of me if the result shown in the last example were the final result (nor from anyone else on the forums, I'd dare venture). What you've done so far is really impressive. Thanks a bunch for all your help so far.
November 10, 200718 yr Hi Kent I'm still working ( when have some time ) on punctuation, but are you sure that you want something like this ? Edit: please keep this one ( minor bug killed ) Compare2.zip Edited November 10, 200718 yr by Guest New attachment
November 10, 200718 yr Author Hey Daniele, This CF is sweet! Very impressive! I see what you mean with regards to punctuation. Thanks a bunch for all your help! -Kent
November 10, 200718 yr I hate it when you make me be the spoilsport. I don't think the problem is punctuation. It's the underlying logic. FWIW, when you track changes in a word processor, you get two different results when you (a) edit a word, or ( delete the word and retype it correctly. To do this, the program has to keep track of actual keystrokes. Without this information, you are forced to guess. Compare2.fp7.zip
November 11, 200718 yr It's the underlying logic. So I changed the underlying logic. Now it's all OK but: original = one two comparison = two one gives NO errors. Compare3.zip
November 11, 200718 yr You have other problems as well. Compare for example "one two one" with "zero two one". I don't think the logic has changed much - it seems to me you are only shifting the error to another place. Even if you change the logic dramatically, I believe there always will be a way to show it breaking - because IMHO it cannot be done, at least not without making some assumptions - which by necessity will not always be true.
November 11, 200718 yr Author At least I had tried Hey Daniele, It was a great effort on your part and I truly appreciate your gumption and perseverance. Thanks! -Kent
November 11, 200718 yr Author I hate it when you make me be the spoilsport. Hey Michael, I'm at a loss for words on that one! -Kent
November 11, 200718 yr I'm not sure what you mean - perhaps finding a word or two would help to clarify?
Create an account or sign in to comment