@datafire/text2data

3.0.0 • Public • Published

@datafire/text2data

Client library for Text Analytics & Sentiment Analysis API | api.text2data.com

Installation and Usage

npm install --save @datafire/text2data
let text2data = require('@datafire/text2data').create({
  PrivateKey: ""
});

.then(data => {
  console.log(data);
});

Description

The current api version is v3.4



The api methods listed below can be called directly from this page to test the output. You might set the api_key to pre-authenticate all requests on this page (this will work if your secret is blank).



API endpoint URL: http://{apiName}.text2data.com/v3/ {method}

The api can be consumed directly or using our SDK. Our Excel Add-In and Google Sheets Add-on are also using this api to process the data.

Actions

Analyze_Get

Test api response without api key

text2data.Analyze_Get(null, context)

Input

This action has no parameters

Output

Analyze_Post

Sample request:

POST /Analyze
{
   "DocumentText": "Excellent location, opposite a very large mall with wide variety of shops, restaurants and more.",
   "PrivateKey": "your_api_key",
   "Secret": ""
}
text2data.Analyze_Post({
  "requestDoc": {
    "DocumentText": "",
    "PrivateKey": ""
  }
}, context)

Input

  • input object

Output

Categorize_Get

Test api response without api key

text2data.Categorize_Get(null, context)

Input

This action has no parameters

Output

Categorize_Post

Sample request:

POST /Categorize
{
   "DocumentText": "Excellent location, opposite a very large mall with wide variety of shops, restaurants and more.",
   "PrivateKey": "your_api_key",
   "UserCategoryModelName": "your_model_name",
   "Secret": ""
}
text2data.Categorize_Post({
  "requestDoc": {
    "DocumentText": "",
    "PrivateKey": ""
  }
}, context)

Input

  • input object

Output

Extract_Get

Test api response without api key

text2data.Extract_Get(null, context)

Input

This action has no parameters

Output

Extract_Post

Sample request:

POST /Extract
{
   "DocumentText": "Excellent location, opposite a very large mall with wide variety of shops, restaurants and more.",
   "PrivateKey": "your_api_key",
   "UserCategoryModelName": "your_model_name",
   "Secret": ""
}
text2data.Extract_Post({
  "requestDoc": {
    "DocumentText": "",
    "PrivateKey": ""
  }
}, context)

Input

  • input object

Output

Definitions

ApiConfig

  • ApiConfig object
    • APIPrivateKey string
    • APISecret string
    • BlacklistedWords array
      • items string
    • ErrorMessage string
    • IsRequestStatusOK boolean

Category

  • Category object
    • CategoryName string
    • Score number

Document

  • Document object
    • DocumentLanguage string
    • DocumentText required string
    • IsTwitterContent boolean
    • PrivateKey required string
    • RequestIdentifier string
    • Secret string
    • SerializeFormat integer
    • UserCategoryModelName string

DocumentResult

  • DocumentResult object
    • AutoCategories array
    • Citations array
    • CloudTagHTML string
    • CoreSentences array
    • DetectedLanguage string
    • DocSentimentPolarity string
    • DocSentimentResultString string
    • DocSentimentValue number
    • Entities array
    • ErrorMessage string
    • Keywords array
    • Magnitude number
    • PartsOfSpeech array
    • ResultTextHtml string
    • SlangWords array
    • Status integer
    • StorageInfo StorageInfo
    • Subjectivity string
    • SwearWords array
    • Themes array
    • Timestamp integer
    • TransactionCurrentDay integer
    • TransactionDailyLimit integer
    • TransactionTotalCreditsLeft integer
    • TransactionUseByDate string
    • UserCategories array

PartOfSpeech

  • PartOfSpeech object
    • Action string
    • Object string
    • ObjectSentimentPolarity string
    • ObjectSentimentResultString string
    • ObjectSentimentValue number
    • Subject string
    • Text string

Sentence

  • Sentence object
    • Magnitude number
    • SentenceNumber integer
    • SentimentPolarity string
    • SentimentResultString string
    • SentimentValue number
    • Text string

SentencePart

  • SentencePart object
    • KeywordType string
    • Magnitude number
    • Mentions integer
    • SentencePartType string
    • SentenceText string
    • SentimentPolarity string
    • SentimentResult string
    • SentimentValue number
    • Text string

SlangWord

  • SlangWord object
    • SlangWordText string
    • SlangWordTranslation string

StorageInfo

  • StorageInfo object
    • CreateDate string
    • DocumentText string
    • IP string
    • IsExcel boolean
    • IsGSExcel boolean
    • IsTwitterMode boolean
    • PrivateKey string
    • RequestIdentifier string
    • UserCategoryModelName string

Readme

Keywords

none

Package Sidebar

Install

npm i @datafire/text2data

Weekly Downloads

1

Version

3.0.0

License

MIT

Unpacked Size

20.9 kB

Total Files

4

Last publish

Collaborators

  • datafire