mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-22 15:25:19 +00:00
add the sentiment service
This commit is contained in:
23
sentiment/proto/sentiment.proto
Normal file
23
sentiment/proto/sentiment.proto
Normal file
@@ -0,0 +1,23 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package sentiment;
|
||||
|
||||
option go_package = "./proto;sentiment";
|
||||
|
||||
service Sentiment {
|
||||
rpc Analyze(Request) returns (Response) {};
|
||||
}
|
||||
|
||||
// Analyze and score a piece of text
|
||||
message Request {
|
||||
// The text to analyze
|
||||
string text = 1;
|
||||
// The language. Defaults to english.
|
||||
string lang = 2;
|
||||
}
|
||||
|
||||
message Response {
|
||||
// The score of the text
|
||||
double score = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user