mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-12 11:15:12 +00:00
24 lines
433 B
Protocol Buffer
24 lines
433 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package sentiment;
|
|
|
|
option go_package = "./proto;sentiment";
|
|
|
|
service Sentiment {
|
|
rpc Analyze(AnalyzeRequest) returns (AnalyzeResponse) {};
|
|
}
|
|
|
|
// Analyze and score a piece of text
|
|
message AnalyzeRequest {
|
|
// The text to analyze
|
|
string text = 1;
|
|
// The language. Defaults to english.
|
|
string lang = 2;
|
|
}
|
|
|
|
message AnalyzeResponse {
|
|
// The score of the text {positive is 1, negative is 0}
|
|
double score = 1;
|
|
}
|
|
|