G GCOINC Guest Dec 12, 2012 #1 HEY YA'LL, Currently doing some silly stuff like this > Code: Copy rndnames = Regex.Split("\|", "Jimmy|Jane|Jen|Jimbo|James|Janet|Hey Skunk|Hey Barzina") rndname = rndnames(Rnd(1,rndnames.Length)) Is there a special someone out there who can lend a hand with a proper 'spintax' module or piece of codey goodness? Sorry 'nested spintax' would be the boss! Example of spintax here... Code: Copy {Hey|Yo|Good day|Btw|Hiya|Heya|Howdy|Whats up|Hello|Hi|Guess what|Sup|} {Chung|Chen| Melton|Hill|Puckett|Song|Hamilton|Bender} your {funny|witty|strange|fantastic} {dude|guy|man|bloke|{buster|nested area here}} :sign0104: Last edited by a moderator: Dec 12, 2012
HEY YA'LL, Currently doing some silly stuff like this > Code: Copy rndnames = Regex.Split("\|", "Jimmy|Jane|Jen|Jimbo|James|Janet|Hey Skunk|Hey Barzina") rndname = rndnames(Rnd(1,rndnames.Length)) Is there a special someone out there who can lend a hand with a proper 'spintax' module or piece of codey goodness? Sorry 'nested spintax' would be the boss! Example of spintax here... Code: Copy {Hey|Yo|Good day|Btw|Hiya|Heya|Howdy|Whats up|Hello|Hi|Guess what|Sup|} {Chung|Chen| Melton|Hill|Puckett|Song|Hamilton|Bender} your {funny|witty|strange|fantastic} {dude|guy|man|bloke|{buster|nested area here}} :sign0104:
Erel B4X founder Staff member Licensed User Longtime User Dec 16, 2012 #3 http://www.b4x.com/forum/basic4android-updates-questions/24333-quiz-4-text-spintax.html#post140820 I will post my answer in a day or two. Upvote 0
http://www.b4x.com/forum/basic4android-updates-questions/24333-quiz-4-text-spintax.html#post140820 I will post my answer in a day or two.
G GCOINC Guest Dec 18, 2012 #4 Looks good, however in most instances where we use spintax an entire list of all possible spins in not always required, normally an action is performed in a loop which pulls a new version (spintax) of the text in each pass. Another method which can be implemented is a regular simple sentence or paragraph is input. sentence = "John walks his dog" This simple sentence is processed through a 'synonyms' DB or similar and 'spits out' processed spintax. result = "{John|Jon|Johnathan} {walks|runs|skips|jogs} his {dog|k9|mutt|puppy}" The 'synonyms' can be filtered on a scale from 'accurate', 'average' or 'slightly inaccurate' to get more/less total spintax. Great stuff anyways, having a 'spintax' command for strings or blocks would be top notch if possible for b4a. Upvote 0
Looks good, however in most instances where we use spintax an entire list of all possible spins in not always required, normally an action is performed in a loop which pulls a new version (spintax) of the text in each pass. Another method which can be implemented is a regular simple sentence or paragraph is input. sentence = "John walks his dog" This simple sentence is processed through a 'synonyms' DB or similar and 'spits out' processed spintax. result = "{John|Jon|Johnathan} {walks|runs|skips|jogs} his {dog|k9|mutt|puppy}" The 'synonyms' can be filtered on a scale from 'accurate', 'average' or 'slightly inaccurate' to get more/less total spintax. Great stuff anyways, having a 'spintax' command for strings or blocks would be top notch if possible for b4a.