MeridianMERIDIAN

S-Expression

Balanced nested parenthetical serialization — the S-expression family: Lisp/Scheme source, linguistic constituency/dependency parse trees (Penn Treebank, OntoNotes: "(ROOT (S (NP (NN cat)) (VP (VBZ sits))))"), and code ASTs ("(program (call (id print) (string hi)))"). A nested structure of the form (head child child ...), distinguished from a comma/whitespace list by its balanced, recursively-nested parentheses.

S-Expression

container.object.s_expression

Balanced nested parenthetical serialization — the S-expression family: Lisp/Scheme source, linguistic constituency/dependency parse trees (Penn Treebank, OntoNotes: "(ROOT (S (NP (NN cat)) (VP (VBZ sits))))"), and code ASTs ("(program (call (id print) (string hi)))"). A nested structure of the form (head child child ...), distinguished from a comma/whitespace list by its balanced, recursively-nested parentheses.

Domain
container
Category
object
Casts to
VARCHAR
Scope
Universal

Try it

CLI
$ finetype infer -i "(ROOT (S (NP (NN cat)) (VP (VBZ sits))))" --mode column
→ container.object.s_expression

DuckDB

Detect
SELECT ft_infer('(ROOT (S (NP (NN cat)) (VP (VBZ sits))))');
-- → 'container.object.s_expression'
Cast expression
CAST({col} AS VARCHAR)
Safe cast pipeline
-- Normalise and cast in one step
SELECT TRY_CAST(ft_cast(my_column) AS VARCHAR) AS clean_value
FROM my_table
WHERE ft_infer(my_column) = 'container.object.s_expression';

JSON Schema

finetype taxonomy container.object.s_expression -o json-schema
{
  "$id": "https://meridian.online/schemas/container.object.s_expression",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Balanced nested parenthetical serialization — the S-expression family: Lisp/Scheme source, linguistic constituency/dependency parse trees (Penn Treebank, OntoNotes: \"(ROOT (S (NP (NN cat)) (VP (VBZ sits))))\"), and code ASTs (\"(program (call (id print) (string hi)))\"). A nested structure of the form (head child child ...), distinguished from a comma/whitespace list by its balanced, recursively-nested parentheses.\nThis is NOT container.array.comma_separated: parse trees carry Penn comma-tokens \"(, ,)\" that fool a delimiter detector into reading a CSV array, but the value is a single nested tree, not a delimited list.",
  "examples": [
    "(ROOT (S (NP (NN cat)) (VP (VBZ sits))))",
    "(program (call (id print) (string hello)))",
    "(+ (* 2 3) (- 4 1))",
    "(a (b c) (d (e f)))",
    "(S (INTJ (UH Uh)) (, ,) (NP-SBJ (PRP I)) (VP (VBP think)))"
  ],
  "minLength": 5,
  "pattern": "^\\s*\\(.*\\)\\s*$",
  "title": "S-Expression",
  "type": "string",
  "x-finetype-label": "container.object.s_expression",
  "x-finetype-pii": false
}

Examples

(ROOT (S (NP (NN cat)) (VP (VBZ sits))))(program (call (id print) (string hello)))(+ (* 2 3) (- 4 1))(a (b c) (d (e f)))(S (INTJ (UH Uh)) (, ,) (NP-SBJ (PRP I)) (VP (VBP think)))

Aliases

sexps_exprparse_treelisp

Type Registry