tact — Third-Party Notices
===========================

This repository is licensed under the Apache License, Version 2.0 (see LICENSE). It
incorporates the following third-party material, reproduced/adapted with attribution as
required by the originating project's own license.

------------------------------------------------------------------------------------------

dirac (https://github.com/dirac-run/dirac), version 0.4.11
Copyright (c) the dirac-run/dirac contributors
Licensed under the Apache License, Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0)

Portions of `tact/reconcile.py` are a port, adapted, of dirac's fuzzy-match
reconciliation algorithm and Unicode-punctuation canonicalization table:

  - `canonicalize()` ports `src/shared/string.ts::canonicalize` (Unicode quote/dash/NBSP
    normalization table and backslash-escape un-escaping).
  - The Levenshtein distance and similarity primitive port
    `src/core/task/tools/utils/PatchParser.ts::levenshteinDistance` /
    `calculateSimilarity`.
  - The multi-pass tolerance ladder (exact-after-canonicalization -> trailing-whitespace-
    insensitive -> fully whitespace-insensitive -> bounded Levenshtein similarity) is
    adapted from `PatchParser.ts::findContext`, with the "scan for every candidate, not the
    first hit" and "per-line mean similarity, not whole-block similarity" changes documented
    in `reconcile.py`'s own module docstring.

A copy of the Apache License, Version 2.0, under which the above dirac source is licensed,
can be obtained at https://www.apache.org/licenses/LICENSE-2.0 or in any dirac-run/dirac
release. This NOTICE file, plus the provenance block in `reconcile.py`'s module docstring,
satisfies the Apache-2.0 attribution requirement for the ported material.
