در مجموعهٔ راهنماهای یک سامانهٔ جست‌وجو، ممکن است چند سند بخشی از ویژگی‌های مشترک داشته باشند. اگر هر زوجِ نزدیک را به هم وصل کنیم و سپس گروه‌های متصل را بسازیم، آیا همهٔ اعضای هر گروه واقعاً شبیه یکدیگرند؟ یک مثالِ سه‌سندی نشان می‌دهد پاسخ منفی است. این درس جاکاردِ دقیق و Union–Find را روی مجموعه‌های ساختگی اجرا می‌کند تا تفاوتِ «وجودِ مسیر» با «شباهتِ مستقیمِ همهٔ زوج‌ها» روشن شود.

۱. شباهتِ مجموعه را از برابریِ سند جدا کنیم

کارت‌های جداگانه با محفظه‌های ویژگی، بدون استخراجِ متن یا پاک‌کردنِ سند.
تصویر مفهومی: کارت‌های جداگانه با محفظه‌های ویژگی، بدون استخراجِ متن یا پاک‌کردنِ سند.؛ بدون مقیاس عددی و مستقل از نتایج اجرای کد.

ورودیِ ما متن نیست. هر رکورد، شناسه‌ای عددی و مجموعه‌ای ناتهی از شناسه‌های ویژگی دارد. ویژگی‌ها از قبل داده شده‌اند؛ هیچ جداسازیِ واژه، شینگل‌سازی، نرمال‌سازیِ فارسی یا مدلِ معنایی اجرا نمی‌شود. اعدادِ ویژگی تنها برچسب‌اند و اندازه، رتبه یا واحدِ فیزیکی ندارند. بنابراین نتیجه دربارهٔ همین مجموعه‌هاست، نه میزانِ درستی یا اهمیتِ محتوای یک راهنمای واقعی.

برای دو مجموعهٔ ناتهی، جاکارد برابرِ تعدادِ عضوهای اشتراک تقسیم بر تعدادِ عضوهای اجتماع است. بخشِ سندهای نزدیک و شینگل در کتاب Stanford این نسبت و ارتباطِ گروه‌بندیِ اسناد با Union–Find را توضیح می‌دهد. از آن منبع، تخمینِ تصادفی، درصدهای تاریخیِ وب، حذفِ سند یا راهکارِ مقیاس‌پذیر را واردِ مثال نمی‌کنیم.

در درسِ امضای کوچکِ MinHash، تفاوتِ جاکاردِ دقیق با تخمینِ چند جایگشت مسئلهٔ اصلی بود. اینجا همهٔ زوج‌ها دقیق محاسبه می‌شوند و خطای تخمین نداریم؛ مسئلهٔ تازه، معنای گروهی است که از اتصالِ زوج‌ها ساخته می‌شود. حتی محاسبهٔ بی‌خطای هر شباهت، نتیجه‌گیریِ نادرست دربارهٔ همهٔ اعضای گروه را اصلاح نمی‌کند.

۲. آستانهٔ دقیق، یالِ بی‌جهت می‌سازد

دو محفظهٔ ویژگی کنارِ یک اتصالِ قابل‌بازرسی، به عنوانِ قراردادِ زوجی.
تصویر مفهومی: دو محفظهٔ ویژگی کنارِ یک اتصالِ قابل‌بازرسی، به عنوانِ قراردادِ زوجی.؛ بدون مقیاس عددی و مستقل از نتایج اجرای کد.

سه رکورد با شناسه‌های یک، دو و سه داریم. مجموعهٔ اول شاملِ ویژگی‌های یک و دو، مجموعهٔ میانی شاملِ یک و دو و سه، و مجموعهٔ آخر شاملِ دو و سه است. اشتراکِ اول و میانی دو عضو و اجتماعشان سه عضو دارد؛ نسبت دو‌سوم است. برای میانی و آخر نیز دو‌سوم داریم. دو سرِ زنجیره فقط ویژگیِ دو را مشترک دارند؛ نسبتشان یک‌سوم است.

