Last active
April 5, 2017 05:06
-
-
Save aleozlx/f682ee0f7ebeeefb72a4711c7783811d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// All response has following structure | |
status: string // ["ok" | "pending" | "err"] | |
// other fields ... | |
// TrackingID response | |
status: string // should always be "ok" tho | |
data: string // the tracking id here | |
// Status poll response (non error) | |
status: string // [ok | pending ] | |
data: Results? // null on pending | |
// Status poll response (error) | |
status: string // == "err" | |
msg: string // error message | |
// Results structure is a dictionary where | |
// key is a string [format: data source name/title] | |
// value is [ Result ] | |
[ | |
{ | |
"dataSrc":"sample", | |
"title":"the Current H-1B Visa Program is at Risk", | |
"statments":[ | |
{"src": "Yes, the current H-1B visa program is at risk", "most_likely": "neutral"}, | |
{"src": "Yet, reform could be a good or bad thing, depending upon the execution", "most_likely": "neutral"}, | |
] | |
}, | |
{ | |
// ... similar | |
} | |
] | |
// Result structure | |
src: string // source sentance | |
value: string // like "(0.97854394, 0.019078452, 0.0023776304)" | |
is_neutral: string // like "False" | |
is_entailment: string // like "True" | |
is_contradiction: string // like "False" these three could be non-exclusive, like all could be true in rare cases | |
most_likely: string // "contradiction" | |
// actual fields contained subject to "limit" option in request, e.g. | |
POST /analyze {"stmt": "H-1B program will be continued blah blah..", "tags": "H1B-visa", "limit": "src|most_likely"} | |
// then final result would only contain | |
src: string | |
most_likely: string | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment