tsuiwilliam
Member
Is there a @Pabbly built-in step that spins text so the output text isn't exactly the same every time? example use case, responding to google reviews with customer name, and randomize several variants of response
formatting details: https://spintax.org/en/mega-guide/
formatting details: https://spintax.org/en/mega-guide/
Code:
To spin a text you must write a base text and lock the words, sentence or paragraphs that you want to alternate, separating them by a vertical bar or pencil.
Example:
{That is|That’s|This is} my {automobile|car|motor car|machine}.
When processing the text spintax would leave a sentence like “That’s my car” or “this is my car”.
Basic structure
What we have explained is the basic structure of a text in Spintax format: a normal text in which some words, phrases and even complete sentences and paragraphs are enclosed in braces and joined by means of a pen with other words, phrases, paragraphs, etc… that mean more or less the same thing.
Another simple example:
{You’re|You are|You look} {awesome|beautiful|pretty|impressive}
Everything written inside the keys { } is taken by the spinner, and is replaced by one of the inner options separated by vertical bars or plectrums.
This time there will be 4 variants for the first group of words and they are interspersed with the 4 from the second group, which leaves us with 16 different ways of saying “You are beautiful” or something very similar.
Internal groups
A popular trick is to use inner groups. These inner groups give a higher level of variability to the texts since one option ceases to be an option and becomes many.
Let’s modify the previous example:
{You’re|You are|You look} {awesome|{pretty|very} beautiful|pretty|impressive}
If you look carefully, you will see that in the second group, where before it said “very beautiful”, the word “very” was grouped with the word “pretty” and now more variants could appear. This brings the number of possible combinations from 16 to 20.
Empty options
One more basic technique, although super interesting, is to add empty options, that is, to group a word or sentence with… nothing…
I’ll show you:
{You’re|You are|You look} {awesome|{pretty|very|} beautiful|pretty|impressive}
Here is an option that did not exist before: “pretty”. Just like that, not too much, not too much… simply: pretty.