Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-REVIEW-107

A slightly changed quote is followed by a bounded fuzzy search

When a review thread quote has no exact copy, the extension SHALL move the thread to the one place of the document that differs from the quote by at most 20 percent of its length and agrees on numbers and negation words, searching only around the rarest word of the quote within a fixed cost bound, and orphan the thread when there is no such place or the places are ambiguous.

Part of StRS-MDOKFSTUDIO-REVIEW-001, outside the paths drawn on its map.

Another outcome at step 1 of path 1 in StRS-MDOKFSTUDIO-REVIEW-008, in the state “The text of a document with review threads changes”.

Scenarios 8

The situations the tests check; open one to read it.

nominalSmall edit
Givena quote "the scheduler retries the failed upload twice" and the sentence now reading "uploads"
Whenthe thread is checked
Thenthe thread moves to the line of the sentence
boundaryLarge edit
Givena sentence that differs by more than 20 percent
Whenthe thread is checked
Thenthe thread is orphaned
boundaryWhere the fuzzy search gives up
InputOutcome
A quote whose words are all gone from the documentThere is no candidate and the thread is orphaned
A quote whose rarest word occurs more than 20 timesNo fuzzy search is made for it
A short quote of under 12 characters with no exact copyNo fuzzy search is made
A text of over 2 million charactersThe fuzzy search is skipped
refusalNumbers and negation words must agree
InputOutcome
The quote "You should enable the cache" and the sentence "You should not enable the cache"The thread is orphaned
The quote with 300 and the sentence with 30The thread is orphaned

The negation words are not, no, never, without, cannot, nor, none, ne, pas, non and words ending in n't. Numbers and these words must be the same in the quote and in the match.

refusalAmbiguous fuzzy matches
Giventwo sentences each one letter away from the quote, both more than 50 lines from the old lines
Whenthe thread is checked
Thenthe thread is orphaned, because the decision used for exact copies (surroundings, the 50 line window, a strictly nearest place) picks none
nominalSingle fuzzy match
Givenonly one such sentence
Whenthe thread is checked
Thenthe thread moves to it
boundaryLarge document
Givena document of 20 000 lines and 200 threads without exact copies
Whenthe threads are checked
Thenthe work ends in under 5 seconds and no thread is lost
boundaryBudget exhausted
Givena budget of 20 million edit distance cells already used up by earlier threads
Whena further thread needs a fuzzy search
Thenno fuzzy match is made for it, so it is orphaned unless an exact place or its resembling old lines keep it

Implemented in 1

Tested by 1