Core

Performs various natural language tasks over raw text input.

Request

ParameterTypeValues
text
(required)
StringThe text parameter is the sentence or sentences to analyze.
graphBooleanControls whether the graph of entities and relationships is returned for each sentence. The graph value may be:
  • true(default)
  • false
nerBooleanControls whether named entity recognition is returned for each sentence. The ner value may be:
  • true(default)
  • false
prettyBooleanPretty print the response. Useful for debugging. The pretty value may be:
  • true
  • false(default)

Response

Returns the output of various natural language tasks on the input text (see below for more information).

Example

    Request
    Response
https://api.plasticity.ai/sapien/coreGETPOST
{
}

Tokenization

Tokens appear under the tokens key for each sentence as the first element in the array.

Note that multi-word entities like the song “Let It Be” will be tokenized to be treated as a single word. To turn this off, set the ner parameter to false. In cases where it is ambiguous as to whether multiple words should be interpreted as a multi-word entity, “alternatives” for each sentence parse are returned in the response.

Parts of Speech

Parts of speech tags appear under the tokens key for each sentence as the second element in the array.

Part of Speech TagMeaning
NNSingular Noun
NNSPlural Noun
POSPossessive Ending
NNPSingular Proper Noun
NNPSPlural Proper Noun
PRPPersonal Pronoun
PRPSPersonal Pronoun Possessive
VBVerb Base From
VBDVerb Past Tense
VBGVerb Gerund
VBNVerb Past Participle
VBPVerb Non-Third Person Singular Present
VBZVerb Third Person Singular Present
JJAdjective
JJRAdjective Comparative
JJSAdjective Superlative
DTDeterminer
INPreposition
RBAdverb
RBRAdverb Comparative
RBSAdverb Superlative
CCCoordinating Conjunction
CDCardinal Number
RPParticle
EXExistential There
TOto
MDModal
WPWH-Pronoun
WPSPossessive WH-Pronoun
WRBWH-Adverb
WDTWH-Determiner
NFPSuperfluous Punctuation
COMMAComma
PERIODPeriod
HYPHHyphen
COLONColon
DOLLARDollar Sign
RIGHTBRACKETRight Bracket
LEFTBRACKETLeft Bracket
OPENINGQUOTESOpening Quotes
CLOSINGQUOTESClosing Quotes
UHInterjection
PDTPredeterminer
FWForeign Word
SYMSymbol
ADDElectronic Address (URL)
LSList Item Marker
GWGo with
AFXAffix

Lemmatization

Lemmatized or normalized tokens appear under the tokens key for each sentence as the third element in the array.

Normalization includes making the token lowercase, transforming verbs to their infinitive form, transforming adjectives to their positive degree, and transforming nouns to their singular form.

Syntax Dependency Trees

Syntax dependency trees appear under the dependencies key for each sentence.

The first element in the array is the index of the dependent word. The second element in the array is the index of the head word (or governor). The third element in the array is the name of the dependency relation.

Dependency RelationMeaning
punctPunctuation
prepPreposition
pobjPrepositional Object
detDeterminal
nsubjNominal Subject
nnNoun Compound Modifier
amodAdjectival Modifier
ROOTRoot
dobjDirect Object
auxAuxiliary
advmodAdverbial Modifier
conjConjunct
ccCoordinating Conjunction
numNumeric Modifier
possPossession Modifier
depUnspecified Dependency
ccompClausal Complement
copCopula
markMarker
xcompOpen Clausal Complement
rcmodRelative Clause Modifier
advclAdverbial Clause Modifier
possessivePossessive Modifier
nsubjpassPassive Nominal Subject
pcompPrepositional Complement
apposAppositional Modifier
partmodParticipial Modifier
negNegation
numberNumber
prtPhrasal Verb Particle
quantmodQuantifier Phrase Modifier
infmodInfinitival Modifier
npadvmodNoun Phrase Adverbial Modifier
parataxisParataxis
mweMulti-word Expression
explExpletive
iobjIndirect Object
acompAdjectival Modifier
discourseDiscourse
csubjClausal Subject
predetPredeterminer
preconjPreconjunct
goeswithGoes with
csubjpassPassive Clausal Subject

Sentence Graph of Entities and Relationships

A graph of entities and relationships will appear under the graph key for each sentence. This task provides similar information to the relation extraction task or open information extraction task in NLP.

Named Entity Recognition

Named entities will appear under the graph key for each sentence under any entity objects under the ner key.

The ner object provides a label (label) for the recognized entity, along with identifiers for the Freebase entity (freebaseIdentifier) and the Cortex Knowledge Graph entity (id). An example of the ner object is shown below:

1{
2  "freebaseIdentifier": "/m/01hg45m",
3  "id": "PWE199585",
4  "label": "Let It Be",
5  "type": "concept"
6}

Disambiguation

This API endpoint is currently under development and will be released shortly. Please reach out to us to stay updated on future releases.

Coreference Resolution

This API endpoint is currently under development and will be released shortly. Please reach out to us to stay updated on future releases.

Sentiment Analysis

This API endpoint is currently under development and will be released shortly. Please reach out to us to stay updated on future releases.