The general scenario is that an StText is being edited and we wish to preserve as much as possible of the analysis: that is its segments, their translations and notes, and the analyses that have been assigned to the words of the paragraph. For example if the user makes a small change to one word we do not want to lose all the analysis that the user has already done on the rest of the paragraph. 1) Any segment whose text is unaffected by edits should be unmodified in every other way, except that its begin offset should be adjusted if text has been inserted or deleted before it. 2) If two segments are combined (eg. period removed): we want to concatenate their free translations, and keep all their notes as separate notes. 3) If a segment is split into two segments: We will keep the free translations, literal translations and notes on the first new segment. Enhance JohnT: Would it be better to put them on both segments or on the longer one? 4) If the text of a particular wordform has not changed then it should still have the same analysis. 5) It is particularly important that if the paragraph has a valid analysis beforehand, then it still should after edits. More specific notes on how translations and notes are handled: a. translations and notes are discarded for any original segment that is completely destroyed, that is, it is entirely within the range of characters deleted. b. translations and notes are preserved somewhere for any segment (there can be at most two) which overlaps the range deleted, that is, any segment which at least partly survives. c. material from the first of the partly preserved segments goes to the first of the resulting new segments, and from the second (last) partly preserved segment goes to the last of the resulting new segments. e.g. if we delete the material between the slashes in the following five segments, and insert two complete sentences A and B, we get the following segments and free translations ----0---- ---1a---/---1b--- ----2---- --3a--/--3b-- ---4---- TN0 TN1 TN2 TN3 TN4 ----0---- ---1a---/---A--- ----B---- --3b-- ---4---- TN0 TN1 TN3 TN4 d. If there is only one new segment and more than one partly surviving segment, we concatenate translations, and concatenate lists of notes (not the contents of the notes). e. If all the characters in the paragraph 'changed' but actually remained identical then the users would prefer that the analysis stick around (LT-12403) so we'll pretend it didn't change for adjustment purposes.