architxt.labelling#
Functions
| Apply a collection of renaming to a forest. |
| Get a group renaming for a forest using an LLM. |
| Get a renaming of relations for a forest using an LLM. |
Classes
|
- architxt.labelling.apply_renaming(forest, renames)[source]#
Apply a collection of renaming to a forest.
- Parameters:
forest (
Forest) – The forest to modify in-place.renames (
Collection[Renaming]) – The collection of renaming to apply.
- Return type:
- architxt.labelling.llm_group_labelling(schema, llm, *, forest=None, sample_size=5)[source]#
Get a group renaming for a forest using an LLM.
- Parameters:
- Return type:
set[Renaming]- Returns:
A set of renaming for groups.
- architxt.labelling.llm_relation_labelling(schema, llm, *, group_renames=None)[source]#
Get a renaming of relations for a forest using an LLM.
- Parameters:
schema (
Schema) – The schema to relabel.llm (
BaseChatModel) – The LLM model to use.group_renames (
Collection[Renaming] | None) – A collection of renaming for groups to provide context.
- Return type:
set[Renaming]- Returns:
The renaming for relations.