🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

@datafire/text2data

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datafire/text2data

DataFire integration for Text Analytics & Sentiment Analysis API | api.text2data.com

3.0.0
latest
Source
npm
Version published
Weekly downloads
1
-80%
Maintainers
1
Weekly downloads
 
Created
Source

@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

  • output DocumentResult

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

FAQs

Package last updated on 21 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts