This documentation is available to agents as Markdown at https://docs.synthesized.io/tdk/latest/user_guide/030_core_concepts/unstructured_data.md. For the complete documentation index, see llms.txt.

Unstructured Data

Unstructured data is sensitive information in files rather than database columns: contracts, spreadsheets, emails, scanned forms, chat exports. Synthesized masks it with docanon, a command-line tool that finds sensitive values in a folder of files and delivers masked copies in their original formats.

docanon is available on special request; it isn’t part of the standard distribution. To run it, see Process Unstructured Files.

How it works

  1. Extract. docanon reads each file in the folder and keeps track of where each piece of text sits: a paragraph, a cell, an email header, a position on a page. Scanned PDFs and images are read with optical character recognition (OCR).

  2. Detect. It looks for about 50 types of sensitive data, in seven groups: personal, organization, health, finance, secrets, business and system data. Values with a recognisable shape, such as emails or card numbers, are found by patterns. Names, addresses and organizations written in free text need a local language model, which docanon can use through an OpenAI-compatible endpoint.

  3. Apply the policy. A policy file sets a mode for each type: keep, tokenize, redact or transform it.

  4. Rebuild. It writes each file back in its original format, with the values replaced in place, and packages the results as one ZIP archive too.

  5. Check. It checks the delivery before releasing it. If its check fails, it doesn’t deliver, and exits with a code that says so.

The policy

Mode What happens to a value

KEEP

Left as it is

TOKENIZE

Replaced with a token. The same value gets the same token, in every file and across runs, so references still line up.

REDACT

Replaced with a placeholder that names its type, [{TYPE}] by default

TRANSFORM

Replaced with a value made by a TDK generator

Consistent tokens mean that the same value, such as a customer’s email address, becomes the same token in a contract, an email and a spreadsheet.

Where it runs

docanon runs on your own machine or server and needs Java 17. It doesn’t need a license key and doesn’t connect to Governor. The files, the policy and the results stay where you run it. If you use a language model, point docanon at one you run locally, so the text doesn’t leave your network.

What to check

A delivery is only as complete as detection: a value that wasn’t detected stays in the file. Before you use a delivery:

  • Start with a small, representative set of files, and check the results before you run the whole collection.

  • Open the delivered files in the applications that will use them.

  • Look for values you know are in the files, and for types the policy keeps.

  • Check scanned documents separately: OCR quality limits what can be found.

Treat finishing a run and accepting its output for use as separate decisions.