FREEMIUM
Methods
- phrases
- sentiment
- stem
- tag
phrases (POST)
Extract phrase chunks and named entities from text. See http://text-processing.com/docs/phrases.html for more details.
Parameters
text
STRING
Text to extract from, must be no more than 1 million characters.
For example: "California is nice"
language
STRING
The default language is english, but it also supports dutch, portuguese, and spanish.
For example: "spanish"
Results
NP
STRING
The result object has 1 key for every phrases type, which each key containing a list of strings. The example below is what a result object may look like.
For example: "{ "NP": ["California"], "GPE": ["California"], "VP": ["is"], "LOCATION": ["California"] }"
Example
JSON
{"NP":"{
\"NP\": [\"California\"],
\"GPE\": [\"California\"],
\"VP\": [\"is\"],
\"LOCATION\": [\"California\"]
}"}
JSON (Learn how)
POST http://api.text-processing.com/phrases/
text=A-VALUElanguage=A-VALUE
- The required parameters have a yellow background, while the optional are gray
- Authentication: Request a valid _token before making the API call. Learn how.
sentiment (POST)
Analyze sentiment of English text. See http://text-processing.com/docs/sentiment.html for more details.
Parameters
text
STRING
English text, must be no more than 1 million characters.
For example: "great movie"
Results
label
STRING
Sentiment label, one of "pos", 'neg", or "neutral".
For example: "pos"
OBJECT
Contains the probability of each label. If "neutral" probability is greater than 50%, then "label" will be "neutral". Otherwise, "label" will be the greater of "pos" or "neg".
neg
NUMBER
Probability that text has a negative sentiment.
For example: "0.39680315784838732"
neutral
NUMBER
Probability that text has a neutral/objective sentiment.
For example: "0.28207586364297021"
pos
NUMBER
Probability that text has a positive sentiment.
For example: "0.60319684215161262"
Example
JSON
{"label":"pos","probability":{"neg":0.39680315784838732,"neutral":0.28207586364297021,"pos":0.60319684215161262}}
JSON (Learn how)
POST http://api.text-processing.com/sentiment/
text=A-VALUE
- The required parameters have a yellow background, while the optional are gray
- Authentication: Request a valid _token before making the API call. Learn how.
stem (POST)
Stem or lemmatize each word in given text. See http://text-processing.com/docs/stem.html for more details.
Parameters
text
STRING
Text to stem or lemmatize, must be no more than 1 million characters.
For example: "processing"
language
STRING
The language of the text, which defaults to english, but can be any of the following: arabic, english, danish, dutch, finnish, french, german, hungarian, italian, norwegian, portuguese, romanian, russian, spanish, swedish.
For example: "english"
stemmer
STRING
The stemmer to use. For english, the default stemmer is porter; for arabic, the default stemmer is isri, and for all other languages, the default is snowball. Other options are: lancaster, wordnet, rslp.
For example: "porter"
Results
text
STRING
The original text with every word stemmed.
For example: "process"
Example
JSON
{"text":"process"}
JSON (Learn how)
POST http://api.text-processing.com/stem/
text=A-VALUElanguage=A-VALUEstemmer=A-VALUE
- The required parameters have a yellow background, while the optional are gray
- Authentication: Request a valid _token before making the API call. Learn how.
tag (POST)
Part-of-speech tagging, phrase chunking, and named entity recognition of text. See http://text-processing.com/docs/tag.html for more details.
Parameters
text
STRING
Text to tag and chunk, must be no more than 1 million characters.
For example: "hello world"
language
STRING
The default language is english, which along with dutch, portuguese, and spanish supports phrase chunking and named entity recognition. The following languages support only part-of-speech tagging: bangla, catalan, chinese, hindi, marathi, polish, telugu.
For example: "spanish"
output
STRING
The default output format for english, dutch, portuguese, and spanish is sexpr, though they also support iob. For all other languages, the only available output format is tagged.
For example: "tagged"
Results
text
STRING
The original text annotated with part-of-speech tags and possibly s-expressions or IOB chunks.
For example: "(S hello/NN world/NN)"
Example
JSON
{"text":"(S hello/NN world/NN)"}


running