This PHP file is performing an AJAX request to http://wordsplain.com/wordsplainapi.php. View hit data; refresh page to update.
|
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 | ||
---|---|---|
Name | Description | Possible values |
d | Text string to be analyzed. REQUIRED. | (Any text string.) |
qmax | Maximum 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 |
vocab | Generate vocabulary questions | Y,N |
cloze | Generate cloze passage | Y,N |
clozelevel | Minimum difficulty level of cloze words. (1=include all hard words ... 5=include only the hardest words) | 1,2,3,4,5 |
maze | Generate maze passage | Y,N |
comp | Generate comprehension questions | Y,N |
lexity | Generate text complexity statistics | Y,N |
Response parameters | ||
---|---|---|
Name | Description | Possible values |
rcount | Variable deprecated. It is no longer present in the API response. | (Any text string.) |
question_objects | Array of multiple-choice test question objects (see table below) | (Varies.) |
cloze_passage_bank | Array of difficult words that were replaced with underscores in the text; the array is sorted alphabetically. | Text array |
cloze_passage_text | Original 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_key | Original 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_answers | Array of words replaced with underlines, in order. | Text array |
maze_passage_text | Original 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_key | Same as maze_passage_text but with original words in all UPPERCASE. | Text array |
maze_passage_answers | Array of correct text responses to the maze passage, in order. | Text array |
complexity_stats | Array 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 | ||
---|---|---|
Name | Description | Possible values |
Question_type | Type of question | Multiple_choice |
Question_domain | Area of knowledge covered by the question | Vocabulary Human_ages Job_titles Attributable_quotes Relationships |
Prompt | Written question prompt for user | (Varies.) |
Word | Present for vocabulary questions only. Specific word or phrase being tested. | (Varies.) |
Difficulty | Present 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 |
Correct | Correct answer (zero-based) | 0,1,2,3,4 |
Choices | Array of answer choices | (Varies.) |