Skip to content

use child codes as parent in classifier#688

Merged
bigabig merged 3 commits into
mainfrom
classifier-use-child-codes-as-parent
Jul 2, 2026
Merged

use child codes as parent in classifier#688
bigabig merged 3 commits into
mainfrom
classifier-use-child-codes-as-parent

Conversation

@fynnos

@fynnos fynnos commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Adds the option (during first step of span classifier wizard) to merge child codes into parents.

This changes both the dataset statistics (shown before training) as well as the actual training data.

Given a code hierarchy like

  • a
    • a1
      • a11
    • a2
  • b
    • b1
    • b2

and selecting a & b as codes, this will treat a1,a2,a11 as a, and b1,b2 as b. Thus, more fine-grained codes can be used for their coarse-grained parent codes recursively.
As child codes spans might overlap, only distinct spans (after in-place conversion to parent code) are counted for the dataset statistic. This fits the IO/BIO tagging scheme of the classifier, that can only output a single code per token.

If 'merge child codes into parents' is not used, behavior is as before.

@bigabig bigabig force-pushed the classifier-use-child-codes-as-parent branch from 9eb8aab to 0991fd2 Compare July 2, 2026 15:19
@bigabig bigabig merged commit 3db05e4 into main Jul 2, 2026
3 of 4 checks passed
@bigabig bigabig deleted the classifier-use-child-codes-as-parent branch July 2, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants