You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b79f0e8
Browse filesBrowse the repository at this point in the historyBrowse files
|`security-pr-comment.yaml`|`workflow_run` after Security Scan | Posts/updates the ASH summary as a PR comment |
11
11
|`docs.yml`| push to `main` (src/docs paths) | Deploys MkDocs site to GitHub Pages |
12
+
|`docs-check.yml`| PR (docs/source/dependency/workflow paths) | Builds docs with the docs group and rejects link/navigation diagnostics; cancels superseded builds; no deployment |
12
13
|`workflow.yml`| release published | Builds and publishes to PyPI and TestPyPI (trusted publishing via OIDC) |
13
14
14
15
## Conventions
15
16
17
+
`Check Documentation` must remain a non-required check: its path filter means
18
+
unrelated PRs do not report a status. Making it required would leave those PRs
19
+
waiting indefinitely.
20
+
16
21
-**SHA pinning**: all `uses:` references are pinned to full 40-character
17
22
commit SHAs with a trailing `# vX.Y.Z` comment (supply-chain hardening;
18
23
mutable tags can be repointed). Dependabot (`.github/dependabot.yml`)
Copy file name to clipboardExpand all lines: docs/docs/Advanced/classification-logic.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,24 @@ Lists use the [Hungarian algorithm](hungarian-matching.md) for optimal element p
41
41
1.**Empty lists**: `[] vs []` is TN; `[] vs [items]` produces one FA per item; `[items] vs []` produces one FN per item.
42
42
2.**Matched elements**: similarity >= threshold is TP; below threshold is FD.
43
43
3.**Unmatched elements**: leftover GT elements are FN; leftover EST elements are FA.
44
+
4.**`None` elements**: absent, so they are not matched or counted. A list of only `None` is an empty list. See [`None` elements in a list](#none-elements-in-a-list).
45
+
46
+
#### `None` elements in a list {: #none-elements-in-a-list }
47
+
48
+
A `None` element marks an absence, not an object or a value, so it is left out before matching. This holds for a list field of models (`List[Optional[Model]]`) or of primitives (`List[Optional[str]]`), at any depth, and for a float `NaN` element, which counts as `None`. An empty string element is still a value. A list inside a list (`List[List[str]]`) or a dict value is compared as one whole value, so its `None`s are part of that value.
This follows the null rules above: an absent value against a present one is an FN or FA, and two absences are not evidence of a match. Counting a `None` as an element would credit two `None`s as a TP, and would count a missed row as an FD (or, in a list of models, a TP), so the miss would keep recall at `1.0`. Elements keep their original positions in reports: in `[A, None, C]`, `C` is reported as `[2]`.
59
+
60
+
-**Positional lists are not supported either way.** Matching ignores order, so a `None` cannot mean "slot 3 is empty": `[None, A]` and `[A, None]` already compare as identical. Put the position in the data instead, for example a `page_number` field, and matching pairs elements by it.
61
+
-**To score an absence, give it content.** If ground truth marks a row as unreadable and agreeing on that should earn credit, model it as a value, such as `Line(status="illegible")`. A `None` carries nothing to compare.
Copy file name to clipboardExpand all lines: docs/docs/Advanced/hungarian-matching.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -207,6 +207,7 @@ ELSE:
207
207
208
208
-**Equal length** -- Every element gets paired. Only TP and FD are possible.
209
209
-**Unequal length** -- Extra GT items become FN; extra Pred items become FA.
210
+
-**`None` elements** -- Left out before matching, so they are never paired or counted, and lengths are counted without them. See [`None` elements in a list](classification-logic.md#none-elements-in-a-list).
0 commit comments