آستانه را یک‌دوم می‌گذاریم. هر زوج با جاکاردِ بزرگ‌تر یا مساویِ آستانه، یک یالِ بی‌جهت می‌گیرد؛ پس فقط یال‌های یک‌ـ‌دو و دو‌ـ‌سه ساخته می‌شوند. تقارنِ جاکارد، جهت را بی‌معنا می‌کند. یالِ یک‌ـ‌سه وجود ندارد. خودحلقه لازم نیست، چون تک‌عضوی بودنِ یک گروه به داشتنِ یال وابسته نیست و مسیرِ بدون یال، دسترسیِ هر عضو به خودش را حفظ می‌کند.

قاعدهٔ مساوی‌بودن بخشی از قراردادِ خودِ این درس است. با آستانهٔ دقیقِ دو‌سوم، هر دو یال باقی می‌مانند؛ با سه‌چهارم، هر دو حذف می‌شوند. آستانه باید شیئی دقیق از نوعِ Fraction در بازهٔ بستهٔ صفر تا یک باشد. شناور، عددِ صحیح و بولی پذیرفته نمی‌شوند؛ برنامه خودش رشته یا عدد اعشاری را به کسر تبدیل نمی‌کند.

۳. زنجیرهٔ پیوندها، تضمینِ شباهتِ همهٔ زوج‌ها نیست

سه گره با دو اتصالِ زنجیره‌ای و جای خالیِ اتصالِ دو سر.
تصویر مفهومی: سه گره با دو اتصالِ زنجیره‌ای و جای خالیِ اتصالِ دو سر.؛ بدون مقیاس عددی و مستقل از نتایج اجرای کد.

الگوریتم برای هر رکورد یک گروه آغازین می‌سازد. با دیدنِ یال، ریشه‌های دو گروه را پیدا و گروهِ کوچک‌تر را به بزرگ‌تر وصل می‌کند. فشرده‌سازیِ مسیر، زنجیرهٔ اشاره‌گرهای داخلی را کوتاه می‌کند؛ این زنجیره با یال‌های شباهتِ سندها فرق دارد. ریشه یک جزئیاتِ محاسباتی است و هیچ معنای اعتبار، تازگی یا نمایندهٔ مناسبِ محتوا ندارد.

پس از دو اتصال، هر سه شناسه در یک مؤلفه‌اند؛ از اولی با عبور از میانی به آخری می‌رسیم. با این حال، جاکاردِ دو سر یک‌سوم و پایین‌تر از یک‌دوم باقی می‌ماند. توضیحِ پیوندِ تک‌گانه در کتاب Stanford همین تفاوتِ مؤلفهٔ متصل و اثرِ زنجیره را روشن می‌کند. برنامهٔ ما فقط افرازِ یک گرافِ آستانه‌ای را می‌سازد و درختِ کاملِ خوشه‌بندیِ سلسله‌مراتبی تولید نمی‌کند.

برای اینکه این محدودیت در خروجی پنهان نماند، علاوه بر مؤلفه‌ها و یال‌ها، همهٔ زوج‌های درونِ هر مؤلفه را که زیرِ آستانه‌اند گزارش می‌کنیم. در مثال، زوجِ یک و سه چنین شاهدی است. این فهرست، فاصلهٔ معنایی یا خطای محصول نیست؛ فقط نشان می‌دهد مؤلفه، کلیکِ آستانه‌ای نیست. کلیک یعنی هر دو عضوِ متمایز مستقیماً به هم وصل باشند؛ هیچ الگوریتمِ complete-link یا پوششِ کلیک اینجا پیاده نشده است.

عضوهای هر مؤلفه و سپس خودِ مؤلفه‌ها برحسبِ شناسه مرتب می‌شوند. این نمایش، جابه‌جاییِ ترتیبِ رکوردها را خنثی می‌کند و هر شناسه را دقیقاً یک بار نگه می‌دارد. کوچک‌ترین شناسه در ابتدای خروجی، سندِ برتر یا نسخهٔ قابل‌نگهداری معرفی نمی‌شود. اگر بعداً ویژگی یا آستانه تغییر کند، باید افراز را دوباره محاسبه کرد؛ شاخصِ مؤلفه کلیدِ پایدارِ سند نیست.

۴. کدِ کامل و مرجعِ مستقلِ دسترسی

