# Plain Text

Key: `representation.text.plain_text`

Unstructured text content (sentences, paragraphs, descriptions). Broad categorization.

Page: <https://meridian.online/docs/projects/finetype/types/representation/text/plain_text>

Samples: `This is a plain text description`, `A longer paragraph with multiple sentences`, `Single word`

## Background

### Origin

FineType defines representation.text.plain\_text itself, as unstructured text content such as sentences, paragraphs and descriptions.[[1]](https://github.com/meridian-online/finetype/blob/main/labels/definitions_representation.yaml) FineType's registry notes call plain\_text a very broad category.[[1]](https://github.com/meridian-online/finetype/blob/main/labels/definitions_representation.yaml) FineType's registry notes say that telling plain text apart from other text types, such as sentence or word, requires statistical analysis.[[1]](https://github.com/meridian-online/finetype/blob/main/labels/definitions_representation.yaml) FineType's registry gives plain\_text the broad type VARCHAR.[[1]](https://github.com/meridian-online/finetype/blob/main/labels/definitions_representation.yaml)

The Unicode Standard defines plain text as a pure sequence of character codes.[[2]](https://www.unicode.org/versions/Unicode16.0.0/core-spec/chapter-2/) The Unicode Standard contrasts plain text with styled text, also known as rich text, which adds information such as a language identifier, font size, colour or hypertext links.[[2]](https://www.unicode.org/versions/Unicode16.0.0/core-spec/chapter-2/) Wikipedia describes plain text as a loose term for unformatted text.[[3]](https://en.wikipedia.org/wiki/Plain_text)

### Use

The Data Package Standard's Table Schema defines a string field type for fields that contain sequences of characters.[[4]](https://datapackage.org/standard/table-schema/) DuckDB stores strings in its VARCHAR type, and lists TEXT and STRING among the type's alternative names.[[5]](https://duckdb.org/docs/current/sql/data_types/text.html) DuckDB encodes VARCHAR data internally as UTF-8.[[5]](https://duckdb.org/docs/current/sql/data_types/text.html) DuckDB's documentation says a maximum length given as VARCHAR(n) has no effect and is only provided for compatibility.[[5]](https://duckdb.org/docs/current/sql/data_types/text.html) DuckDB's documentation suggests a CHECK constraint when a string's length must be restricted.[[5]](https://duckdb.org/docs/current/sql/data_types/text.html)

Wikipedia notes that, in most file systems, text files have no indicator of their character encoding.[[3]](https://en.wikipedia.org/wiki/Plain_text) Confirm the character encoding of a free-text column before you load it, rather than trusting a reader's default. (Meridian's view) Expect line breaks, tabs and long values inside free-text cells, and check that your CSV or spreadsheet reader keeps quoted multi-line cells whole. (Meridian's view) Treat plain text as the label of last resort: first ask whether the column is really something narrower, such as names, codes or a small set of categories, before leaving it as free text. (Meridian's view)

### Where you'll meet it

The US Census Bureau's 2022 NAICS descriptions file has three columns: Code, Title and Description.[[6]](https://www.census.gov/naics/2022NAICS/2022_NAICS_Descriptions.xlsx) The Description column in the 2022 NAICS descriptions file holds prose such as "This industry comprises establishments primarily engaged in growing soybeans and/or producing soybean seeds."[[6]](https://www.census.gov/naics/2022NAICS/2022_NAICS_Descriptions.xlsx) Many entries in the Description column of the 2022 NAICS descriptions file run to several paragraphs separated by line breaks.[[6]](https://www.census.gov/naics/2022NAICS/2022_NAICS_Descriptions.xlsx) Some rows in the 2022 NAICS descriptions file carry the literal text NULL in the Description column.[[6]](https://www.census.gov/naics/2022NAICS/2022_NAICS_Descriptions.xlsx)

## Sources

1. [finetype/labels/definitions\_representation.yaml at main · meridian-online/finetype](https://github.com/meridian-online/finetype/blob/main/labels/definitions_representation.yaml) — FineType
2. [Chapter 2 – Unicode 16.0.0](https://www.unicode.org/versions/Unicode16.0.0/core-spec/chapter-2/) — standard
3. [Plain text](https://en.wikipedia.org/wiki/Plain_text) — secondary source
4. [Table Schema \| Data Package Standard](https://datapackage.org/standard/table-schema/) — standard
5. [Text Types](https://duckdb.org/docs/current/sql/data_types/text.html) — documentation
6. [2022\_NAICS\_Descriptions.xlsx](https://www.census.gov/naics/2022NAICS/2022_NAICS_Descriptions.xlsx) — dataset
