CCalclabhub

Text & Writing

The substitution table

Order matters because the tables overlap: replacing a long phrase first can remove the context a shorter one needed, and a table applied out of order produces different text from the same input.

The Formula

output = the input with each phrase in the strategy's table replaced, applied in table order

Order matters because the tables overlap: replacing a long phrase first can remove the context a shorter one needed, and a table applied out of order produces different text from the same input.

SymbolMeaning
s_inInput sentence
tableSubstitution table
s_outOutput sentence

What Each Symbol Means

s_intext

Input sentence

The sentence pasted in, before any edit.

tablepairs

Substitution table

The ordered list of from-and-to pairs for this strategy.

s_outtext

Output sentence

The sentence after every substitution has been tried.

See It Worked With Real Numbers

A formula on its own does not tell you which number goes where. The how to rewrite a sentence page applies this equation to a concrete case, shows every intermediate step, and names the mistakes that produce a wrong answer even when the algebra is right.

Where This Formula Appears

This equation is the working core of How To Rewrite A Sentence, filed under Everyday Life. Every number the guide produces comes from substituting into this one line.