دو شیوهٔ مستقلِ بازبینیِ گروه‌ها، با کارت‌های یکسان و چیدمانِ متفاوت.
تصویر مفهومی: دو شیوهٔ مستقلِ بازبینیِ گروه‌ها، با کارت‌های یکسان و چیدمانِ متفاوت.؛ بدون مقیاس عددی و مستقل از نتایج اجرای کد.

فایل document_single_link_chain.py با کتابخانهٔ استاندارد و Python 3.14.5 اجرا شده است. ورودی دقیقاً تاپلِ صفر تا شش رکورد و هر رکورد تاپلِ دو‌عضوی است. شناسه‌ها اعدادِ صحیحِ واقعیِ یکتا از صفر تا ۳۱ هستند. ویژگی‌ها دقیقاً frozenset ناتهی از اعدادِ صحیحِ صفر تا پنج‌اند؛ بولی، زیرنوعِ سفارشی، مجموعهٔ تغییرپذیر و شکلِ ناسازگار رد می‌شوند.

"""Exact finite feature-set graph: single-link components are not cliques.

Supplied synthetic features only. No tokenizer, MinHash, document deletion,
semantic equality, network, search engine or performance measurement.
"""
from dataclasses import dataclass
from fractions import Fraction
from itertools import product, permutations
import json
import platform
import sys


@dataclass(frozen=True)
class Grouping:
    components: tuple
    edges: tuple
    below_threshold_inside: tuple


def _validated(records, threshold):
    if type(threshold) is not Fraction or not 0 <= threshold <= 1:
        raise ValueError("threshold must be an exact Fraction in [0,1]")
    if type(records) is not tuple or not 0 <= len(records) <= 6:
        raise ValueError("records must be an exact tuple of at most 6 items")
    prepared = []
    seen = set()
    for record in records:
        if type(record) is not tuple or len(record) != 2:
            raise ValueError("record must be an exact (ID, frozenset) tuple")
        identity, features = record
        if type(identity) is not int or not 0 <= identity <= 31 or identity in seen:
            raise ValueError("unique exact integer IDs in 0..31 required")
        if type(features) is not frozenset or not 1 <= len(features) <= 6:
            raise ValueError("nonempty exact frozenset required")
        if any(type(value) is not int or not 0 <= value <= 5 for value in features):
            raise ValueError("features must be exact integers in 0..5")
        seen.add(identity)
        prepared.append((identity, features))
    return tuple(sorted(prepared))


def _jaccard_nonempty(left, right):
    # Only the already validated nonempty feature sets reach this helper.
    return Fraction(len(left & right), len(left | right))


def cluster_features(records, threshold):
    prepared = _validated(records, threshold)
    count = len(prepared)
    parent = list(range(count))
    size = [1] * count

    def root(index):
        while parent[index] != index:
            parent[index] = parent[parent[index]]
            index = parent[index]
        return index

    def join(left, right):
        a, b = root(left), root(right)
        if a == b:
            return
        if size[a] < size[b]:
            a, b = b, a
        parent[b] = a
        size[a] += size[b]

    edges = []
    pair_scores = {}
    for i in range(count):
        for j in range(i + 1, count):
            value = _jaccard_nonempty(prepared[i][1], prepared[j][1])
            pair_scores[(prepared[i][0], prepared[j][0])] = value
            if value >= threshold:
                edges.append((prepared[i][0], prepared[j][0], value))
                join(i, j)
    groups = {}
    for i, (identity, _) in enumerate(prepared):
        groups.setdefault(root(i), []).append(identity)
    components = tuple(sorted(tuple(members) for members in groups.values()))
    component_of = {identity: index for index, members in enumerate(components)
                    for identity in members}
    below = tuple((left, right, value) for (left, right), value in pair_scores.items()
                  if component_of[left] == component_of[right] and value < threshold)
    return Grouping(components, tuple(edges), below)


