text2data
Module text2data
![](https://bcentral-packageicons.azureedge.net/images/ballerinax_text2data_1.5.0.png)
ballerinax/text2data Ballerina library
Overview
This is a generated connector for Text Analytics & Sentiment Analysis API v3.4 OpenAPI specification.
This API provides Text Analytics Platform that uses NLP (Natural Language Processing) and Machine Learning to your work environment. Extract essential information from your text documents and let Artificial Intelligence save your time. Get detailed and agile reports on your unstructured data.
Prerequisites
Before using this connector in your Ballerina application, complete the following:
- Create Text2data Account
- Obtaining tokens by following this link and obtain the api key.
Clients![](/images/permalink.svg)
text2data: Client![](/images/permalink.svg)
This is a generated connector for Text Analytics & Sentiment Analysis API v3.4 OpenAPI specification. 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.'
Constructor![](/images/permalink.svg)
Gets invoked to initialize the connector
.
The connector initialization requires setting the API credentials.
Create an Interzoid Account and obtain tokens by log into Interzoid Account.
init (ApiKeysConfig apiKeyConfig, ConnectionConfig config, string serviceUrl)
- apiKeyConfig ApiKeysConfig - API keys for authorization
- config ConnectionConfig {} - The configurations to be used when initializing the
connector
- serviceUrl string "http://api.text2data.org/" - URL of the target service
analyzeGet![](/images/permalink.svg)
function analyzeGet() returns DocumentResult|error
Test api response without api key
Return Type
- DocumentResult|error - OK
analyzePost![](/images/permalink.svg)
function analyzePost(Document payload) returns DocumentResult|error
Sentiment analysis service
Parameters
- payload Document - Document payload in form of text, json or xml.
Return Type
- DocumentResult|error - OK
categorizeGet![](/images/permalink.svg)
function categorizeGet() returns DocumentResult|error
Test api response without api key
Return Type
- DocumentResult|error - OK
categorizePost![](/images/permalink.svg)
function categorizePost(Document payload) returns DocumentResult|error
Document categorization service
Parameters
- payload Document - Document payload in form of text, json or xml.
Return Type
- DocumentResult|error - OK
extractGet![](/images/permalink.svg)
function extractGet() returns DocumentResult|error
Test api response without api key
Return Type
- DocumentResult|error - OK
extractPost![](/images/permalink.svg)
function extractPost(Document payload) returns DocumentResult|error
Document extraction service
Parameters
- payload Document - Document payload in form of text, json or xml.
Return Type
- DocumentResult|error - OK
Records![](/images/permalink.svg)
text2data: ApiConfig![](/images/permalink.svg)
Fields
- APIPrivateKey string? -
- APISecret string? -
- BlacklistedWords string[]? -
- ErrorMessage string? -
- IsRequestStatusOK boolean? -
text2data: ApiKeysConfig![](/images/permalink.svg)
Provides API key configurations needed when communicating with a remote HTTP endpoint.
Fields
- privateKey string - All requests on this API needs to include an API key.
The API key can be provided as part of the query string or as a request header. The name of the API key needs to be
PrivateKey
.
text2data: Category![](/images/permalink.svg)
Fields
- CategoryName string? -
- Score decimal? -
text2data: ClientHttp1Settings![](/images/permalink.svg)
Provides settings related to HTTP/1.x protocol.
Fields
- keepAlive KeepAlive(default http:KEEPALIVE_AUTO) - Specifies whether to reuse a connection for multiple requests
- chunking Chunking(default http:CHUNKING_AUTO) - The chunking behaviour of the request
- proxy ProxyConfig? - Proxy server related options
text2data: ConnectionConfig![](/images/permalink.svg)
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings? - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings? - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- poolConfig PoolConfiguration? - Configurations associated with request pooling
- cache CacheConfig? - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig? - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig? - Configurations associated with retrying
- responseLimits ResponseLimitConfigs? - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket? - SSL/TLS-related options
- proxy ProxyConfig? - Proxy server related options
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
text2data: Document![](/images/permalink.svg)
Fields
- DocumentLanguage string? -
- DocumentText string -
- IsTwitterContent boolean? -
- PrivateKey string -
- RequestIdentifier string? -
- Secret string? -
- SerializeFormat int? -
- UserCategoryModelName string? -
text2data: DocumentResult![](/images/permalink.svg)
Fields
- AutoCategories Category[]? -
- Citations SentencePart[]? -
- CloudTagHTML string? -
- CoreSentences Sentence[]? -
- DetectedLanguage string? -
- DocSentimentPolarity string? -
- DocSentimentResultString string? -
- DocSentimentValue decimal? -
- Entities SentencePart[]? -
- ErrorMessage string? -
- Keywords SentencePart[]? -
- Magnitude decimal? -
- PartsOfSpeech PartOfSpeech[]? -
- ResultTextHtml string? -
- SlangWords SlangWord[]? -
- Status int? -
- StorageInfo StorageInfo? -
- Subjectivity string? -
- SwearWords SlangWord[]? -
- Themes SentencePart[]? -
- Timestamp int? -
- TransactionCurrentDay int? -
- TransactionDailyLimit int? -
- TransactionTotalCreditsLeft int? -
- TransactionUseByDate string? -
- UserCategories Category[]? -
text2data: PartOfSpeech![](/images/permalink.svg)
Fields
- Action string? -
- Object string? -
- ObjectSentimentPolarity string? -
- ObjectSentimentResultString string? -
- ObjectSentimentValue decimal? -
- Subject string? -
- Text string? -
text2data: ProxyConfig![](/images/permalink.svg)
Proxy server configurations to be used with the HTTP client endpoint.
Fields
- host string(default "") - Host name of the proxy server
- port int(default 0) - Proxy server port
- userName string(default "") - Proxy server username
- password string(default "") - Proxy server password
text2data: Sentence![](/images/permalink.svg)
Fields
- Magnitude decimal? -
- SentenceNumber int? -
- SentimentPolarity string? -
- SentimentResultString string? -
- SentimentValue decimal? -
- Text string? -
text2data: SentencePart![](/images/permalink.svg)
Fields
- KeywordType string? -
- Magnitude decimal? -
- Mentions int? -
- SentencePartType string? -
- SentenceText string? -
- SentimentPolarity string? -
- SentimentResult string? -
- SentimentValue decimal? -
- Text string? -
text2data: SlangWord![](/images/permalink.svg)
Fields
- SlangWordText string? -
- SlangWordTranslation string? -
text2data: StorageInfo![](/images/permalink.svg)
Fields
- CreateDate string? -
- DocumentText string? -
- IP string? -
- IsExcel boolean? -
- IsGSExcel boolean? -
- IsTwitterMode boolean? -
- PrivateKey string? -
- RequestIdentifier string? -
- UserCategoryModelName string? -
Import
import ballerinax/text2data;
Metadata
Released date: over 1 year ago
Version: 1.5.0
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.4.1
GraalVM compatible: Yes
Pull count
Total: 0
Current verison: 0
Weekly downloads
Keywords
Business Intelligence/Analytics
Cost/Freemium
Contributors
Dependencies