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.
Last updated
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.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| s_in | Input sentence | text | The sentence pasted in, before any edit. |
| table | Substitution table | pairs | The ordered list of from-and-to pairs for this strategy. |
| s_out | Output sentence | text | The sentence after every substitution has been tried. |
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.
Common Questions
What is the formula for The substitution table?
The formula for The substitution table is 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.
What does each symbol in The substitution table stand for?
s_in is input sentence; table is substitution table; s_out is output sentence.
What units should I use with The substitution table?
Substitute s_in in text, table in pairs, s_out in text. Convert every input to those units before you start, because the equation only returns the right answer when the units on both sides agree.
What is a common mistake when using The substitution table?
Rewriting a paragraph in one go. Phrase-level tables produce one change per phrase, so a paragraph returns dozens of diffs at once and nobody reviews them. One sentence at a time is slower and produces output somebody actually reads.