def reachability_oracle(records, threshold):
    """Independent reference for valid fixtures, not a second input validator.

    Build Boolean rows from membership counts and integer cross-products;
    close the matrix via intermediate vertices. No DSU, main scoring helper,
    main edges, roots or components are consumed.
    """
    identities = [record[0] for record in records]
    features = [record[1] for record in records]
    count = len(records)
    reach = [[i == j for j in range(count)] for i in range(count)]
    for i in range(count):
        for j in range(count):
            common = sum(value in features[i] and value in features[j] for value in range(6))
            either = sum(value in features[i] or value in features[j] for value in range(6))
            reach[i][j] |= common * threshold.denominator >= either * threshold.numerator
    for middle in range(count):
        for left in range(count):
            for right in range(count):
                reach[left][right] |= reach[left][middle] and reach[middle][right]
    rows = {tuple(sorted(identities[j] for j in range(count) if reach[i][j]))
            for i in range(count)}
    return tuple(sorted(rows))


def rejected(records, threshold):
    try:
        cluster_features(records, threshold)
    except ValueError:
        return True
    return False


def fraction_json(value):
    return {"numerator": value.numerator, "denominator": value.denominator}


def group_json(result):
    return {"components": result.components,
            "edges": [[a, b, fraction_json(value)] for a, b, value in result.edges],
            "below_threshold_inside_components": [
                [a, b, fraction_json(value)] for a, b, value in result.below_threshold_inside]}


