feat: schema_version 3 with DE/EN field descriptions
Signed-off-by: flemming-it <sf@flemming.it>
This commit is contained in:
parent
c1cea9cff1
commit
858384fa8f
1 changed files with 79 additions and 40 deletions
119
module.yaml
119
module.yaml
|
|
@ -1,54 +1,93 @@
|
||||||
schema_version: 2
|
schema_version: 3
|
||||||
provider: fai
|
provider: fai
|
||||||
name: text-anonymize
|
name: text-anonymize
|
||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
|
|
||||||
# Capability provided by this module.
|
|
||||||
provides:
|
provides:
|
||||||
- capability: text.anonymize
|
- capability: text.anonymize
|
||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
|
|
||||||
# Inputs the invoke function accepts.
|
|
||||||
inputs:
|
inputs:
|
||||||
# The text to anonymize. Plain UTF-8, any length the host
|
text:
|
||||||
# tolerates as a Payload::Text (operator policy caps).
|
type: text
|
||||||
text: text
|
description:
|
||||||
# Optional newline-separated list of additional bare terms
|
en: |
|
||||||
# (operator-supplied — names of people, organisations, or
|
The text to anonymize. Plain UTF-8, any length the host
|
||||||
# places that the regex patterns won't catch) to redact in
|
tolerates as a Payload::Text (operator policy caps).
|
||||||
# addition to the built-in categories. Empty string disables
|
de: |
|
||||||
# this extension. Each line is matched whole-word
|
Der zu anonymisierende Text. UTF-8, in jeder Länge die
|
||||||
# (case-insensitive).
|
der Host als Payload::Text zulässt (operator policy).
|
||||||
custom_terms: text
|
custom_terms:
|
||||||
|
type: text
|
||||||
|
description:
|
||||||
|
en: |
|
||||||
|
Optional newline-separated list of additional bare terms
|
||||||
|
(operator-supplied names of people, organisations, or
|
||||||
|
places the regex patterns won't catch) to redact in
|
||||||
|
addition to the built-in categories. Empty string
|
||||||
|
disables this extension. Each line is matched
|
||||||
|
whole-word, case-insensitive.
|
||||||
|
de: |
|
||||||
|
Optional zeilengetrennte Liste zusätzlicher Begriffe
|
||||||
|
(operator-gepflegte Namen von Personen, Organisationen
|
||||||
|
oder Orten, die die Regex-Patterns nicht abfangen), die
|
||||||
|
zusätzlich zu den eingebauten Kategorien geschwärzt
|
||||||
|
werden. Leer = Erweiterung aus. Jede Zeile wird
|
||||||
|
wortweise, case-insensitive, gematcht.
|
||||||
|
|
||||||
# Outputs produced.
|
|
||||||
outputs:
|
outputs:
|
||||||
# The anonymized text. Each detected entity is replaced
|
anonymized:
|
||||||
# with a token of the shape ⟦TYPE_N⟧ where TYPE is the
|
type: text
|
||||||
# category (EMAIL, PHONE, IBAN, BIC, IPV4, GERMAN_TAX_ID,
|
description:
|
||||||
# NAME, CUSTOM) and N is a stable counter starting at 1
|
en: |
|
||||||
# per category, in order of first occurrence. The opening
|
The anonymized text. Each detected entity is replaced
|
||||||
# / closing characters are U+27E6 / U+27E7 (mathematical
|
with a token of the shape ⟦TYPE_N⟧ where TYPE is the
|
||||||
# white square brackets) so the token never collides with
|
category (EMAIL, PHONE, IBAN, BIC, IPV4, GERMAN_TAX_ID,
|
||||||
# plain `[…]` already present in the source.
|
NAME, CUSTOM) and N is a stable counter starting at 1
|
||||||
anonymized: text
|
per category, in order of first occurrence. The
|
||||||
# JSON report describing each redaction:
|
opening / closing characters are U+27E6 / U+27E7
|
||||||
# {
|
(mathematical white square brackets) so the token never
|
||||||
# "redactions": [
|
collides with plain […] already present in the source.
|
||||||
# { "type": "EMAIL", "token": "⟦EMAIL_1⟧",
|
de: |
|
||||||
# "original": "foo@bar.de", "offset": 42 }
|
Der anonymisierte Text. Jede erkannte Entität wird durch
|
||||||
# ],
|
einen Token der Form ⟦TYPE_N⟧ ersetzt, wobei TYPE die
|
||||||
# "counts": { "EMAIL": 3, "PHONE": 1, ... }
|
Kategorie ist (EMAIL, PHONE, IBAN, BIC, IPV4,
|
||||||
# }
|
GERMAN_TAX_ID, NAME, CUSTOM) und N ein stabiler Zähler
|
||||||
# The full `original` text is included so the operator can
|
je Kategorie. Die Klammerzeichen sind U+27E6 / U+27E7,
|
||||||
# run a verify-pass against the redacted file (compliance:
|
damit der Token nie mit normalen […] aus der Quelle
|
||||||
# GDPR Art. 32(1)(a) "ability to undo" requirement). Hub
|
kollidiert.
|
||||||
# operators that want a pseudo-anonymisation-only flow can
|
report:
|
||||||
# discard this output downstream.
|
type: json
|
||||||
report: json
|
description:
|
||||||
|
en: |
|
||||||
|
JSON report describing each redaction:
|
||||||
|
{
|
||||||
|
"redactions": [
|
||||||
|
{ "type": "EMAIL", "token": "⟦EMAIL_1⟧",
|
||||||
|
"original": "foo@bar.de", "offset": 42 }
|
||||||
|
],
|
||||||
|
"counts": { "EMAIL": 3, "PHONE": 1, ... }
|
||||||
|
}
|
||||||
|
The full `original` text is included so the operator can
|
||||||
|
run a verify-pass against the redacted file (compliance:
|
||||||
|
GDPR Art. 32(1)(a) "ability to undo" requirement). Hub
|
||||||
|
operators that want a pseudo-anonymisation-only flow can
|
||||||
|
discard this output downstream.
|
||||||
|
de: |
|
||||||
|
JSON-Report mit jeder Schwärzung:
|
||||||
|
{
|
||||||
|
"redactions": [
|
||||||
|
{ "type": "EMAIL", "token": "⟦EMAIL_1⟧",
|
||||||
|
"original": "foo@bar.de", "offset": 42 }
|
||||||
|
],
|
||||||
|
"counts": { "EMAIL": 3, "PHONE": 1, ... }
|
||||||
|
}
|
||||||
|
Der vollständige `original`-Text ist enthalten, damit
|
||||||
|
Operatoren eine Verify-Pass gegen die geschwärzte Datei
|
||||||
|
fahren können (DSGVO Art. 32(1)(a) "Wiederherstellungs-
|
||||||
|
fähigkeit"). Wer Pseudo-Anonymisierung allein will,
|
||||||
|
verwirft diesen Output nachgelagert.
|
||||||
|
|
||||||
# Permissions required.
|
|
||||||
#
|
|
||||||
# Pure-Rust, regex-only, in-WASM. No filesystem, no network,
|
# Pure-Rust, regex-only, in-WASM. No filesystem, no network,
|
||||||
# no LLM. The empty list makes that explicit.
|
# no LLM.
|
||||||
permissions: []
|
permissions: []
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue