feersum_nlu_api
v2.0.4
Published
This_is_the_HTTP_API_for_Feersum_NLU__See_httpsgithub_compraekeltfeersum_nlu_api_wrappers_for_examples_of_how_to_use_the_API_
Downloads
2
Readme
feersum_nlu_api
FeersumNluApi - JavaScript client for feersum_nlu_api This is the HTTP API for Feersum NLU. See https://github.com/praekelt/feersum-nlu-api-wrappers for examples of how to use the API. This SDK is automatically generated by the Swagger Codegen project:
- API version: 2.0.3
- Package version: 2.0.3
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen For more information, please visit https://www.feersum.io
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install feersum_nlu_api --save
Local development
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing
into the directory containing package.json
(and this README). Let's call this JAVASCRIPT_CLIENT_DIR
. Then run:
npm install
Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR
:
npm link
Finally, switch to the directory you want to use your feersum_nlu_api from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
You should now be able to require('feersum_nlu_api')
in javascript files from the directory you ran the last
command above from.
git
If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/feersum_nlu_api then install it via:
npm install YOUR_USERNAME/feersum_nlu_api --save
For browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually
use this library):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Getting Started
Please follow the installation instruction and execute the following JS code:
var FeersumNluApi = require('feersum_nlu_api');
var defaultClient = FeersumNluApi.ApiClient.instance;
// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['AUTH_TOKEN'] = "Token"
var api = new FeersumNluApi.DashboardApi()
api.dashboardGetDetails().then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Documentation for API Endpoints
All URIs are relative to https://nlu.playground.feersum.io:443/nlu/v2
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- FeersumNluApi.DashboardApi | dashboardGetDetails | GET /dashboard | Your service dashboard. FeersumNluApi.Date_parsersApi | dateParserRetrieve | POST /date_parsers/{instance_name}/retrieve | Extract dates. FeersumNluApi.Duckling_entity_extractorsApi | ducklingEntityExtractorCreate | POST /duckling_entity_extractors | Create a duckling entity extractor. FeersumNluApi.Duckling_entity_extractorsApi | ducklingEntityExtractorGetDetails | GET /duckling_entity_extractors/{instance_name} | Get details of named instance. FeersumNluApi.Duckling_entity_extractorsApi | ducklingEntityExtractorGetDetailsAll | GET /duckling_entity_extractors | Get list of loaded regular expression entity extractors. FeersumNluApi.Duckling_entity_extractorsApi | ducklingEntityExtractorRetrieve | POST /duckling_entity_extractors/{instance_name}/retrieve | Extract information based on the regular expression. FeersumNluApi.Faq_matchersApi | faqMatcherAddTrainingSamples | POST /faq_matchers/{instance_name}/training_samples | Add training samples. FeersumNluApi.Faq_matchersApi | faqMatcherCreate | POST /faq_matchers | Create an FAQ matcher. FeersumNluApi.Faq_matchersApi | faqMatcherCurate | POST /faq_matchers/{instance_name}/curate | Endpoint to aid in the curation of a model instance. FeersumNluApi.Faq_matchersApi | faqMatcherDelTrainingSamples | DELETE /faq_matchers/{instance_name}/training_samples | Delete training samples. FeersumNluApi.Faq_matchersApi | faqMatcherGetDetails | GET /faq_matchers/{instance_name} | Get details of named instance. FeersumNluApi.Faq_matchersApi | faqMatcherGetDetailsAll | GET /faq_matchers | Get list of loaded FAQ matchers. FeersumNluApi.Faq_matchersApi | faqMatcherGetLabels | GET /faq_matchers/{instance_name}/get_labels | Get list of possible labels. FeersumNluApi.Faq_matchersApi | faqMatcherGetTrainingSamples | GET /faq_matchers/{instance_name}/training_samples | Get training samples. FeersumNluApi.Faq_matchersApi | faqMatcherOnlineTrainingSamples | POST /faq_matchers/{instance_name}/online_training_samples | Train/update the classifier online with the samples provided. FeersumNluApi.Faq_matchersApi | faqMatcherRetrieve | POST /faq_matchers/{instance_name}/retrieve | Match retrieve and FAQ. FeersumNluApi.Faq_matchersApi | faqMatcherTrain | POST /faq_matchers/{instance_name}/train | Train the named FAQ matcher. FeersumNluApi.Intent_classifiersApi | intentClassifierAddTrainingSamples | POST /intent_classifiers/{instance_name}/training_samples | Add training samples. FeersumNluApi.Intent_classifiersApi | intentClassifierCreate | POST /intent_classifiers | Create an intent classifier. FeersumNluApi.Intent_classifiersApi | intentClassifierCurate | POST /intent_classifiers/{instance_name}/curate | Endpoint to aid in the curation of a model instance. FeersumNluApi.Intent_classifiersApi | intentClassifierDelTrainingSamples | DELETE /intent_classifiers/{instance_name}/training_samples | Delete training samples. FeersumNluApi.Intent_classifiersApi | intentClassifierGetDetails | GET /intent_classifiers/{instance_name} | Get details of named instance. FeersumNluApi.Intent_classifiersApi | intentClassifierGetDetailsAll | GET /intent_classifiers | Get list of loaded intent classifiers. FeersumNluApi.Intent_classifiersApi | intentClassifierGetLabels | GET /intent_classifiers/{instance_name}/get_labels | Get list of possible labels. FeersumNluApi.Intent_classifiersApi | intentClassifierGetTrainingSamples | GET /intent_classifiers/{instance_name}/training_samples | Get training samples. FeersumNluApi.Intent_classifiersApi | intentClassifierOnlineTrainingSamples | POST /intent_classifiers/{instance_name}/online_training_samples | Train/update the classifier online with the samples provided. FeersumNluApi.Intent_classifiersApi | intentClassifierRetrieve | POST /intent_classifiers/{instance_name}/retrieve | Classify intent. FeersumNluApi.Intent_classifiersApi | intentClassifierTrain | POST /intent_classifiers/{instance_name}/train | Train the named intent classifier. FeersumNluApi.Lr4_language_recognisersApi | lr4LanguageRecogniserCreate | POST /lr4_language_recognisers | Create a LR4 text language detector. FeersumNluApi.Lr4_language_recognisersApi | lr4LanguageRecogniserGetDetails | GET /lr4_language_recognisers/{instance_name} | Get details of named instance. FeersumNluApi.Lr4_language_recognisersApi | lr4LanguageRecogniserGetDetailsAll | GET /lr4_language_recognisers | Get list of loaded LR4 text language detectors. FeersumNluApi.Lr4_language_recognisersApi | lr4LanguageRecogniserGetLabels | GET /lr4_language_recognisers/{instance_name}/get_labels | Get list of possible labels. FeersumNluApi.Lr4_language_recognisersApi | lr4LanguageRecogniserRetrieve | POST /lr4_language_recognisers/{instance_name}/retrieve | Recognise the language the text is written in. FeersumNluApi.Regex_entity_extractorsApi | regexEntityExtractorCreate | POST /regex_entity_extractors | Create a regular expression entity extractor. FeersumNluApi.Regex_entity_extractorsApi | regexEntityExtractorGetDetails | GET /regex_entity_extractors/{instance_name} | Get details of named instance. FeersumNluApi.Regex_entity_extractorsApi | regexEntityExtractorGetDetailsAll | GET /regex_entity_extractors | Get list of loaded regular expression entity extractors. FeersumNluApi.Regex_entity_extractorsApi | regexEntityExtractorRetrieve | POST /regex_entity_extractors/{instance_name}/retrieve | Extract information based on the regular expression. FeersumNluApi.Sentiment_detectorsApi | sentimentDetectorRetrieve | POST /sentiment_detectors/{instance_name}/retrieve | Detect sentiment. FeersumNluApi.Similarity_entity_extractorsApi | similarityEntityExtractorCreate | POST /similarity_entity_extractors | Create a word similarity entity extractor. FeersumNluApi.Similarity_entity_extractorsApi | similarityEntityExtractorGetDetails | GET /similarity_entity_extractors/{instance_name} | Get details of named instance. FeersumNluApi.Similarity_entity_extractorsApi | similarityEntityExtractorGetDetailsAll | GET /similarity_entity_extractors | Get list of loaded similarity entity extractors. FeersumNluApi.Similarity_entity_extractorsApi | similarityEntityExtractorRetrieve | POST /similarity_entity_extractors/{instance_name}/retrieve | Extract information based on word similarity. FeersumNluApi.Text_classifiersApi | textClassifierAddTrainingSamples | POST /text_classifiers/{instance_name}/training_samples | Add training samples. FeersumNluApi.Text_classifiersApi | textClassifierCreate | POST /text_classifiers | Create a text classifier. FeersumNluApi.Text_classifiersApi | textClassifierCurate | POST /text_classifiers/{instance_name}/curate | Endpoint to aid in the curation of a model instance. FeersumNluApi.Text_classifiersApi | textClassifierDelTrainingSamples | DELETE /text_classifiers/{instance_name}/training_samples | Delete training samples. FeersumNluApi.Text_classifiersApi | textClassifierGetDetails | GET /text_classifiers/{instance_name} | Get details of named instance. FeersumNluApi.Text_classifiersApi | textClassifierGetDetailsAll | GET /text_classifiers | Get list of loaded text classifiers. FeersumNluApi.Text_classifiersApi | textClassifierGetLabels | GET /text_classifiers/{instance_name}/get_labels | Get list of possible labels. FeersumNluApi.Text_classifiersApi | textClassifierGetTrainingSamples | GET /text_classifiers/{instance_name}/training_samples | Get training samples. FeersumNluApi.Text_classifiersApi | textClassifierRetrieve | POST /text_classifiers/{instance_name}/retrieve | Classify text. FeersumNluApi.Text_classifiersApi | textClassifierTrain | POST /text_classifiers/{instance_name}/train | Train the named text classifier. FeersumNluApi.Word_manifoldsApi | wordManifoldAddSimilarWords | POST /word_manifolds/{instance_name}/vocab | Add new words. FeersumNluApi.Word_manifoldsApi | wordManifoldCreate | POST /word_manifolds | Create a word manifold model. FeersumNluApi.Word_manifoldsApi | wordManifoldGetSimilarWords | POST /word_manifolds/{instance_name}/similar_words | Find similar words. FeersumNluApi.Word_manifoldsApi | wordManifoldSpellCorrect | POST /word_manifolds/{instance_name}/spell_correct | Spell correct a word.
Documentation for Models
- FeersumNluApi.ClassLabel
- FeersumNluApi.ClassLabelList
- FeersumNluApi.ClassLabelPair
- FeersumNluApi.CreateDetails
- FeersumNluApi.DashboardDetail
- FeersumNluApi.DashboardModelDetail
- FeersumNluApi.DateList
- FeersumNluApi.DucklingEntCreateDetails
- FeersumNluApi.DucklingInstanceDetail
- FeersumNluApi.DucklingInstanceDetailList
- FeersumNluApi.Entity
- FeersumNluApi.EntityList
- FeersumNluApi.InstanceDetail
- FeersumNluApi.InstanceDetailList
- FeersumNluApi.LabeledWordManifold
- FeersumNluApi.LabelledTextSample
- FeersumNluApi.LabelledTextSampleList
- FeersumNluApi.Lr4CreateDetails
- FeersumNluApi.Lr4InstanceDetail
- FeersumNluApi.Lr4InstanceDetailList
- FeersumNluApi.ModelDate
- FeersumNluApi.NewWord
- FeersumNluApi.NewWordList
- FeersumNluApi.RegexEntCreateDetails
- FeersumNluApi.RegexInstanceDetail
- FeersumNluApi.RegexInstanceDetailList
- FeersumNluApi.ScoredLabel
- FeersumNluApi.ScoredLabelList
- FeersumNluApi.Sentiment
- FeersumNluApi.SimilarityEntCreateDetails
- FeersumNluApi.SimilarityInstanceDetail
- FeersumNluApi.SimilarityInstanceDetailList
- FeersumNluApi.TextInput
- FeersumNluApi.TotalSamples
- FeersumNluApi.TrainDetails
- FeersumNluApi.WordAndDistance
- FeersumNluApi.WordAndDistanceList
- FeersumNluApi.WordAndThreshold
Documentation for Authorization
APIKeyHeader
- Type: API key
- API key parameter name: AUTH_TOKEN
- Location: HTTP header