Kent Searight Posted November 1, 2007 Posted November 1, 2007 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!
comment Posted November 1, 2007 Posted November 1, 2007 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."
Kent Searight Posted November 2, 2007 Author Posted November 2, 2007 Very impressive! Thanks, Daniele.
Kent Searight Posted November 2, 2007 Author Posted November 2, 2007 It was fun while it lasted though.
LaRetta Posted November 2, 2007 Posted November 2, 2007 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:
Raybaudi Posted November 4, 2007 Posted November 4, 2007 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.
Raybaudi Posted November 4, 2007 Posted November 4, 2007 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
LaRetta Posted November 4, 2007 Posted November 4, 2007 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.
Raybaudi Posted November 4, 2007 Posted November 4, 2007 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 :
Raybaudi Posted November 5, 2007 Posted November 5, 2007 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. ??
Kent Searight Posted November 5, 2007 Author Posted November 5, 2007 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.
Raybaudi Posted November 10, 2007 Posted November 10, 2007 (edited) 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, 2007 by Guest New attachment
Kent Searight Posted November 10, 2007 Author Posted November 10, 2007 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
comment Posted November 10, 2007 Posted November 10, 2007 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
Raybaudi Posted November 11, 2007 Posted November 11, 2007 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
comment Posted November 11, 2007 Posted November 11, 2007 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.
Kent Searight Posted November 11, 2007 Author Posted November 11, 2007 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
Kent Searight Posted November 11, 2007 Author Posted November 11, 2007 I hate it when you make me be the spoilsport. Hey Michael, I'm at a loss for words on that one! -Kent
comment Posted November 11, 2007 Posted November 11, 2007 I'm not sure what you mean - perhaps finding a word or two would help to clarify?
Kent Searight Posted November 11, 2007 Author Posted November 11, 2007 If( not Count ( words ) ; 0 ; words ) :)
Recommended Posts
This topic is 6282 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now