Wordsplain API version 2023-03-30 14:15 PM GMT

This PHP file is performing an AJAX request to http://wordsplain.com/wordsplainapi.php. View hit data; refresh page to update.


 | 




Insert sample text 1 | Insert sample text 2



Raw data POSTed to the API:
This will be replaced by the API output once you submit some text.
Raw API response:
This will be replaced by the API output once you submit some text.
Readable response:
This will be replaced by the API output once you submit some text.

Documentation

This web page you are reading right now contains javascript code which posts a variable named "wdata" (which contains a JSON object) to http://wordsplain.com/wordsplainapi.php after you populate the yellow text box and click Submit:

Here are the input and response parameters. Required parameters are marked with "REQUIRED":

Input parameters
NameDescriptionPossible values
dText string to be analyzed. REQUIRED.(Any text string.)
qmaxMaximum number of questions returned (optional; if not desired, you may omit entirely or include with no data)blank (to be ignored), or a number from 1-999
vocabGenerate vocabulary questionsY,N
clozeGenerate cloze passageY,N
clozelevelMinimum difficulty level of cloze words. (1=include all hard words ... 5=include only the hardest words)1,2,3,4,5
mazeGenerate maze passageY,N
compGenerate comprehension questionsY,N
lexityGenerate text complexity statisticsY,N

 


 

Response parameters
NameDescriptionPossible values
rcountVariable deprecated. It is no longer present in the API response.(Any text string.)
question_objectsArray of multiple-choice test question objects (see table below)(Varies.)
cloze_passage_bankArray of difficult words that were replaced with underscores in the text; the array is sorted alphabetically.Text array
cloze_passage_textOriginal text with difficult words (listed in cloze_passage_bank) replaced with eight underscores.Varies if at least one cloze word was created, otherwise "X". If this value is "X", do not read the other cloze response parameters.
cloze_passage_keyOriginal text with difficult words (represented by underscores in cloze_passage_text) surrounded by [brackets].Varies if at least one cloze word was created, otherwise "X".
cloze_passage_answersArray of words replaced with underlines, in order.Text array
maze_passage_textOriginal text with every seventh word (except for the first sentence) replaced with three words, one of which is the original word and two of which are distractors. The position of the three words is randomized. The three words are separated by commas and surrounded by parentheses.Varies if at least one MAZE choice was created, otherwise "X". If this value is "X", do not read the other MAZE response parameters.
maze_passage_keySame as maze_passage_text but with original words in all UPPERCASE.Text array
maze_passage_answersArray of correct text responses to the maze passage, in order.Text array
complexity_statsArray of text complexity statistics (self-documenting).Varies. NOTE: The READ score and both Flesch measures are reliable only for text blocks which have 2 or more grammatically complete English sentences and which have more than 100 words.
Multiple-choice question object
NameDescriptionPossible values
Question_typeType of questionMultiple_choice
Question_domainArea of knowledge covered by the questionVocabulary
Human_ages
Job_titles
Attributable_quotes
Relationships
PromptWritten question prompt for user(Varies.)
WordPresent for vocabulary questions only. Specific word or phrase being tested.(Varies.)
DifficultyPresent for vocabulary questions only. Word or phrase difficulty level based on frequency within Brigham Young University's 450-million-word Corpus of Contemporary American English. Phrases are rated by most difficult word within phrase. Divided into quintiles. 1=easiest (most frequently seen) through 5=hardest (least frequently seen)1,2,3,4,5
CorrectCorrect answer (zero-based)0,1,2,3,4
ChoicesArray of answer choices(Varies.)

Date        Count