sentiment_analysis
Module sentiment_analysis
ajai21/sentiment_analysis
Prints "Hello, World!" with a main function. [//]: # (above is the module summary)
Module Overview
Provides an overview about the module when generating the API documentations. For example, refer to https://lib.ballerina.io/ballerina/io/latest
Functions
hello
Returns the string Hello
with the input string name.
Parameters
- name string? - name as a string or nil
Return Type
- string - "Hello, " with the input string name
Clients
sentiment_analysis: Client
Constructor
Gets invoked to initialize the connector
.
init (ConnectionConfig config, string serviceUrl)
- config ConnectionConfig {} - The configurations to be used when initializing the
connector
- serviceUrl string "http://localhost:9000/text-processing" - URL of the target service
post api/sentiment
Parameters
- payload Post -
Records
sentiment_analysis: 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
sentiment_analysis: 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-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
sentiment_analysis: Post
Fields
- text string -
sentiment_analysis: Probability
Fields
- neg decimal -
- neutral decimal -
- pos decimal -
sentiment_analysis: 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
sentiment_analysis: Sentiment
Fields
- probability Probability -
- label string -
Import
import ajai21/sentiment_analysis;
Metadata
Released date: 4 months ago
Version: 0.1.0
Compatibility
Platform: any
Ballerina version: 2201.9.0
GraalVM compatible: Yes
Pull count
Total: 0
Current verison: 0
Weekly downloads
Other versions
0.1.0