{'fraction_non_alphanumeric': 0.02972749793559042, 'fraction_numerical': 0.0, 'mean_word_length': 5.446808510638298, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A transparent selective undo algorithm for collaborative editing

In collaborative editing environments, operations issued by a group of users may be duplicate and undesired. A selective undo mechanism allows collaborative users to undo any of mis-issued operations at any time and has become an indispensable facility for collaborative editing. However, supporting selective undo is a technical challenge. The traditional selective undo approach explicitly modifies the original consistency maintenance mechanism of do operations or presents a new algorithm with integrated do and undo operations. In additional, these do operations and undo operations interfere with each other, which complicates correctness proofs and causes a high time complexity. In this paper, we propose a novel selective undo algorithm T-UNDO (transparent selective undo). T-UNDO can be transparently integrated into the consistency maintenance algorithms of do operations that maintains insertions before deletions in the edit history. Moreover, T-UNDO can achieve correct undo effect. T-UNDO has a linear time complexity of O(|Hi|+log(|Hd|)), where |Hi| is the number of insertions and |Hd| is the number of deletions in the history.