Metadata to Label
A simple model that looks for metadata on the document, and then converts it to a label
Slug: metadata-to-label
Version: 1.0.0
Infer: Yes
Overview
Metadata to Label Model
This model converts document metadata properties into document labels based on configurable rules. It examines metadata values, evaluates conditions, and applies labels when conditions are met.
How It Works
- The model examines the document’s metadata for specified properties
- For each property found, it evaluates a condition using the property’s value
- If the condition evaluates to
true
, it applies the corresponding label to the document
Options Configuration
Option | Description |
---|---|
properties | List of property-to-label conversion rules, each containing a name, expression, and label |
Each property configuration requires:
- name: The metadata property name to check
- expression: A condition using
value
as the property value - label: The label to apply when the condition is true
Expression Syntax
The expression field supports simple conditional expressions with the following capabilities:
- Basic comparisons:
==
,!=
,>
,<
,>=
,<=
- Logical operators:
and
,or
,not
- String checks:
value == 'text'
,'text' in value
- Case-insensitive checks:
value.lower() == 'text'
- Existence checks:
value is not None
The keyword value
always represents the current metadata property’s value.
Process Flow
Example Configurations
Flag Unpublishable Documents
Label Documents by Department
Flag Priority Documents
Use Cases
This model is particularly useful for:
- Converting external system metadata into Kodexa document labels
- Creating document filtering and routing rules based on metadata
- Implementing conditional workflows based on document properties
- Integrating with systems that use metadata rather than labels
- Simplifying document classification based on existing metadata
Since the model uses simple evaluation of expressions, it provides a lightweight way to implement business rules without complex coding.
name: dont_publish property: ShouldPublishXml expression: value == ‘False’ or value == ‘false’
Inference Options
The following options can be configured when using this model for inference:
Name | Label | Type | Description | Default | Required |
---|---|---|---|---|---|
properties | Properties | list | N/A | - | No |
Model Details
- Provider: Kodexa AI