Rephraser Text and Spintax

फ्रीमियम
द्वारा MP Apis | अपडेट किया गया il y a 2 mois | Text Analysis
लोकप्रियता

5.5 / 10

लेटेंसी

494ms

सेवा का स्तर

100%

Health Check

N/A

सभी चर्चाओं पर वापस जाएं

New Endpoint Requested = Spintax decode

Rapid account: Darylledyard
darylledyard
il y a un an

Can you get me a decode spintax endpoint? Allow HTML to stay intact or just plain text on input?

This would be a great help.

I just purched and I want to use it in my app.

Daryl

Rapid account: Micaelbh
micaelbh Commented il y a un an

We will soon add the endpoint to process the spintax, but you can use the code below to process the spintax in order to choose the available options in javascript:

var text = '{{Hello|Hi|Hola}, How {have you been|are you doing}? ’ + ‘Take care. {{Thanks and|Best} Regards|Cheers|Thanks}’;

var matches, options, random;

var regEx = new RegExp(/{([^{}]+?)}/);

while ((matches = regEx.exec(text)) !== null) {
options = matches[1].split(’|’);
random = Math.floor(Math.random() * options.length);
text = text.replace(matches[0], options[random]);
}

console.log(text);

Rapid account: Micaelbh
micaelbh Commented il y a un an

Hello!

Yes, we can, but can you give us an example so we can do the best for you?

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें