@@ -26,44 +26,66 @@ option java_multiple_files = true;
2626option java_outer_classname = "LanguageServiceProto" ;
2727option java_package = "com.google.cloud.language.v1beta2" ;
2828
29-
3029// Provides text analysis operations such as sentiment analysis and entity
3130// recognition.
3231service LanguageService {
3332 // Analyzes the sentiment of the provided text.
34- rpc AnalyzeSentiment (AnalyzeSentimentRequest ) returns (AnalyzeSentimentResponse ) {
35- option (google.api.http ) = { post : "/v1beta2/documents:analyzeSentiment" body: "*" };
33+ rpc AnalyzeSentiment (AnalyzeSentimentRequest )
34+ returns (AnalyzeSentimentResponse ) {
35+ option (google.api.http ) = {
36+ post : "/v1beta2/documents:analyzeSentiment"
37+ body : "*"
38+ };
3639 }
3740
3841 // Finds named entities (currently proper names and common nouns) in the text
3942 // along with entity types, salience, mentions for each entity, and
4043 // other properties.
41- rpc AnalyzeEntities (AnalyzeEntitiesRequest ) returns (AnalyzeEntitiesResponse ) {
42- option (google.api.http ) = { post : "/v1beta2/documents:analyzeEntities" body: "*" };
44+ rpc AnalyzeEntities (AnalyzeEntitiesRequest )
45+ returns (AnalyzeEntitiesResponse ) {
46+ option (google.api.http ) = {
47+ post : "/v1beta2/documents:analyzeEntities"
48+ body : "*"
49+ };
4350 }
4451
45- // Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities] in the text and analyzes
46- // sentiment associated with each entity and its mentions.
47- rpc AnalyzeEntitySentiment (AnalyzeEntitySentimentRequest ) returns (AnalyzeEntitySentimentResponse ) {
48- option (google.api.http ) = { post : "/v1beta2/documents:analyzeEntitySentiment" body: "*" };
52+ // Finds entities, similar to
53+ // [AnalyzeEntities][google.cloud.language.v1beta2.LanguageService.AnalyzeEntities]
54+ // in the text and analyzes sentiment associated with each entity and its
55+ // mentions.
56+ rpc AnalyzeEntitySentiment (AnalyzeEntitySentimentRequest )
57+ returns (AnalyzeEntitySentimentResponse ) {
58+ option (google.api.http ) = {
59+ post : "/v1beta2/documents:analyzeEntitySentiment"
60+ body : "*"
61+ };
4962 }
5063
5164 // Analyzes the syntax of the text and provides sentence boundaries and
5265 // tokenization along with part of speech tags, dependency trees, and other
5366 // properties.
5467 rpc AnalyzeSyntax (AnalyzeSyntaxRequest ) returns (AnalyzeSyntaxResponse ) {
55- option (google.api.http ) = { post : "/v1beta2/documents:analyzeSyntax" body: "*" };
68+ option (google.api.http ) = {
69+ post : "/v1beta2/documents:analyzeSyntax"
70+ body : "*"
71+ };
5672 }
5773
5874 // Classifies a document into categories.
5975 rpc ClassifyText (ClassifyTextRequest ) returns (ClassifyTextResponse ) {
60- option (google.api.http ) = { post : "/v1beta2/documents:classifyText" body: "*" };
76+ option (google.api.http ) = {
77+ post : "/v1beta2/documents:classifyText"
78+ body : "*"
79+ };
6180 }
6281
6382 // A convenience method that provides all syntax, sentiment, entity, and
6483 // classification features in one call.
6584 rpc AnnotateText (AnnotateTextRequest ) returns (AnnotateTextResponse ) {
66- option (google.api.http ) = { post : "/v1beta2/documents:annotateText" body: "*" };
85+ option (google.api.http ) = {
86+ post : "/v1beta2/documents:annotateText"
87+ body : "*"
88+ };
6789 }
6890}
6991
@@ -117,8 +139,8 @@ message Sentence {
117139 TextSpan text = 1 ;
118140
119141 // For calls to [AnalyzeSentiment][] or if
120- // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment] is set to
121- // true, this field will contain the sentiment for the sentence.
142+ // [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_document_sentiment]
143+ // is set to true, this field will contain the sentiment for the sentence.
122144 Sentiment sentiment = 2 ;
123145}
124146
@@ -178,9 +200,9 @@ message Entity {
178200 repeated EntityMention mentions = 5 ;
179201
180202 // For calls to [AnalyzeEntitySentiment][] or if
181- // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to
182- // true, this field will contain the aggregate sentiment expressed for this
183- // entity in the provided document.
203+ // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment]
204+ // is set to true, this field will contain the aggregate sentiment expressed
205+ // for this entity in the provided document.
184206 Sentiment sentiment = 6 ;
185207}
186208
@@ -827,9 +849,9 @@ message EntityMention {
827849 Type type = 2 ;
828850
829851 // For calls to [AnalyzeEntitySentiment][] or if
830- // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment] is set to
831- // true, this field will contain the sentiment expressed for this mention of
832- // the entity in the provided document.
852+ // [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1beta2.AnnotateTextRequest.Features.extract_entity_sentiment]
853+ // is set to true, this field will contain the sentiment expressed for this
854+ // mention of the entity in the provided document.
833855 Sentiment sentiment = 3 ;
834856}
835857
@@ -839,7 +861,9 @@ message TextSpan {
839861 string content = 1 ;
840862
841863 // The API calculates the beginning offset of the content in the original
842- // document according to the [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the API request.
864+ // document according to the
865+ // [EncodingType][google.cloud.language.v1beta2.EncodingType] specified in the
866+ // API request.
843867 int32 begin_offset = 2 ;
844868}
845869
@@ -870,7 +894,8 @@ message AnalyzeSentimentResponse {
870894
871895 // The language of the text, which will be the same as the language specified
872896 // in the request or, if not specified, the automatically-detected language.
873- // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details.
897+ // See [Document.language][google.cloud.language.v1beta2.Document.language]
898+ // field for more details.
874899 string language = 2 ;
875900
876901 // The sentiment for all the sentences in the document.
@@ -893,7 +918,8 @@ message AnalyzeEntitySentimentResponse {
893918
894919 // The language of the text, which will be the same as the language specified
895920 // in the request or, if not specified, the automatically-detected language.
896- // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details.
921+ // See [Document.language][google.cloud.language.v1beta2.Document.language]
922+ // field for more details.
897923 string language = 2 ;
898924}
899925
@@ -913,7 +939,8 @@ message AnalyzeEntitiesResponse {
913939
914940 // The language of the text, which will be the same as the language specified
915941 // in the request or, if not specified, the automatically-detected language.
916- // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details.
942+ // See [Document.language][google.cloud.language.v1beta2.Document.language]
943+ // field for more details.
917944 string language = 2 ;
918945}
919946
@@ -936,7 +963,8 @@ message AnalyzeSyntaxResponse {
936963
937964 // The language of the text, which will be the same as the language specified
938965 // in the request or, if not specified, the automatically-detected language.
939- // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details.
966+ // See [Document.language][google.cloud.language.v1beta2.Document.language]
967+ // field for more details.
940968 string language = 3 ;
941969}
942970
@@ -1006,7 +1034,8 @@ message AnnotateTextResponse {
10061034
10071035 // The language of the text, which will be the same as the language specified
10081036 // in the request or, if not specified, the automatically-detected language.
1009- // See [Document.language][google.cloud.language.v1beta2.Document.language] field for more details.
1037+ // See [Document.language][google.cloud.language.v1beta2.Document.language]
1038+ // field for more details.
10101039 string language = 5 ;
10111040
10121041 // Categories identified in the input document.
0 commit comments