text2data
Module text2data
ballerinax/text2data Ballerina library
Overview
The Text Analytics & Sentiment Analysis API v3.4 connector(http://api.text2data.com/swagger/ui/index#/) 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.
Key Features
- Programmatic access to create and manage resources via REST API
- Access analytics, reports, and performance metrics
- Manage user accounts and profiles
- Secure authentication with API key or OAuth support
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
text2data: Client
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
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
function analyzeGet() returns DocumentResult|errorTest api response without api key
Return Type
- DocumentResult|error - OK
analyzePost
function analyzePost(Document payload) returns DocumentResult|errorSentiment analysis service
Parameters
- payload Document - Document payload in form of text, json or xml.
Return Type
- DocumentResult|error - OK
categorizeGet
function categorizeGet() returns DocumentResult|errorTest api response without api key
Return Type
- DocumentResult|error - OK
categorizePost
function categorizePost(Document payload) returns DocumentResult|errorDocument categorization service
Parameters
- payload Document - Document payload in form of text, json or xml.
Return Type
- DocumentResult|error - OK
extractGet
function extractGet() returns DocumentResult|errorTest api response without api key
Return Type
- DocumentResult|error - OK
extractPost
function extractPost(Document payload) returns DocumentResult|errorDocument extraction service
Parameters
- payload Document - Document payload in form of text, json or xml.
Return Type
- DocumentResult|error - OK
Records
text2data: ApiConfig
Fields
- APIPrivateKey? string -
- APISecret? string -
- BlacklistedWords? string[] -
- ErrorMessage? string -
- IsRequestStatusOK? boolean -
text2data: ApiKeysConfig
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
Fields
- CategoryName? string -
- Score? decimal -
text2data: ClientHttp1Settings
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
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-forwardedheader
- 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
Fields
- DocumentLanguage? string -
- DocumentText string -
- IsTwitterContent? boolean -
- PrivateKey string -
- RequestIdentifier? string -
- Secret? string -
- SerializeFormat? int -
- UserCategoryModelName? string -
text2data: DocumentResult
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
Fields
- Action? string -
- Object? string -
- ObjectSentimentPolarity? string -
- ObjectSentimentResultString? string -
- ObjectSentimentValue? decimal -
- Subject? string -
- Text? string -
text2data: ProxyConfig
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
Fields
- Magnitude? decimal -
- SentenceNumber? int -
- SentimentPolarity? string -
- SentimentResultString? string -
- SentimentValue? decimal -
- Text? string -
text2data: SentencePart
Fields
- KeywordType? string -
- Magnitude? decimal -
- Mentions? int -
- SentencePartType? string -
- SentenceText? string -
- SentimentPolarity? string -
- SentimentResult? string -
- SentimentValue? decimal -
- Text? string -
text2data: SlangWord
Fields
- SlangWordText? string -
- SlangWordTranslation? string -
text2data: StorageInfo
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: 3 days ago
Version: 1.5.2
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.8.0
GraalVM compatible: Yes
Pull count
Total: 27
Current verison: 0
Weekly downloads
Keywords
Type/Connector
Vendor/Text2Data
Area/Developer Tools
Business Intelligence/Analytics
Cost/Freemium
Contributors
Dependencies