ekspans
Ekspans is a formal operation used in string processing and grammar design to enlarge a base sequence by inserting predefined material after each element. It is used to model augmentation, scaffolding in data representations, and certain kinds of derivations in grammar formalisms.
Let S = s1 s2 ... sn be a sequence over an alphabet Σ. Let R be a function
Ekspans preserves the left-to-right order of the original symbols, and the length of E_R(S) is |S| plus
Example: S = [A, B, C], R(A) = "x", R(B) = "", R(C) = "yz". Then E_R(S) = "AxBCyz".
Applications include data augmentation for natural language generation, scaffolding in code and data encoding, and studies
See also: expansion, morphism, string rewriting, grammar-based generation.