logicslab 15 Unverified User

Hi pals , I need a particular script for spun text generation:

We need to create a script that will generate a spun text using the data entered by the user, it can use JS/Ajax to make it user friendly. below you will see how the script will look like, you can add options if needed.. A spun text has the following style : {Hello|good afternoon}{how are you|how things are going}.So this script will allow the user to create addition fields and will add automatically at the output stage the "|" and the "{" and "}" signs.
The purpose of this script is to have a spun text that we can integrate in another tool which will generate many articles automatically with less duplication.

The script will have forms divided into :
Sentence 1
Sentence 1-1
Sentence 1-2
Sentence 1-3
Sentence 2
Sentence 2-1
Sentence 2-2
Sentence 2-3
Sentence 2-4
Sentence 1
Sentence 1-1
Sentence 1-2
Sentence 1-3
Sentence 1-4
Sentence 1-5

The user can click on a button to create an additional Block (Paragraph) where he can enter his sentences. Note that Sentence 1 is the original sentence and Sentence 1-1, Sentence 1-2... are alternatives to Sentence 1.
The script will have a button "Generate Spun Article" , by clicking on this button , the script will organize the content like the following according to previous example :
{Sentence 1| Sentence 1-1 | Sentence 1-2| Sentence 1-3}{Sentence 2| Sentence 2-2| Sentence 2-3| Sentence 2-4}
{Sentence 1| Sentence 1-1 | Sentence 1-2| Sentence 1-3| Sentence 1-4| Sentence 1-5}

- Sentence 1 of Paragraph1 is different from sentence 1 of Paragraph 2. it is provided in this fashion to simplify the things. but when coding it has to have a different id
- From an article to another we may have different numbers of paragraphs and sentences as well, so here the script will have to generate a new field by a simple click of the user on a button
- Sentences are separated by Pipes: "|"
- A group of sentences compose a Paragraph, the paragraph starts with "{" and ends with "}"
- the "+ Sentence" will generate an additional sentence field for that paragraph
- the "+ SubSentence" will generate an additional sub sentence for the main sentence
- The "+ Paragraph" will generate a new Paragraph.
in other words we have 3 levels : Paragraph, Sentences and Sub-Sentences

Let's take and example and see how the script looks

Simple Example of Articles : This has 3 paragraphs with first paragraph having 2 sentences :
I eat banana everyday. It is the best fruit ever

I like eating fruits in the morning.

they are good for health

I attach the design of that concept as txt file (HTML source), Please refer it and give me a solution ASAP.


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.