node-dandelion
A nodejs client for the Dandelion API.
Bring the powerful text analysis tools from Dandelion API to your NodeJs apps.
This client is a work in progress.
As of v1.0.0, the following endpoints of Dandelion API are featured:
- Text Similarity API: dandelion.txtSim(obj, callback)
- Entity Extraction API: dandelion.txtNex(obj, callback)
- Text Classification API: dandelion.txtCl(obj, callback)
- Language Detection API: dandelion.txtLi(obj, callback)
The POST endpoints are not implemented yet.
Installation
npm install node-dandelion
Parameters:
TXT-SIM = Check for similarities between two texts.
dandelion;With object = "string1": "type":"txt"|"html"|"url"|"html_fragment" "value":"Your first value here" "string2": "type":"txt"|"html"|"url"|"html_fragment" "value": "Your second value here" "lang":"de"|"en"|"fr"|"it"|"pt"|"auto" "bow":"always"|"one_empty"|"both_empty"|"never""string1" "string2" are required"lang" "bow" are optional
TXT-NEX = Check for topics and other keywords extractions in one text
dandelion;With object = "string": "type":"txt"|"html"|"url"|"html_fragment" "value":"Your value here" "extras": "lang":"de"|"en"|"fr"|"it"|"pt"|"auto" "min_confidence": 00 to 10 ... "string" is requiredIn the "extras" object you can use any optional parameters from the APICheck the full reference here: https://dandelion.eu/docs/api/datatxt/nex/v1/
TXT-CL = Classify a text into topics
dandelion;With object = "string": "type":"txt"|"html"|"url"|"html_fragment" "value":"Your value here" "model": "MODEL ID" "extras": "max_annotations": 1 to +inf "min_score": 00 to 10 ... "nex_extras": "lang":"de"|"en"|"fr"|"it"|"pt"|"auto" ... "string" "model" are requiredIn the "extras" object you can use any optional parameters from the APIIn the "nex_extras" object you can use any optional parameters from the NEX APICheck the full reference here: https://dandelion.eu/docs/api/datatxt/cl/v1/
TXT-LI = Find the language of a text
dandelion;With object = "string": "type":"txt"|"html"|"url"|"html_fragment" "value":"Your value here" "clean": true | false"string" is requiredCheck the full reference here: https://dandelion.eu/docs/api/datatxt/li/v1/
Example:
var dandelion = ;dandelion; // TXT SIM: Check for the similitudes between the two strings.dandelion; // TXT NEX: Check for specific topics, person, or other types of concepts in the provided text.dandelion;
Contribute:
- Fork the Master branch
- Create a pull request