Enrichment
domain.tag.ports.enrichment
Summary
Tag enrichment port: expose the shared tag enrichment pipeline as an async callable.
Classes
TagEnrichmentAdaptor
Adaptor exposing the tag enrichment pipeline as an async callable.
Initialize the adaptor with the shared tags pipeline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs |
dict
|
Ignored; kept for dependency-injection compatibility. |
{}
|
Functions
__call__
async
Run the tag enrichment pipeline on payload.
Defaults the tags key to ["misc"] when the pipeline produces
nothing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
payload |
dict
|
Enrichment input, e.g. expense text and hints. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
Enriched payload whose |
Functions
get_tag_enrichment_svc
Build a tag enrichment service adaptor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs |
dict
|
Passed through to the adaptor constructor. |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
TagEnrichmentAdaptor |
TagEnrichmentAdaptor
|
Ready-to-use tag enrichment adaptor. |