logical.ProposedLinktypeno test imports ittype ProposedLink = { readonly link: Link; readonly state: "proposed"; readonly score: number };A link of kind same as that a person confirms, with how alike the two are.
Likely duplicates (0037-planning FR-019): a similarity of the titles, bodies and places of two counted items (the overlap of their lower-cased words, with a share for the same place), and for each pair at or above the threshold a proposed link of kind same as, with its score. The same items and threshold give the same proposals in the same order, and nothing is merged, closed or hidden.
import { similarity } from "./duplicates.ts";
similarity("fix the login page", "fix login page now"); // 0.6logical.ProposedLinktypeno test imports ittype ProposedLink = { readonly link: Link; readonly state: "proposed"; readonly score: number };A link of kind same as that a person confirms, with how alike the two are.
logical.similarityfunctionno test imports itfunction similarity(a: string, b: string): numberThe overlap of the words of two texts: the shared words over the words of either, from 0 to 1.
logical.scoreOffunctionno test imports itfunction scoreOf(a: Item, b: Item, placesOf?: (id: ItemId) => readonly string[]): numberThe score of two items: the title counts most, the body and the places they were seen in count too.
logical.findDuplicatesfunctionno test imports itfunction findDuplicates(items: readonly Item[], threshold: number, placesOf?: ((id: ItemId) => readonly string[]) | undefined): readonly ProposedLink[]The proposed links of kind same as between the counted items that are alike at or above the threshold, best first and then by id, for items not already linked as the same.
ProposedLinktypeno test imports ittype ProposedLink = { readonly link: Link; readonly state: "proposed"; readonly score: number };A link of kind same as that a person confirms, with how alike the two are.
similarityfunctionno test imports itfunction similarity(a: string, b: string): numberThe overlap of the words of two texts: the shared words over the words of either, from 0 to 1.
scoreOffunctionno test imports itfunction scoreOf(a: Item, b: Item, placesOf?: (id: ItemId) => readonly string[]): numberThe score of two items: the title counts most, the body and the places they were seen in count too.
findDuplicatesfunctionno test imports itfunction findDuplicates(items: readonly Item[], threshold: number, placesOf?: ((id: ItemId) => readonly string[]) | undefined): readonly ProposedLink[]The proposed links of kind same as between the counted items that are alike at or above the threshold, best first and then by id, for items not already linked as the same.