dstk
v0.0.2
Published
An interface for the Data Science Toolkit distribution.
Downloads
1
Readme
node-dstk
node-dstk is a node.js module that provides an interface for the Data Science Toolkit distribution.
The Data Science Toolkit is a tool that can be used to:
- Find places or persons in text
- Find coordinates for IP-numbers or street address
- Find the main content in a HTML document
...and several more methods.
The Data Science Toolkit it self is a Linux distribution assembled by Pete Warden that can be run as a virtual machine.
This module provides an interface by making HTTP requests to the server, by default the public server at http://www.datasciencetoolkit.org is used but to improve speed you can clone this virtual machine and run it locally and set the dstk.apiURL to the cloned machines url ex. http://localhost:8080.
Usage example
var dstk = require('dstk');
// OPTIONAL: change from default http://www.datasciencetoolkit.org server to custom server
// dstk.apiURL = 'http://localhost:8080';
dstk.info(function (error, data, httpResponse) {
if (!error) {
console.log(data);
}
});
dstk.ipToCoordinates('8.8.8.8', function (error, data, httpResponse) {
if (!error) {
console.log(data);
}
});
Available methods
Below are the currently supported methods, they are linked to the documentation on the Data Science Toolkit for more detailed explanations.
- dstk.info
- dstk.text2places or dstk.textToPlaces
- dstk.ip2coordinates or dstk.ipToCoordinates
- dstk.street2coordinates or dstk.streetToCoordinates
- dstk.coordinates2politics or dstk.coordinatesToPolitics
- dstk.text2sentences or dstk.textToSentences
- dstk.html2text or dstk.htmlToText
- dstk.html2story or dstk.htmlToStory
- dstk.text2people or dstk.textToPeople
- dstk.text2times or dstk.textToTimes
License
(The GPL license)
Copyright (C) 2013 Fredrik Söderström
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.