creator-editing-studio 1.2.2 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -186,9 +186,9 @@ const lcs = (a, b) => {
|
|
|
186
186
|
const similarity = (a, b) => {
|
|
187
187
|
if (!a.keys.length || !b.keys.length) return 0;
|
|
188
188
|
const shorter = Math.min(a.keys.length, b.keys.length);
|
|
189
|
-
// Short units match each other on function words alone
|
|
190
|
-
//
|
|
191
|
-
//
|
|
189
|
+
// Short units match each other on function words alone: two four-word lines sharing "give it"
|
|
190
|
+
// score 0.5 without meaning anything. Below five words there is not enough signal to call
|
|
191
|
+
// something a retake.
|
|
192
192
|
if (shorter < 5) return 0;
|
|
193
193
|
const overlap = lcs(a.keys, b.keys);
|
|
194
194
|
// And the overlap has to be real words, not two articles and a pronoun.
|
|
@@ -205,8 +205,8 @@ const groups = [];
|
|
|
205
205
|
* Grouping is against a representative, never transitive.
|
|
206
206
|
*
|
|
207
207
|
* Chaining members together — A matches B, B matches C, so group them all — merges passages that
|
|
208
|
-
* have nothing to do with each other as soon as one ambiguous unit sits between them
|
|
209
|
-
*
|
|
208
|
+
* have nothing to do with each other as soon as one ambiguous unit sits between them — two
|
|
209
|
+
* unrelated sentences end up in a single group because each matched the same middle one. A unit
|
|
210
210
|
* joins a group only if it is similar to that group's FIRST member, which keeps a group to one
|
|
211
211
|
* thought said more than once.
|
|
212
212
|
*/
|