def run_example():
    chain = ((1, frozenset((1, 2))), (2, frozenset((1, 2, 3))),
             (3, frozenset((2, 3))))
    half = Fraction(1, 2)
    observed = cluster_features(chain, half)
    equality = cluster_features(chain, Fraction(2, 3))
    above = cluster_features(chain, Fraction(3, 4))
    checks = {}
    checks["hand_adjacent_two_thirds_and_endpoint_one_third"] = (
        observed.edges == ((1, 2, Fraction(2, 3)), (2, 3, Fraction(2, 3)))
        and observed.below_threshold_inside == ((1, 3, Fraction(1, 3)),))
    checks["chain_component_is_not_a_pairwise_threshold_clique"] = (
        observed.components == ((1, 2, 3),) and len(observed.edges) == 2
        and len(observed.below_threshold_inside) == 1)
    checks["threshold_equality_is_included_exactly"] = equality == observed
    checks["raising_threshold_past_both_links_splits_manual_chain"] = (
        above.components == ((1,), (2,), (3,)) and above.edges == ()
        and above.below_threshold_inside == ())
    disjoint = ((4, frozenset((0,))), (5, frozenset((5,))))
    checks["zero_threshold_connects_even_disjoint_nonempty_features"] = (
        cluster_features(disjoint, Fraction(0)).components == ((4, 5),)
        and cluster_features(disjoint, Fraction(0)).edges == ((4, 5, Fraction(0)),)
        and cluster_features(disjoint, Fraction(1, 64)).components == ((4,), (5,)))
    exact = ((9, frozenset((0, 4))), (2, frozenset((0, 4))),
             (5, frozenset((0, 4, 5))))
    checks["one_threshold_groups_equal_features_not_document_equality"] = (
        cluster_features(exact, Fraction(1)).components == ((2, 9), (5,))
        and cluster_features(exact, Fraction(1)).below_threshold_inside == ())
    checks["empty_corpus_singleton_and_noncontiguous_ID_bounds"] = (
        cluster_features((), half) == Grouping((), (), ())
        and cluster_features(((31, frozenset(range(6))),), half)
        == Grouping(((31,),), (), ())
        and cluster_features(tuple((i, frozenset(range(6))) for i in range(6)), Fraction(1))
        .components == ((0, 1, 2, 3, 4, 5),))
    checks["all_manual_input_permutations_have_canonical_full_result"] = all(
        cluster_features(order, half) == observed for order in permutations(chain))
    renamed = tuple((identity, frozenset(5 - value for value in features))
                    for identity, features in chain)
    checks["common_bijective_feature_renaming_preserves_full_result"] = (
        cluster_features(renamed, half) == observed)
    bridge_removed = (chain[0], chain[2])
    checks["removing_bridge_separates_endpoints_without_changing_their_sets"] = (
        cluster_features(bridge_removed, half).components == ((1,), (3,))
        and bridge_removed == (chain[0], chain[2]))
    thresholds = (Fraction(0), Fraction(1, 3), half, Fraction(2, 3), Fraction(1))
    partitions = [cluster_features(chain, threshold).components for threshold in thresholds]
    checks["higher_threshold_components_refine_lower_threshold_components"] = all(
        any(set(component) <= set(old) for old in partitions[i])
        for i in range(len(partitions) - 1) for component in partitions[i + 1])
    before = repr(chain)
    second = cluster_features(chain, half)
    checks["immutable_results_are_fresh_and_inputs_stay_unchanged"] = (
        repr(chain) == before and second == observed and second is not observed
        and type(second.components) is tuple and all(type(row) is tuple for row in second.components))
    invalid = [
        (None, half), ([], half), (iter(chain), half), ((chain[0],) * 7, half),
        (([1, frozenset((1,))],), half), (((1,),), half),
        (((True, frozenset((1,))),), half), (((1.0, frozenset((1,))),), half),
        (((-1, frozenset((1,))),), half), (((32, frozenset((1,))),), half),
        (((1, frozenset((1,))), (1, frozenset((2,)))), half),
        (((1, set((1,))),), half), (((1, (1,)),), half),
        (((1, frozenset()),), half), (((1, frozenset((True,))),), half),
        (((1, frozenset((1.0,))),), half), (((1, frozenset((-1,))),), half),
        (((1, frozenset((6,))),), half), (((1, frozenset(range(7))),), half),
        (chain, True), (chain, 0), (chain, 0.5), (chain, "1/2"),
        (chain, Fraction(-1, 4)), (chain, Fraction(5, 4)),
    ]
    checks["strict_types_bounds_duplicate_ID_and_empty_features_rejected_ONE_group"] = all(
        rejected(records, threshold) for records, threshold in invalid)
    # Every ordered assignment of 0..3 documents to 7 nonempty subsets of {0,1,2}.
    # The entire finite family is ONE meaningful check group.
    subsets = tuple(frozenset(value for value in range(3) if mask & (1 << value))
                    for mask in range(1, 8))
    profiles = cases = 0
    family_ok = True
    for count in range(4):
        for assignment in product(subsets, repeat=count):
            records = tuple((2 * i + 1, feature) for i, feature in enumerate(assignment))
            profiles += 1
            for threshold in thresholds:
                actual = cluster_features(records, threshold)
                expected = reachability_oracle(records, threshold)
                family_ok &= actual.components == expected
                # Every reported inside nonedge really fails the inclusive pair condition.
                family_ok &= all(value < threshold for _, _, value in actual.below_threshold_inside)
                cases += 1
    checks["all_finite_feature_profiles_match_independent_boolean_closure_ONE_group"] = bool(
        family_ok and profiles == 400 and cases == 2000)
    assert len(checks) == 14 and all(type(value) is bool and value for value in checks.values()), checks
    return {"python": platform.python_version(), "implementation": platform.python_implementation(),
            "dependencies": "standard library only", "threshold": fraction_json(half),
            "supplied_synthetic_features": [[identity, sorted(features)] for identity, features in chain],
            "manual_half_threshold": group_json(observed),
            "manual_equal_two_thirds_threshold": group_json(equality),
            "manual_three_quarters_threshold": group_json(above),
            "finite_oracle": {"profiles_in_ONE_group": profiles, "cases_in_ONE_group": cases,
                              "reference": "Boolean reachability closure with integer cross-products"},
            "invalid_fixtures_in_ONE_group": len(invalid), "checks": checks,
            "limitations": ["Supplied nonempty synthetic sets, not a tokenizer or real document similarity.",
                            "Connected components need not be threshold cliques or semantic equivalence classes.",
                            "No source deletion, representative selection, authorization, quality or speed claim."]}


if __name__ == "__main__":
    sys.stdout.buffer.write((json.dumps(run_example(), ensure_ascii=True, indent=2,
                                      allow_nan=False) + "\n").encode("utf-8"))

پیش از ساختِ هر گروه، همهٔ ورودی اعتبارسنجی می‌شود. مجموعهٔ ویژگیِ تهی پذیرفته نیست، چون نمی‌خواهیم برای نسبتِ صفر به صفر قراردادِ ضمنی بسازیم؛ مجموعهٔ سندهای تهی مجاز است و هیچ مؤلفه‌ای برنمی‌گرداند. خروجیِ تغییرناپذیر، شناسه‌ها را حفظ می‌کند و ورودی را تغییر نمی‌دهد. مولد نیز به‌جای تاپل پذیرفته نمی‌شود، پس ردشدنِ آن نیازمندِ مصرفِ رخدادهایش نیست.

