API Docs

The Contextors API assigns to sentences their grammatical attributes (tense, polarity, voice, etc.) and main components (subject, verb, object, etc.)

Methods

Request Method Description
http://contextors.com/api/v1/ GET Request syntactic attributes of the given sentence

Query Parameters

Name Optional/Required Description
phrase required The sentence to be analyzed
api-key required Your API key. Get your API key by filling this form.

Response Parameters

The response for a query is an array of possible solutions for the sentence in hand. Each solution shows the analysis of each of the clauses found in the sentence. The analysis is represented in a Hash of the attributes detailed in the table below.

response = [solution_1, solution_2, …]
solution_x = [clause_1, clause_2, …]
clause_x = {attribute_1 => value_1, …}
Name Description
clause the string of words of this clause
type the type of the clause
sub_type copula / existential
components_titles An array of the titles of the clause’s components
components_strings An array of the strings of the clause’s components
understood_subject the external subject of the clause
main_verb the main verb of the clause
main_verb_base_form the base form of main verb
tense a Hash with the following keys
tense[:primary] present / past / future
tense[:secondary] progressive / non progressive
tense[:aspect] perfect / non perfect
tense[:summary] past-perfect, present-progressive, etc.
modality indicates if the clause is modal
voice the voice (passive/active or concealed passive) of the clause
polarity the polarity (positive/negative) of the clause
tree an html representation of the caluse
Phrase: the homework eaten by the dog was mine

Query

http://contextors.com/api/v1/?phrase=the+homework+eaten+by+the+dog+was+mine&api_key=YOUR_KEY

Response

HTML Tree Response

The html code bellow represents the following tree:

declarative_clause
subjectthe homework eaten by the dog
verbwas
predicative_complementmine


For any question please contact us at support@contextors.com

Contact

Join our mailing list: