3.0.0 • Published 5 years ago
@datafire/text2data v3.0.0
@datafire/text2data
Client library for Text Analytics & Sentiment Analysis API | api.text2data.com
Installation and Usage
npm install --save @datafire/text2datalet text2data = require('@datafire/text2data').create({
PrivateKey: ""
});
.then(data => {
console.log(data);
});Description
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- requestDoc required Document
Output
- output DocumentResult
Categorize_Get
Test api response without api key
text2data.Categorize_Get(null, context)Input
This action has no parameters
Output
- output DocumentResult
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- requestDoc required Document
Output
- output DocumentResult
Extract_Get
Test api response without api key
text2data.Extract_Get(null, context)Input
This action has no parameters
Output
- output DocumentResult
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- requestDoc required Document
Output
- output DocumentResult
Definitions
ApiConfig
- ApiConfig
object- APIPrivateKey
string - APISecret
string - BlacklistedWords
array- items
string
- items
- ErrorMessage
string - IsRequestStatusOK
boolean
- APIPrivateKey
Category
- Category
object- CategoryName
string - Score
number
- CategoryName
Document
- Document
object- DocumentLanguage
string - DocumentText required
string - IsTwitterContent
boolean - PrivateKey required
string - RequestIdentifier
string - Secret
string - SerializeFormat
integer - UserCategoryModelName
string
- DocumentLanguage
DocumentResult
- DocumentResult
object- AutoCategories
array- items Category
- Citations
array- items SentencePart
- CloudTagHTML
string - CoreSentences
array- items Sentence
- DetectedLanguage
string - DocSentimentPolarity
string - DocSentimentResultString
string - DocSentimentValue
number - Entities
array- items SentencePart
- ErrorMessage
string - Keywords
array- items SentencePart
- Magnitude
number - PartsOfSpeech
array- items PartOfSpeech
- ResultTextHtml
string - SlangWords
array- items SlangWord
- Status
integer - StorageInfo StorageInfo
- Subjectivity
string - SwearWords
array- items SlangWord
- Themes
array- items SentencePart
- Timestamp
integer - TransactionCurrentDay
integer - TransactionDailyLimit
integer - TransactionTotalCreditsLeft
integer - TransactionUseByDate
string - UserCategories
array- items Category
- AutoCategories
PartOfSpeech
- PartOfSpeech
object- Action
string - Object
string - ObjectSentimentPolarity
string - ObjectSentimentResultString
string - ObjectSentimentValue
number - Subject
string - Text
string
- Action
Sentence
- Sentence
object- Magnitude
number - SentenceNumber
integer - SentimentPolarity
string - SentimentResultString
string - SentimentValue
number - Text
string
- Magnitude
SentencePart
- SentencePart
object- KeywordType
string - Magnitude
number - Mentions
integer - SentencePartType
string - SentenceText
string - SentimentPolarity
string - SentimentResult
string - SentimentValue
number - Text
string
- KeywordType
SlangWord
- SlangWord
object- SlangWordText
string - SlangWordTranslation
string
- SlangWordText
StorageInfo
- StorageInfo
object- CreateDate
string - DocumentText
string - IP
string - IsExcel
boolean - IsGSExcel
boolean - IsTwitterMode
boolean - PrivateKey
string - RequestIdentifier
string - UserCategoryModelName
string
- CreateDate
3.0.0
5 years ago