مرجعِ مستقل، ماتریسِ بولیِ دسترسی را می‌سازد. برای تصمیمِ هر زوج، شمارشِ عضویت و ضربِ متقاطعِ صحیح را به کار می‌برد؛ سپس امکانِ عبور از هر رأسِ میانی را اضافه می‌کند. این مرجع نه از ریشه‌ها و یال‌های خروجیِ الگوریتم استفاده می‌کند و نه تابعِ محاسبهٔ کسرِ آن را می‌خواند. هر سطرِ بسته‌شده، عضوهای قابل‌دسترسی از یک شناسه را مشخص می‌کند.

{
  "python": "3.14.5",
  "implementation": "CPython",
  "dependencies": "standard library only",
  "threshold": {
    "numerator": 1,
    "denominator": 2
  },
  "supplied_synthetic_features": [
    [
      1,
      [
        1,
        2
      ]
    ],
    [
      2,
      [
        1,
        2,
        3
      ]
    ],
    [
      3,
      [
        2,
        3
      ]
    ]
  ],
  "manual_half_threshold": {
    "components": [
      [
        1,
        2,
        3
      ]
    ],
    "edges": [
      [
        1,
        2,
        {
          "numerator": 2,
          "denominator": 3
        }
      ],
      [
        2,
        3,
        {
          "numerator": 2,
          "denominator": 3
        }
      ]
    ],
    "below_threshold_inside_components": [
      [
        1,
        3,
        {
          "numerator": 1,
          "denominator": 3
        }
      ]
    ]
  },
  "manual_equal_two_thirds_threshold": {
    "components": [
      [
        1,
        2,
        3
      ]
    ],
    "edges": [
      [
        1,
        2,
        {
          "numerator": 2,
          "denominator": 3
        }
      ],
      [
        2,
        3,
        {
          "numerator": 2,
          "denominator": 3
        }
      ]
    ],
    "below_threshold_inside_components": [
      [
        1,
        3,
        {
          "numerator": 1,
          "denominator": 3
        }
      ]
    ]
  },
  "manual_three_quarters_threshold": {
    "components": [
      [
        1
      ],
      [
        2
      ],
      [
        3
      ]
    ],
    "edges": [],
    "below_threshold_inside_components": []
  },
  "finite_oracle": {
    "profiles_in_ONE_group": 400,
    "cases_in_ONE_group": 2000,
    "reference": "Boolean reachability closure with integer cross-products"
  },
  "invalid_fixtures_in_ONE_group": 25,
  "checks": {
    "hand_adjacent_two_thirds_and_endpoint_one_third": true,
    "chain_component_is_not_a_pairwise_threshold_clique": true,
    "threshold_equality_is_included_exactly": true,
    "raising_threshold_past_both_links_splits_manual_chain": true,
    "zero_threshold_connects_even_disjoint_nonempty_features": true,
    "one_threshold_groups_equal_features_not_document_equality": true,
    "empty_corpus_singleton_and_noncontiguous_ID_bounds": true,
    "all_manual_input_permutations_have_canonical_full_result": true,
    "common_bijective_feature_renaming_preserves_full_result": true,
    "removing_bridge_separates_endpoints_without_changing_their_sets": true,
    "higher_threshold_components_refine_lower_threshold_components": true,
    "immutable_results_are_fresh_and_inputs_stay_unchanged": true,
    "strict_types_bounds_duplicate_ID_and_empty_features_rejected_ONE_group": true,
    "all_finite_feature_profiles_match_independent_boolean_closure_ONE_group": true
  },
  "limitations": [
    "Supplied nonempty synthetic sets, not a tokenizer or real document similarity.",
    "Connected components need not be threshold cliques or semantic equivalence classes.",
    "No source deletion, representative selection, authorization, quality or speed claim."
  ]
}

چهارده گروهِ نام‌دار بررسی شده‌اند. خانوادهٔ متناهی، تمامِ ۴۰۰ تخصیصِ صفر تا سه رکورد به هفت زیرمجموعهٔ ناتهیِ جهانِ سه‌عضوی را در پنج آستانه مقایسه می‌کند؛ ۲۰۰۰ حالت، یک گروه‌اند. پاسخِ دستی، مرزِ مساوی، حذفِ پل، جابه‌جاییِ ورودی، تغییرِ مشترکِ نامِ ویژگی‌ها، سقفِ شش رکورد و ۲۵ ورودیِ نامعتبر نیز جدا بررسی می‌شوند. شمارِ حالت‌ها سنجشِ سرعت، حافظه یا مقیاسِ مجموعهٔ واقعی نیست.

۵. چهار پرسشِ پاسخ‌دار و مرزِ تصمیمِ حذف

سندهای گروه‌بندی‌شده کنارِ جایگاهِ بازبینی، با همهٔ کارت‌ها و برچسب‌های مستقلِ محفوظ.
تصویر مفهومی: سندهای گروه‌بندی‌شده کنارِ جایگاهِ بازبینی، با همهٔ کارت‌ها و برچسب‌های مستقلِ محفوظ.؛ بدون مقیاس عددی و مستقل از نتایج اجرای کد.

پرسش اول: اگر آستانه سه‌چهارم شود، چه می‌ماند؟ پاسخ: شباهتِ دو‌سوم از آن کمتر است؛ هر دو یالِ زنجیره حذف می‌شوند و سه مؤلفهٔ تک‌عضوی داریم. خودِ مجموعه‌های ویژگی تغییر نکرده‌اند. این مثال نشان می‌دهد تغییرِ سیاستِ آستانه می‌تواند گروه‌بندی را عوض کند، بدون اینکه محتوایی ویرایش شده باشد.

پرسش دوم: آستانهٔ صفر برای دو مجموعهٔ جدا چه می‌کند؟ پاسخ: جاکاردِ آن‌ها صفر است و قاعدهٔ بزرگ‌تر یا مساوی، یال می‌سازد. در نتیجه حتی ویژگی‌های کاملاً جدا هم در همان مؤلفه قرار می‌گیرند. مجازبودنِ عددِ آستانه به معنیِ مناسب‌بودنِ آن برای هدفِ کاربرد نیست؛ هیچ آستانهٔ استانداردِ همگانی برای کیفیت پیشنهاد نشده است.

پرسش سوم: اگر رکوردِ میانی را برداریم، آیا دو سر هنوز هم‌گروه‌اند؟ پاسخ: خیر؛ تنها زوجِ باقی‌مانده جاکاردِ یک‌سوم دارد و در آستانهٔ یک‌دوم یال نمی‌گیرد. در مقابل، افزودنِ پل ممکن است دو گروه را یکی کند، بدون اینکه شباهتِ قبلیِ دو سر تغییر کند. هم‌گروهیِ تک‌پیوندی به بقیهٔ رکوردها هم وابسته است.

پرسش چهارم: آیا از هر مؤلفه فقط یک سند نگه داریم؟ پاسخ: این نتیجه مجوزِ حذف نمی‌دهد. حتی برابریِ مجموعهٔ ویژگی در آستانهٔ یک، برابریِ متن را ثابت نمی‌کند. درسِ برابریِ دقیقِ محتوا قراردادِ بایت و حفظِ منشأ را جدا بررسی می‌کرد. نسخه، مجوز، اعتبار و نگهداری، تصمیم‌های دیگری هستند که ورودیِ این برنامه ندارد.

منابع در ۲۹ مهر ۱۴۰۵ خوانده شدند. کتاب مربوط به ۲۰۰۸ و تاریخِ تولیدِ صفحه‌های HTML برابرِ ۷ آوریلِ ۲۰۰۹ است؛ روزِ دقیقِ انتشارِ هر صفحه معلوم نیست. این آموزش خبرِ تازه نیست. برنامه هیچ متن، فایل، نمایه، سرویسِ جست‌وجو، SciPy یا MinHash را اجرا نمی‌کند و ادعایی دربارهٔ کیفیتِ واقعیِ بازیابی یا کاهشِ فضای ذخیره‌سازی ندارد.

منابع و مطالعهٔ بیشتر

بررسی منابع: ۲۹ مهر ۱۴۰۵. تحلیل‌ها و پیشنهادهای اجرایی، جمع‌بندی نویسنده‌اند.