Download OpenAPI specification:
This document describes the current programmatic API (version 2) that is made available to some users
of the Text Inspector product created by WebLingua.
The document is intended for a technical
audience, and assumes an understanding of RESTful APIs, HTTPS, JSON and other technical details.
To analyse a piece of text and obtain the analysis results for the different Text Inspector parsers
requires multiple requests to be made to the API.
You first need to authenticate with the API to
create a user session (createsession) and obtain a “sessionid”. That “sessionid” is then passed in all
subsequent API requests.
During a session you can submit any number of texts for analysis - if
you want to analyse multiple texts you do not need to create a new session for each.
Once you
have a session you then submit your text for analysis. On successful submission of your text you will be
returned what we call a “context id” (or “ctxId”). This context id is unique for that piece of texts
analysis in your session, and is used for obtaining the analysis results from the different Text
Inspector parsers.
Once you have a context id you would then request the results from the
parser(s) that you are wanting the analysis results for.
An example flow of API requests might
be:
1. Create session and obtain your “sessionid”.
2. Submit new text for analysis and obtain
the analysis “ctxId”.
3. Get statistics parser results.
4. Get tagger parser results.
5.
Submit second text for analysis and obtain the analysis “ctxId”.
6. Get scorecard parser results
7. etc.
For more information or to discuss getting access to the Text Inspector API, please
contact your Web Lingua or Text Inspector account manager, or mail the Text Inspector help team textinspectorhelpteam@gmail.com
To use the API you need to first authenticate with the API to create a user session - doing this
will return you a sessionid. That session ID needs to be remembered and passed as a cookie header to
all subsequent requests in the session.
During a session you can analyse and get the results
for any number of different texts.
To authenticate and get the Session ID you have to make a
createsession API call
Authentication is done with HTTP Basic Authentication, and as such you
can supply the username/password either inline in the URL, or in an “Authentication” HTTP header.
| encoded_string |
string
Example: encoded_string=base64_encode(test@example.com:abc!123)
To send the username/password in an “Authentication” HTTP header the username and password need to be concatenated with a colon (“:”) and then Base64 encoded. |
curl -X GET “https://textinspector.com/api/v2/createsession" -H "accept: application/json" -H "Authorization: Basic {encoded_string}" -L
{- "success": 1,
- "sessionid": "731999172284994221689694364605242328"
}
Submit a document for processing.
You can submit one or multiple texts at the same time.
If submitting multiple texts then they should be separated by a “delimiter” character (specified in
the request, defaulting to “#”), and the “split” parameter should be set to “1”.
The
“newanalysis” API call returns a ctxId and the count of the number of documents processed. Use the
ctxId and appropriate document number(s) in subsequent requests to get results from different
parsers.
Body request: JSON data that must be sent.
| text
required
|
string
The document text to process. |
| delimiter |
string
Character used to split multiple documents in the text. |
| split |
string
If it is |
| textmode |
string
Enum: "Writing" "Reading" "Listening"
Analysis mode ( |
{- "text": "Try+the+tool+out+with+this+paragraph+of+text...",
- "delimiter": "%23",
- "split": "1",
- "textmode": "Writing"
}
{- "response": {
- "ctxId": "AFD52E08-4DD5-11E8-9E8C-26C6F64FBF04",
- "doc_count": 2,
- "resultType": "api_start",
- "errors": [ ]
}, - "name": "api_start",
- "type": "api_start"
}
Get the results for the “Statistics” parser
| ctxID |
string
Example: ctxID=AC07A97C-9C1C-11E9-AB5C-DDF6D7F2BACF
The Context ID to be processed. |
| docNum |
string
Example: docNum=1
Number of document to be processed. |
curl -X GET "https://textinspector.com/api/v2/{ctxID}/doc{docNum}/statistics" -H "accept: application/json" -H "Cookie: textinspector.session={sessionid};" -L
{- "name": "Statistics",
- "type": "statistics",
- "response": {
- "ctxId": "AC07A97C-9C1C-11E9-AB5C-DDF6D7F2BACF",
- "summary": {
- "avgSentenceLength": {
- "friendlyName": "Average sentence length (words)",
- "value": "16.67"
}, - "tokenCount": {
- "value": "100",
- "friendlyName": "Token count (excluding numbers)"
}, - "wordsMoreThanTwoSyllablesPercentage": {
- "friendlyName": "Words with more than 2 syllablesPercentage",
- "value": "10.00"
}, - "sentenceCount": {
- "value": "6",
- "friendlyName": "Sentence Count"
}, - "syllablesPerHundredWords": {
- "friendlyName": "Syllables per 100 words",
- "value": "146.00"
}, - "averageSyllablesPerSentence": {
- "friendlyName": "Average syllables per sentence",
- "value": "24.33"
}, - "excludeDigits": {
- "friendlyName": "Digits Excluded?",
- "value": "false"
}, - "typeTokenRatio": {
- "value": "0.69",
- "friendlyName": "Type/token ratio"
}, - "wordsMoreThanTwoSyllables": {
- "value": "10",
- "friendlyName": "Words with more than 2 syllables"
}, - "numberCount": {
- "value": "0",
- "friendlyName": "Number Count"
}, - "averageSyllablesPerWord": {
- "value": "1.46",
- "friendlyName": "Average syllables per word"
}, - "syllableCount": {
- "friendlyName": "Syllable Count",
- "value": "146"
}, - "totalDigitsCount": {
- "friendlyName": "Total Digits Count",
- "value": "0"
}, - "typeCount": {
- "value": "69",
- "friendlyName": "Type count (unique tokens, excluding numbers)"
}
}, - "documentId": "doc1",
- "readabilityScores": {
- "gunningFogIndex": {
- "friendlyName": "Gunning Fog index",
- "value": "10.67"
}, - "friendlyName": "Readability Scores",
- "fleschReadingEase": {
- "value": "66.40",
- "friendlyName": "Flesch Reading Ease"
}, - "fleschKincaidGrade": {
- "friendlyName": "Flesch-Kincaid Grade",
- "value": "8.14"
}
}
}, - "exists": 1
}
Get the results for the “Lexical Diversity” parser
| ctxID |
string
Example: ctxID=13C2AB3E-9C1D-11E9-AB5C-DDF6D7F2BACF
The Context ID to be processed. |
| docNum |
string
Example: docNum=1
Number of document to be processed. |
curl -X GET "https://textinspector.com/api/v2/{ctxID}/doc{docNum}/diversity" -H "accept: application/json" -H "Cookie: textinspector.session={sessionid};" -L
{- "exists": 1,
- "response": {
- "ctxId": "13C2AB3E-9C1D-11E9-AB5C-DDF6D7F2BACF",
- "lexicalDiversity": {
- "friendlyName": "Lexical Diversity",
- "vocd": {
- "value": "79.91",
- "friendlyName": "VOCD Lexical Diversity"
}, - "mtld": {
- "friendlyName": "MTLD Lexical Diversity",
- "value": "65.68"
}
}, - "documentId": "doc1"
}, - "type": "diversity",
- "name": "Lexical Diversity"
}
Get the results for the “Tagger” parser
| ctxID |
string
Example: ctxID=39A03A6A-9C1D-11E9-AB5C-DDF6D7F2BACF
The Context ID to be processed. |
| docNum |
string
Example: docNum=1
Number of document to be processed. |
curl -X GET "https://textinspector.com/api/v2/{ctxID}/doc{docNum}/tagger" -H "accept: application/json" -H "Cookie: textinspector.session={sessionid};" -L
{- "type": "tagger",
- "name": "Tagger",
- "exists": 1,
- "response": {
- "documentId": "doc1",
- "ctxId": "39A03A6A-9C1D-11E9-AB5C-DDF6D7F2BACF",
- "partsOfSpeech": {
- "vvg": {
- "friendlyName": "VVG",
- "description": "verb, gerund/participle",
- "uniqueTokens": {
- "friendlyName": "Unique Tokens",
- "value": "3"
}, - "tokens": {
- "friendlyName": "Tokens",
- "value": "5"
}
}, - "vbz": {
- "friendlyName": "VBZ",
- "description": "verb be, pres, 3rd p. sing",
- "uniqueTokens": {
- "friendlyName": "Unique Tokens",
- "value": "1"
}, - "tokens": {
- "friendlyName": "Tokens",
- "value": "2"
}
}, - "co": {
- "friendlyName": "CO",
- "description": "coordinating conjunction",
- "uniqueTokens": {
- "friendlyName": "Unique Tokens",
- "value": "3"
}, - "tokens": {
- "friendlyName": "Tokens",
- "value": "9"
}
}, - "nn": {
- "friendlyName": "NN",
- "description": "noun, singular or mass",
- "uniqueTokens": {
- "friendlyName": "Unique Tokens",
- "value": "15"
}, - "tokens": {
- "friendlyName": "Tokens",
- "value": "20"
}
}, - "md": {
- "friendlyName": "MD",
- "description": "modal",
- "uniqueTokens": {
- "friendlyName": "Unique Tokens",
- "value": "1"
}, - "tokens": {
- "friendlyName": "Tokens",
- "value": "1"
}
}, - "to": {
- "friendlyName": "TO",
- "description": "to",
- "uniqueTokens": {
- "friendlyName": "Unique Tokens",
- "value": "1"
}, - "tokens": {
- "friendlyName": "Tokens",
- "value": "2"
}
}, - "vvn": {
- "friendlyName": "VVN",
- "description": "verb, past participle",
- "uniqueTokens": {
- "friendlyName": "Unique Tokens",
- "value": "1"
}, - "tokens": {
- "friendlyName": "Tokens",
- "value": "1"
}
}, - "vv": {
- "friendlyName": "VV",
- "description": "verb, base form",
- "uniqueTokens": {
- "friendlyName": "Unique Tokens",
- "value": "7"
}, - "tokens": {
- "friendlyName": "Tokens",
- "value": "7"
}
}, - "uh": {
- "friendlyName": "UH",
- "description": "interjection",
- "uniqueTokens": {
- "friendlyName": "Unique Tokens",
- "value": "1"
}, - "tokens": {
- "friendlyName": "Tokens",
- "value": "1"
}
}, - "dt": {
- "friendlyName": "DT",
- "description": "determiner",
- "uniqueTokens": {
- "friendlyName": "Unique Tokens",
- "value": "3"
}, - "tokens": {
- "friendlyName": "Tokens",
- "value": "5"
}
}, - "nps": {
- "friendlyName": "NPS",
- "description": "proper noun, plural",
- "uniqueTokens": {
- "friendlyName": "Unique Tokens",
- "value": "1"
}, - "tokens": {
- "friendlyName": "Tokens",
- "value": "1"
}
}, - "vvz": {
- "friendlyName": "VVZ",
- "description": "verb, present 3d p. sing.",
- "uniqueTokens": {
- "friendlyName": "Unique Tokens",
- "value": "1"
}, - "tokens": {
- "friendlyName": "Tokens",
- "value": "1"
}
}, - "nns": {
- "friendlyName": "NNS",
- "description": "noun plural",
- "uniqueTokens": {
- "friendlyName": "Unique Tokens",
- "value": "5"
}, - "tokens": {
- "friendlyName": "Tokens",
- "value": "7"
}
}, - "in": {
- "friendlyName": "IN",
- "description": "preposition/subord. conj.",
- "uniqueTokens": {
- "friendlyName": "Unique Tokens",
- "value": "7"
}, - "tokens": {
- "friendlyName": "Tokens",
- "value": "12"
}
}, - "rb": {
- "friendlyName": "RB",
- "description": "adverb",
- "uniqueTokens": {
- "friendlyName": "Unique Tokens",
- "value": "5"
}, - "tokens": {
- "friendlyName": "Tokens",
- "value": "5"
}
}, - "qq": {
- "friendlyName": "QQ",
- "description": "particle",
- "uniqueTokens": {
- "friendlyName": "Unique Tokens",
- "value": "1"
}, - "tokens": {
- "friendlyName": "Tokens",
- "value": "1"
}
}, - "jj": {
- "friendlyName": "JJ",
- "description": "adjective",
- "uniqueTokens": {
- "friendlyName": "Unique Tokens",
- "value": "6"
}, - "tokens": {
- "friendlyName": "Tokens",
- "value": "6"
}
}, - "pp": {
- "friendlyName": "PP$",
- "description": "possessive pronoun",
- "uniqueTokens": {
- "friendlyName": "Unique Tokens",
- "value": "2"
}, - "tokens": {
- "friendlyName": "Tokens",
- "value": "3"
}
}, - "dat": {
- "friendlyName": "DAT",
- "description": "determiner, article",
- "uniqueTokens": {
- "friendlyName": "Unique Tokens",
- "value": "1"
}, - "tokens": {
- "friendlyName": "Tokens",
- "value": "3"
}
}, - "np": {
- "friendlyName": "NP",
- "description": "proper noun, singular",
- "uniqueTokens": {
- "friendlyName": "Unique Tokens",
- "value": "4"
}, - "tokens": {
- "friendlyName": "Tokens",
- "value": "5"
}
}
}, - "summary": {
- "elements": {
- "friendlyName": "Elements (includes homonyms)",
- "value": "72"
}, - "coverageNotCounted": {
- "friendlyName": "Coverage- Not Counted",
- "value": "0"
}, - "totalNounElements": {
- "friendlyName": "Total Noun Elements",
- "value": "25"
}, - "types": {
- "friendlyName": "Types (unique items)",
- "value": "69"
}, - "totalVerbalElements": {
- "friendlyName": "Total Verbal Elements",
- "value": "14"
}, - "tokenRatio": {
- "friendlyName": "Type/token ratio",
- "value": "0.69"
}, - "tokens": {
- "friendlyName": "Tokens (total items)",
- "value": "100"
}, - "verbalElementsPerSentence": {
- "friendlyName": "Verbal Elements per Sentence",
- "value": "2.33"
}, - "tokensPerType": {
- "friendlyName": "Tokens per type",
- "value": "1.45"
}, - "coverageCounted": {
- "friendlyName": "Coverage- Counted",
- "value": "100"
}, - "coverage": {
- "friendlyName": "Coverage",
- "value": "100.00"
}, - "nounElementsPerSentence": {
- "friendlyName": "Noun Elements per Sentence",
- "value": "4.17"
}
}
}
}
Get the results for the “Metadiscourse” parser
| ctxID |
string
Example: ctxID=AC07A97C-9C1C-11E9-AB5C-DDF6D7F2BACF
The Context ID to be processed. |
| docNum |
string
Example: docNum=1
Number of document to be processed. |
curl -X GET "https://textinspector.com/api/v2/{ctxID}/doc{docNum}/metadiscourse" -H "accept: application/json" -H "Cookie: textinspector.session={sessionid};" -L
{- "type": "metadiscourse",
- "name": "Metadiscourse",
- "exists": 1,
- "response": {
- "documentId": "doc1",
- "summary": {
- "unlisted": {
- "tokensPercent": {
- "value": "86.00",
- "friendlyName": "Tokens Percent"
}, - "friendlyName": "Unlisted",
- "types": {
- "value": "62",
- "friendlyName": "Types"
}, - "tokens": {
- "value": "86",
- "friendlyName": "Tokens"
}, - "typesPercent": {
- "value": "89.86",
- "friendlyName": "Types Percent"
}
}, - "personMarker": {
- "tokensPercent": {
- "value": "1.00",
- "friendlyName": "Tokens Percent"
}, - "friendlyName": "Person marker",
- "tokens": {
- "friendlyName": "Tokens",
- "value": "1"
}, - "types": {
- "value": "1",
- "friendlyName": "Types"
}, - "typesPercent": {
- "value": "1.45",
- "friendlyName": "Types Percent"
}
}, - "total": {
- "friendlyName": "Totals",
- "tokensPercent": {
- "friendlyName": "Tokens Percent",
- "value": "14.00"
}, - "typesPercent": {
- "value": "10.14",
- "friendlyName": "Types Percent"
}, - "types": {
- "value": "7",
- "friendlyName": "Types"
}, - "tokens": {
- "value": "14",
- "friendlyName": "Tokens"
}
}, - "endophoric": {
- "types": {
- "value": "1",
- "friendlyName": "Types"
}, - "tokens": {
- "friendlyName": "Tokens",
- "value": "1"
}, - "typesPercent": {
- "friendlyName": "Types Percent",
- "value": "1.45"
}, - "tokensPercent": {
- "friendlyName": "Tokens Percent",
- "value": "1.00"
}, - "friendlyName": "Endophoric"
}, - "logicalConnective": {
- "typesPercent": {
- "friendlyName": "Types Percent",
- "value": "4.35"
}, - "tokens": {
- "value": "9",
- "friendlyName": "Tokens"
}, - "types": {
- "friendlyName": "Types",
- "value": "3"
}, - "friendlyName": "Logical connective",
- "tokensPercent": {
- "friendlyName": "Tokens Percent",
- "value": "9.00"
}
}, - "relationalMarker": {
- "tokens": {
- "value": "3",
- "friendlyName": "Tokens"
}, - "types": {
- "value": "2",
- "friendlyName": "Types"
}, - "typesPercent": {
- "friendlyName": "Types Percent",
- "value": "2.90"
}, - "tokensPercent": {
- "value": "3.00",
- "friendlyName": "Tokens Percent"
}, - "friendlyName": "Relational marker"
}
}, - "ctxId": "695AB398-9C1D-11E9-AB5C-DDF6D7F2BACF"
}
}
Get the results for the “Scorecard” parser
| ctxID |
string
Example: ctxID=9B4B3D80-9C1F-11E9-8312-C7672007AC3E
The Context ID to be processed. |
| docNum |
string
Example: docNum=1
Number of document to be processed. |
curl -X GET "https://textinspector.com/api/v2/{ctxID}/doc{docNum}/scorecard" -H "accept: application/json" -H "Cookie: textinspector.session={sessionid};" -L
{- "example": {
- "type": "scorecard",
- "name": "Scorecard",
- "exists": 1,
- "response": {
- "documentId": "doc1",
- "overallRating": {
- "friendlyName": "Overall Rating",
- "cefrLevel": "C1",
- "percentage": "62.92",
- "numberOfMetricsUsed": "16"
}, - "scoreCard": {
- "lexicalSophistication": {
- "evpPercentOfWordsTypesAtA1Level": {
- "friendlyName": "EVP: % of words (types) at A1 level",
- "cefrLevel": "C1+"
}, - "evpPercentOfWordsTypesAtB1Level": {
- "friendlyName": "EVP: % of words (types) at B1 level",
- "cefrLevel": "B2"
}, - "evpPercentOfWordsTokensAtB2Level": {
- "friendlyName": "EVP: % of words (tokens) at B2 level",
- "cefrLevel": "C2"
}, - "cocaMeanLfcPerType": {
- "friendlyName": "COCA mean LFC per type",
- "cefrLevel": "C1+"
}, - "evpPercentOfWordsTypesAtB2Level": {
- "friendlyName": "EVP: % of words (types) at B2 level",
- "cefrLevel": "C2"
}, - "evpPercentOfWordsTokensAtA1Level": {
- "friendlyName": "EVP: % of words (tokens) at A1 level",
- "cefrLevel": "C2"
}, - "friendlyName": "Lexical Sophistication"
}, - "lexicalSophisticationAcademic": {
- "awlList1TypesPercent": {
- "friendlyName": "AWL list 1 Types %",
- "cefrLevel": "C2"
}, - "awlList1TokensPercent": {
- "friendlyName": "AWL list 1 Tokens %",
- "cefrLevel": "C2"
}, - "academicWordListPercentOfAllAwlWordsTokensInTheText": {
- "friendlyName": "Academic Word List: % of all AWL words (tokens) in the text",
- "cefrLevel": "C2"
}, - "academicWordListPercentOfAllAwlWordsTypesInTheText": {
- "friendlyName": "Academic Word List: % of all AWL words (types) in the text",
- "cefrLevel": "C2"
}, - "friendlyName": "Lexical Sophistication (academic)"
}, - "statistics": {
- "averageSyllablesPerWord": {
- "friendlyName": "Average Syllables per word",
- "cefrLevel": "C2"
}, - "averageWordsPerSentence": {
- "friendlyName": "Average words per sentence",
- "cefrLevel": "B1+"
}
}, - "readability": {
- "fleschKincaidReadingGrade": {
- "friendlyName": "Flesch Kincaid Reading Grade",
- "cefrLevel": "C1"
}, - "gunningFog": {
- "friendlyName": "Gunning Fog",
- "cefrLevel": "C1"
}, - "fleschKincaidReadingEase": {
- "friendlyName": "Flesch Kincaid Reading Ease",
- "cefrLevel": "C1+"
}, - "friendlyName": "Readability"
}, - "lexicalDiversity": {
- "lexicalDiversityMtld": {
- "friendlyName": "Lexical Diversity (MTLD)",
- "cefrLevel": "A1+"
}, - "friendlyName": "Lexical Diversity"
}, - "friendlyName": "Score Card"
}, - "ctxId": "9B4B3D80-9C1F-11E9-8312-C7672007AC3E"
}
}
}
Get the results for the overall rating only from the “Scorecard” parser.
| ctxID |
string
Example: ctxID=400A816C-9D6C-11E9-8312-C7672007AC3E
The Context ID to be processed. |
| docNum |
string
Example: docNum=1
Number of document to be processed. |
curl -X GET "https://textinspector.com/api/v2/{ctxID}/doc{docNum}/scorecardrating" -H "accept: application/json" -H "Cookie: textinspector.session={sessionid};" -L
{- "example": {
- "type": "scorecard",
- "name": "Scorecard",
- "exists": 1,
- "response": {
- "ctxId": "400A816C-9D6C-11E9-8312-C7672007AC3E",
- "documentId": "doc1",
- "overallRating": {
- "friendlyName": "Overall Rating",
- "cefrLevel": "C1",
- "percentage": "62.92",
- "numberOfMetricsUsed": "16"
}
}
}
}
Get the results for the “Lexical:EVP” parser
| ctxID |
string
Example: ctxID=21B42CDE-9C1F-11E9-8312-C7672007AC3E
The Context ID to be processed. |
| docNum |
string
Example: docNum=1
Number of document to be processed. |
curl -X GET "https://textinspector.com/api/v2/{ctxID}/doc{docNum}/taggedlexical-bnc" -H "accept: application/json" -H "Cookie: textinspector.session={sessionid};" -L
{- "example": {
- "type": "lexical",
- "name": "Lexis: EVP",
- "exists": 1,
- "response": {
- "documentId": "doc1",
- "summary": {
- "a1": {
- "typesPercent": {
- "value": "48.53%",
- "friendlyName": "Types Percent"
}, - "friendlyName": "A1",
- "types": {
- "value": "33",
- "friendlyName": "Types"
}, - "tokens": {
- "value": "56",
- "friendlyName": "Tokens"
}, - "tokensPercent": {
- "value": "57.14%",
- "friendlyName": "Tokens Percent"
}
}, - "a2": {
- "typesPercent": {
- "value": "22.06%",
- "friendlyName": "Types Percent"
}, - "friendlyName": "A2",
- "tokensPercent": {
- "value": "22.45%",
- "friendlyName": "Tokens Percent"
}, - "types": {
- "friendlyName": "Types",
- "value": "15"
}, - "tokens": {
- "friendlyName": "Tokens",
- "value": "22"
}
}, - "b1": {
- "friendlyName": "B1",
- "typesPercent": {
- "friendlyName": "Types Percent",
- "value": "10.29%"
}, - "tokens": {
- "value": "7",
- "friendlyName": "Tokens"
}, - "types": {
- "friendlyName": "Types",
- "value": "7"
}, - "tokensPercent": {
- "friendlyName": "Tokens Percent",
- "value": "7.14%"
}
}, - "b2": {
- "tokens": {
- "friendlyName": "Tokens",
- "value": "6"
}, - "types": {
- "friendlyName": "Types",
- "value": "6"
}, - "tokensPercent": {
- "value": "6.12%",
- "friendlyName": "Tokens Percent"
}, - "friendlyName": "B2",
- "typesPercent": {
- "friendlyName": "Types Percent",
- "value": "8.82%"
}
}, - "c1": {
- "tokensPercent": {
- "value": "1.02%",
- "friendlyName": "Tokens Percent"
}, - "tokens": {
- "friendlyName": "Tokens",
- "value": "1"
}, - "types": {
- "friendlyName": "Types",
- "value": "1"
}, - "friendlyName": "C1",
- "typesPercent": {
- "value": "1.47%",
- "friendlyName": "Types Percent"
}
}, - "unlisted": {
- "tokens": {
- "friendlyName": "Tokens",
- "value": "6"
}, - "types": {
- "value": "6",
- "friendlyName": "Types"
}, - "tokensPercent": {
- "value": "6.12%",
- "friendlyName": "Tokens Percent"
}, - "friendlyName": "Unlisted",
- "typesPercent": {
- "friendlyName": "Types Percent",
- "value": "8.82%"
}
}
}, - "ctxId": "21B42CDE-9C1F-11E9-8312-C7672007AC3E"
}
}
}
Get the results for the “Lexical:BNC” parser
| ctxID |
string
Example: ctxID=4FA10FD2-9C1E-11E9-8312-C7672007AC3E
The Context ID to be processed. |
| docNum |
string
Example: docNum=1
Number of document to be processed. |
curl -X GET "https://textinspector.com/api/v2/{ctxID}/doc{docNum}/taggedlexical-bnc" -H "accept: application/json" -H "Cookie: textinspector.session={sessionid};" -L
{- "type": "taggedlexical-bnc",
- "name": "Lexis: BNC",
- "exists": 1,
- "response": {
- "documentId": "doc1",
- "summary": {
- "percentileTokens70th": {
- "value": "2580",
- "friendlyName": "70th Percentile (tokens)"
}, - "percentileTokens80th": {
- "value": "3170",
- "friendlyName": "80th Percentile (tokens)"
}, - "percentileTokens60th": {
- "value": "1390",
- "friendlyName": "60th Percentile (tokens)"
}, - "meanLFCPerToken": {
- "value": "2056.73",
- "friendlyName": "Mean LFC per token"
}, - "percentileTypes60th": {
- "value": "1120",
- "friendlyName": "60th Percentile (types)"
}, - "elementsIncludingHomonyms": {
- "value": "72",
- "friendlyName": "Elements (includes homonyms)"
}, - "percentileTypes80th": {
- "value": "3450",
- "friendlyName": "80th Percentile (types)"
}, - "percentileTypes70th": {
- "value": "2800",
- "friendlyName": "70th Percentile (types)"
}, - "totalLexicalTypesFrequencyCount": {
- "value": "164432",
- "friendlyName": "Total Lexical Frequency Count (types)"
}, - "totalTokenItems": {
- "value": "100",
- "friendlyName": "Tokens (total items)"
}, - "uniqueCountedItemTypes": {
- "value": "67",
- "friendlyName": "Types Counted (unique items)"
}, - "totalCountedTokensItems": {
- "value": "98",
- "friendlyName": "Tokens Counted (total items)"
}, - "totalLexicalTokensFrequencyCount": {
- "value": "201560",
- "friendlyName": "Total Lexical Frequency Count"
}, - "uniqueItemTypes": {
- "value": "69",
- "friendlyName": "Types (unique items)"
}, - "percentileTokens50th": {
- "value": "550",
- "friendlyName": "50th Percentile (tokens)"
}, - "meanLFCPer100Tokens": {
- "value": "205673.47",
- "friendlyName": "Mean LFC per 100 tokens"
}, - "percentileTypes50th": {
- "value": "540",
- "friendlyName": "50th Percentile (types)"
}, - "meanLFCPerType": {
- "value": "2383.07",
- "friendlyName": "Mean LFC per type"
}, - "coverageTokensCounted": {
- "value": "98",
- "friendlyName": "Coverage- Counted"
}, - "meanLFCPer100Types": {
- "value": "238307.25",
- "friendlyName": "Mean LFC per 100 types"
}, - "coverageTokensNotCounted": {
- "value": "2",
- "friendlyName": "Coverage-Not Counted"
}, - "coverage": {
- "value": "98.00",
- "friendlyName": "Coverage"
}
}, - "ctxId": "4FA10FD2-9C1E-11E9-8312-C7672007AC3E"
}
}
Get the results for the “Lexical:COCA” parser
| ctxID |
string
Example: ctxID=79426E30-9C1E-11E9-8312-C7672007AC3E
The Context ID to be processed. |
| docNum |
string
Example: docNum=1
Number of document to be processed. |
curl -X GET "https://textinspector.com/api/v2/{ctxID}/doc{docNum}/taggedlexical-coca" -H "accept: application/json" -H "Cookie: textinspector.session={sessionid};" -L
{- "example": {
- "name": "Lexis: COCA",
- "type": "taggedlexical-coca",
- "exists": 1,
- "response": {
- "ctxId": "79426E30-9C1E-11E9-8312-C7672007AC3E",
- "summary": {
- "totalCountedTokensItems": {
- "value": "98",
- "friendlyName": "Tokens Counted (total items)"
}, - "totalLexicalTokensFrequencyCount": {
- "value": "258734",
- "friendlyName": "Total Lexical Frequency Count (tokens)"
}, - "uniqueItemTypes": {
- "value": "69",
- "friendlyName": "Types (unique items)"
}, - "percentileTokens50th": {
- "value": "610",
- "friendlyName": "50th Percentile (tokens)"
}, - "meanLFCPer100Tokens": {
- "value": "264014.29",
- "friendlyName": "Mean LFC per 100 tokens"
}, - "percentileTypes50th": {
- "value": "550",
- "friendlyName": "50th Percentile (types)"
}, - "meanLFCPerType": {
- "value": "3208.65",
- "friendlyName": "Mean LFC per type"
}, - "coverageTokensCounted": {
- "value": "98",
- "friendlyName": "Coverage - Counted"
}, - "coverageTokensNotCounted": {
- "value": "2",
- "friendlyName": "Coverage - Not Counted"
}, - "meanLFCPer100Types": {
- "value": "320865.22",
- "friendlyName": "Mean LFC per 100 types"
}, - "coverage": {
- "value": "98.00",
- "friendlyName": "Coverage"
}, - "percentileTokens70th": {
- "value": "1720",
- "friendlyName": "70th Percentile (tokens)"
}, - "percentileTokens80th": {
- "value": "3080",
- "friendlyName": "80th Percentile (tokens)"
}, - "percentileTokens60th": {
- "value": "1540",
- "friendlyName": "60th Percentile (tokens)"
}, - "meanLFCPerToken": {
- "value": "2640.14",
- "friendlyName": "Mean LFC per token"
}, - "percentileTypes60th": {
- "value": "1090",
- "friendlyName": "60th Percentile (types)"
}, - "elementsIncludingHomonyms": {
- "value": "72",
- "friendlyName": "Elements (includes homonyms)"
}, - "percentileTypes80th": {
- "value": "3260",
- "friendlyName": "80th Percentile (types)"
}, - "percentileTypes70th": {
- "value": "1950",
- "friendlyName": "70th Percentile (types)"
}, - "totalLexicalTypesFrequencyCount": {
- "value": "221397",
- "friendlyName": "Total Lexical Frequency Count (types)"
}, - "totalTokenItems": {
- "value": "100",
- "friendlyName": "Tokens (total items)"
}, - "uniqueCountedItemTypes": {
- "value": "67",
- "friendlyName": "Types Counted (unique items)"
}
}, - "documentId": "doc1"
}
}
}
Get the results for the “Lexical:AWL parser
| ctxID |
string
Example: ctxID=D8A74472-9C1E-11E9-8312-C7672007AC3E
The Context ID to be processed. |
| docNum |
string
Example: docNum=1
Number of document to be processed. |
curl -X GET "https://textinspector.com/api/v2/{ctxID}/doc{docNum}/academicwordlist" -H "accept: application/json" -H "Cookie: textinspector.session={sessionid};" -L
{- "example": {
- "name": "Lexis: AWL",
- "type": "academicwordlist",
- "exists": 1,
- "response": {
- "documentId": "doc1",
- "ctxId": "D8A74472-9C1E-11E9-8312-C7672007AC3E",
- "summary": {
- "unlisted": {
- "friendlyName": "Unlisted",
- "tokensPercent": {
- "value": "83.00",
- "friendlyName": "Tokens Percent"
}, - "types": {
- "value": "59",
- "friendlyName": "Types"
}, - "tokens": {
- "value": "83",
- "friendlyName": "Tokens"
}, - "typesPercent": {
- "value": "85.51",
- "friendlyName": "Types Percent"
}
}, - "awl4": {
- "friendlyName": "AWL 4",
- "types": {
- "value": "1",
- "friendlyName": "Types"
}, - "tokens": {
- "value": "1",
- "friendlyName": "Tokens"
}, - "tokensPercent": {
- "value": "1.00",
- "friendlyName": "Tokens Percent"
}, - "typesPercent": {
- "value": "1.45",
- "friendlyName": "Types Percent"
}
}, - "awl1": {
- "friendlyName": "AWL 1",
- "typesPercent": {
- "value": "2.90",
- "friendlyName": "Types Percent"
}, - "types": {
- "value": "2",
- "friendlyName": "Types"
}, - "tokens": {
- "value": "2",
- "friendlyName": "Tokens"
}, - "tokensPercent": {
- "value": "2.00",
- "friendlyName": "Tokens Percent"
}
}, - "awl2": {
- "friendlyName": "AWL 2",
- "tokens": {
- "value": "10",
- "friendlyName": "Tokens"
}, - "types": {
- "value": "3",
- "friendlyName": "Types"
}, - "tokensPercent": {
- "value": "10.00",
- "friendlyName": "Tokens Percent"
}, - "typesPercent": {
- "value": "4.35",
- "friendlyName": "Types Percent"
}
}, - "awl6": {
- "friendlyName": "AWL 6",
- "typesPercent": {
- "value": "1.45",
- "friendlyName": "Types Percent"
}, - "tokensPercent": {
- "value": "1.00",
- "friendlyName": "Tokens Percent"
}, - "tokens": {
- "value": "1",
- "friendlyName": "Tokens"
}, - "types": {
- "value": "1",
- "friendlyName": "Types"
}
}, - "awlTotal": {
- "friendlyName": "AWL Total",
- "tokensPercent": {
- "value": "17.00",
- "friendlyName": "Tokens Percent"
}, - "tokens": {
- "value": "17",
- "friendlyName": "Tokens"
}, - "types": {
- "value": "10",
- "friendlyName": "Types"
}, - "typesPercent": {
- "value": "14.49",
- "friendlyName": "Types Percent"
}
}, - "awl8": {
- "friendlyName": "AWL 8",
- "typesPercent": {
- "value": "2.90",
- "friendlyName": "Types Percent"
}, - "tokensPercent": {
- "value": "2.00",
- "friendlyName": "Tokens Percent"
}, - "tokens": {
- "value": "2",
- "friendlyName": "Tokens"
}, - "types": {
- "value": "2",
- "friendlyName": "Types"
}
}, - "awl7": {
- "friendlyName": "AWL 7",
- "types": {
- "value": "1",
- "friendlyName": "Types"
}, - "tokens": {
- "value": "1",
- "friendlyName": "Tokens"
}, - "tokensPercent": {
- "value": "1.00",
- "friendlyName": "Tokens Percent"
}, - "typesPercent": {
- "value": "1.45",
- "friendlyName": "Types Percent"
}
}
}
}
}
}
Get the tagged data for the parsers. This will give you the results for all documents in the analysis- you don’t need to request each document separately.
| ctxID |
string
Example: ctxID=AC07A97C-9C1C-11E9-AB5C-DDF6D7F2BACF
The Context ID to be processed. |
curl -X GET "https://textinspector.com/api/v2/{ctxID}/tagger/taggeddata" -H "accept: application/json" -H "Cookie: textinspector.session={sessionid};" -L
{- "doc1": [
- {
- "Tag": "VV",
- "Token": "Try"
}, - {
- "Tag": "DAT",
- "Token": "the"
}, - {
- "Tag": "NN",
- "Token": "tool"
}, - {
- "Tag": "QQ",
- "Token": "out"
}, - {
- "Tag": "IN",
- "Token": "with"
}, - {
- "Tag": "DT",
- "Token": "this"
}, - {
- "Tag": "NN",
- "Token": "paragraph"
}, - {
- "Tag": "IN",
- "Token": "of"
}, - {
- "Tag": "NN",
- "Token": "text"
}, - {
- "Tag": "CO",
- "Token": "or"
}, - {
- "Tag": "PP",
- "Token": "you"
}, - {
- "Tag": "MD",
- "Token": "can"
}, - {
- "Tag": "VV",
- "Token": "replace"
}, - {
- "Tag": "DT",
- "Token": "this"
}, - {
- "Tag": "JJ",
- "Token": "whole"
}, - {
- "Tag": "NN",
- "Token": "text"
}, - {
- "Tag": "IN",
- "Token": "with"
}, - {
- "Tag": "DT",
- "Token": "some"
}, - {
- "Tag": "NN",
- "Token": "text"
}, - {
- "Tag": "IN",
- "Token": "of"
}, - {
- "Tag": "PP$",
- "Token": "your"
}, - {
- "Tag": "NN",
- "Token": "choosing"
}
], - "doc2": [
- {
- "Tag": "DT",
- "Token": "This"
}, - {
- "Tag": "VBZ",
- "Token": "is"
}
]
}
| ctxID |
string
Example: ctxID=AC07A97C-9C1C-11E9-AB5C-DDF6D7F2BACF
The Context ID to be processed. |
curl -X GET "https://textinspector.com/api/v2/{ctxID}/metadiscourse/taggeddata" -H "accept: application/json" -H "Cookie: textinspector.session={sessionid};" -L
{- "doc1": [
- {
- "Tag": "VV",
- "Token": "Try"
}, - {
- "Tag": "DAT",
- "Token": "the"
}, - {
- "Tag": "NN",
- "Token": "tool"
}, - {
- "Tag": "QQ",
- "Token": "out"
}, - {
- "Tag": "IN",
- "Token": "with"
}, - {
- "Tag": "DT",
- "Token": "this"
}, - {
- "Tag": "NN",
- "Token": "paragraph"
}, - {
- "Tag": "IN",
- "Token": "of"
}, - {
- "Tag": "NN",
- "Token": "text"
}, - {
- "Tag": "CO",
- "Token": "or"
}, - {
- "Tag": "PP",
- "Token": "you"
}, - {
- "Tag": "MD",
- "Token": "can"
}, - {
- "Tag": "VV",
- "Token": "replace"
}, - {
- "Tag": "DT",
- "Token": "this"
}, - {
- "Tag": "JJ",
- "Token": "whole"
}, - {
- "Tag": "NN",
- "Token": "text"
}, - {
- "Tag": "IN",
- "Token": "with"
}, - {
- "Tag": "DT",
- "Token": "some"
}, - {
- "Tag": "NN",
- "Token": "text"
}, - {
- "Tag": "IN",
- "Token": "of"
}, - {
- "Tag": "PP$",
- "Token": "your"
}, - {
- "Tag": "NN",
- "Token": "choosing"
}
], - "doc2": [
- {
- "Tag": "DT",
- "Token": "This"
}, - {
- "Tag": "VBZ",
- "Token": "is"
}
]
}
| ctxID |
string
Example: ctxID=AC07A97C-9C1C-11E9-AB5C-DDF6D7F2BACF
The Context ID to be processed. |
curl -X GET "https://textinspector.com/api/v2/{ctxID}/taggedlexical-bnc/taggeddata" -H "accept: application/json" -H "Cookie: textinspector.session={sessionid};" -L
{- "doc1": [
- {
- "Tag": "VV",
- "Token": "Try"
}, - {
- "Tag": "DAT",
- "Token": "the"
}, - {
- "Tag": "NN",
- "Token": "tool"
}, - {
- "Tag": "QQ",
- "Token": "out"
}, - {
- "Tag": "IN",
- "Token": "with"
}, - {
- "Tag": "DT",
- "Token": "this"
}, - {
- "Tag": "NN",
- "Token": "paragraph"
}, - {
- "Tag": "IN",
- "Token": "of"
}, - {
- "Tag": "NN",
- "Token": "text"
}, - {
- "Tag": "CO",
- "Token": "or"
}, - {
- "Tag": "PP",
- "Token": "you"
}, - {
- "Tag": "MD",
- "Token": "can"
}, - {
- "Tag": "VV",
- "Token": "replace"
}, - {
- "Tag": "DT",
- "Token": "this"
}, - {
- "Tag": "JJ",
- "Token": "whole"
}, - {
- "Tag": "NN",
- "Token": "text"
}, - {
- "Tag": "IN",
- "Token": "with"
}, - {
- "Tag": "DT",
- "Token": "some"
}, - {
- "Tag": "NN",
- "Token": "text"
}, - {
- "Tag": "IN",
- "Token": "of"
}, - {
- "Tag": "PP$",
- "Token": "your"
}, - {
- "Tag": "NN",
- "Token": "choosing"
}
], - "doc2": [
- {
- "Tag": "DT",
- "Token": "This"
}, - {
- "Tag": "VBZ",
- "Token": "is"
}
]
}
| ctxID |
string
Example: ctxID=AC07A97C-9C1C-11E9-AB5C-DDF6D7F2BACF
The Context ID to be processed. |
curl -X GET "https://textinspector.com/api/v2/{ctxID}/taggedlexical-coca/taggeddata" -H "accept: application/json" -H "Cookie: textinspector.session={sessionid};" -L
{- "doc1": [
- {
- "Tag": "VV",
- "Token": "Try"
}, - {
- "Tag": "DAT",
- "Token": "the"
}, - {
- "Tag": "NN",
- "Token": "tool"
}, - {
- "Tag": "QQ",
- "Token": "out"
}, - {
- "Tag": "IN",
- "Token": "with"
}, - {
- "Tag": "DT",
- "Token": "this"
}, - {
- "Tag": "NN",
- "Token": "paragraph"
}, - {
- "Tag": "IN",
- "Token": "of"
}, - {
- "Tag": "NN",
- "Token": "text"
}, - {
- "Tag": "CO",
- "Token": "or"
}, - {
- "Tag": "PP",
- "Token": "you"
}, - {
- "Tag": "MD",
- "Token": "can"
}, - {
- "Tag": "VV",
- "Token": "replace"
}, - {
- "Tag": "DT",
- "Token": "this"
}, - {
- "Tag": "JJ",
- "Token": "whole"
}, - {
- "Tag": "NN",
- "Token": "text"
}, - {
- "Tag": "IN",
- "Token": "with"
}, - {
- "Tag": "DT",
- "Token": "some"
}, - {
- "Tag": "NN",
- "Token": "text"
}, - {
- "Tag": "IN",
- "Token": "of"
}, - {
- "Tag": "PP$",
- "Token": "your"
}, - {
- "Tag": "NN",
- "Token": "choosing"
}
], - "doc2": [
- {
- "Tag": "DT",
- "Token": "This"
}, - {
- "Tag": "VBZ",
- "Token": "is"
}
]
}
| ctxID |
string
Example: ctxID=AC07A97C-9C1C-11E9-AB5C-DDF6D7F2BACF
The Context ID to be processed. |
curl -X GET "https://textinspector.com/api/v2/{ctxID}/doc{docNum}/statistics" -H "accept: application/json" -H "Cookie: textinspector.session={sessionid};" -L
{- "doc1": [
- {
- "Tag": "VV",
- "Token": "Try"
}, - {
- "Tag": "DAT",
- "Token": "the"
}, - {
- "Tag": "NN",
- "Token": "tool"
}, - {
- "Tag": "QQ",
- "Token": "out"
}, - {
- "Tag": "IN",
- "Token": "with"
}, - {
- "Tag": "DT",
- "Token": "this"
}, - {
- "Tag": "NN",
- "Token": "paragraph"
}, - {
- "Tag": "IN",
- "Token": "of"
}, - {
- "Tag": "NN",
- "Token": "text"
}, - {
- "Tag": "CO",
- "Token": "or"
}, - {
- "Tag": "PP",
- "Token": "you"
}, - {
- "Tag": "MD",
- "Token": "can"
}, - {
- "Tag": "VV",
- "Token": "replace"
}, - {
- "Tag": "DT",
- "Token": "this"
}, - {
- "Tag": "JJ",
- "Token": "whole"
}, - {
- "Tag": "NN",
- "Token": "text"
}, - {
- "Tag": "IN",
- "Token": "with"
}, - {
- "Tag": "DT",
- "Token": "some"
}, - {
- "Tag": "NN",
- "Token": "text"
}, - {
- "Tag": "IN",
- "Token": "of"
}, - {
- "Tag": "PP$",
- "Token": "your"
}, - {
- "Tag": "NN",
- "Token": "choosing"
}
], - "doc2": [
- {
- "Tag": "DT",
- "Token": "This"
}, - {
- "Tag": "VBZ",
- "Token": "is"
}
]
}
| ctxID |
string
Example: ctxID=AC07A97C-9C1C-11E9-AB5C-DDF6D7F2BACF
The Context ID to be processed. |
curl -X GET "https://textinspector.com/api/v2/{ctxID}/lexical/taggeddata" -H "accept: application/json" -H "Cookie: textinspector.session={sessionid};" -L
{- "doc1": [
- {
- "Tag": "VV",
- "Token": "Try"
}, - {
- "Tag": "DAT",
- "Token": "the"
}, - {
- "Tag": "NN",
- "Token": "tool"
}, - {
- "Tag": "QQ",
- "Token": "out"
}, - {
- "Tag": "IN",
- "Token": "with"
}, - {
- "Tag": "DT",
- "Token": "this"
}, - {
- "Tag": "NN",
- "Token": "paragraph"
}, - {
- "Tag": "IN",
- "Token": "of"
}, - {
- "Tag": "NN",
- "Token": "text"
}, - {
- "Tag": "CO",
- "Token": "or"
}, - {
- "Tag": "PP",
- "Token": "you"
}, - {
- "Tag": "MD",
- "Token": "can"
}, - {
- "Tag": "VV",
- "Token": "replace"
}, - {
- "Tag": "DT",
- "Token": "this"
}, - {
- "Tag": "JJ",
- "Token": "whole"
}, - {
- "Tag": "NN",
- "Token": "text"
}, - {
- "Tag": "IN",
- "Token": "with"
}, - {
- "Tag": "DT",
- "Token": "some"
}, - {
- "Tag": "NN",
- "Token": "text"
}, - {
- "Tag": "IN",
- "Token": "of"
}, - {
- "Tag": "PP$",
- "Token": "your"
}, - {
- "Tag": "NN",
- "Token": "choosing"
}
], - "doc2": [
- {
- "Tag": "DT",
- "Token": "This"
}, - {
- "Tag": "VBZ",
- "Token": "is"
}
]
}