Skip to content

Commit

Permalink
docs: fix docstring formatting
Browse files Browse the repository at this point in the history
Committer: @parthea
PiperOrigin-RevId: 476410563
  • Loading branch information
Google APIs authored and Copybara-Service committed Sep 23, 2022
1 parent 1dc77cf commit 7f579ee
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 37 deletions.
58 changes: 23 additions & 35 deletions google/cloud/language/v1/language_service.proto
@@ -1,4 +1,4 @@
// Copyright 2019 Google LLC.
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -34,8 +34,7 @@ service LanguageService {
"https://www.googleapis.com/auth/cloud-platform";

// Analyzes the sentiment of the provided text.
rpc AnalyzeSentiment(AnalyzeSentimentRequest)
returns (AnalyzeSentimentResponse) {
rpc AnalyzeSentiment(AnalyzeSentimentRequest) returns (AnalyzeSentimentResponse) {
option (google.api.http) = {
post: "/v1/documents:analyzeSentiment"
body: "*"
Expand All @@ -47,8 +46,7 @@ service LanguageService {
// Finds named entities (currently proper names and common nouns) in the text
// along with entity types, salience, mentions for each entity, and
// other properties.
rpc AnalyzeEntities(AnalyzeEntitiesRequest)
returns (AnalyzeEntitiesResponse) {
rpc AnalyzeEntities(AnalyzeEntitiesRequest) returns (AnalyzeEntitiesResponse) {
option (google.api.http) = {
post: "/v1/documents:analyzeEntities"
body: "*"
Expand All @@ -57,12 +55,9 @@ service LanguageService {
option (google.api.method_signature) = "document";
}

// Finds entities, similar to
// [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities]
// in the text and analyzes sentiment associated with each entity and its
// mentions.
rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest)
returns (AnalyzeEntitySentimentResponse) {
// Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes
// sentiment associated with each entity and its mentions.
rpc AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest) returns (AnalyzeEntitySentimentResponse) {
option (google.api.http) = {
post: "/v1/documents:analyzeEntitySentiment"
body: "*"
Expand Down Expand Up @@ -104,8 +99,6 @@ service LanguageService {
}
}

// ################################################################ #
//
// Represents the input to API methods.
message Document {
// The document types enum.
Expand Down Expand Up @@ -155,8 +148,8 @@ message Sentence {
TextSpan text = 1;

// For calls to [AnalyzeSentiment][] or if
// [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment]
// is set to true, this field will contain the sentiment for the sentence.
// [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to
// true, this field will contain the sentiment for the sentence.
Sentiment sentiment = 2;
}

Expand Down Expand Up @@ -295,9 +288,9 @@ message Entity {
repeated EntityMention mentions = 5;

// For calls to [AnalyzeEntitySentiment][] or if
// [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment]
// is set to true, this field will contain the aggregate sentiment expressed
// for this entity in the provided document.
// [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to
// true, this field will contain the aggregate sentiment expressed for this
// entity in the provided document.
Sentiment sentiment = 6;
}

Expand Down Expand Up @@ -948,9 +941,9 @@ message EntityMention {
Type type = 2;

// For calls to [AnalyzeEntitySentiment][] or if
// [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment]
// is set to true, this field will contain the sentiment expressed for this
// mention of the entity in the provided document.
// [AnnotateTextRequest.Features.extract_entity_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_entity_sentiment] is set to
// true, this field will contain the sentiment expressed for this mention of
// the entity in the provided document.
Sentiment sentiment = 3;
}

Expand All @@ -960,9 +953,7 @@ message TextSpan {
string content = 1;

// The API calculates the beginning offset of the content in the original
// document according to the
// [EncodingType][google.cloud.language.v1.EncodingType] specified in the API
// request.
// document according to the [EncodingType][google.cloud.language.v1.EncodingType] specified in the API request.
int32 begin_offset = 2;
}

Expand All @@ -980,7 +971,9 @@ message ClassificationCategory {
// Model options available for classification requests.
message ClassificationModelOptions {
// Options for the V1 model.
message V1Model {}
message V1Model {

}

// Options for the V2 model.
message V2Model {
Expand Down Expand Up @@ -1030,8 +1023,7 @@ message AnalyzeSentimentResponse {

// The language of the text, which will be the same as the language specified
// in the request or, if not specified, the automatically-detected language.
// See [Document.language][google.cloud.language.v1.Document.language] field
// for more details.
// See [Document.language][google.cloud.language.v1.Document.language] field for more details.
string language = 2;

// The sentiment for all the sentences in the document.
Expand All @@ -1054,8 +1046,7 @@ message AnalyzeEntitySentimentResponse {

// The language of the text, which will be the same as the language specified
// in the request or, if not specified, the automatically-detected language.
// See [Document.language][google.cloud.language.v1.Document.language] field
// for more details.
// See [Document.language][google.cloud.language.v1.Document.language] field for more details.
string language = 2;
}

Expand All @@ -1075,8 +1066,7 @@ message AnalyzeEntitiesResponse {

// The language of the text, which will be the same as the language specified
// in the request or, if not specified, the automatically-detected language.
// See [Document.language][google.cloud.language.v1.Document.language] field
// for more details.
// See [Document.language][google.cloud.language.v1.Document.language] field for more details.
string language = 2;
}

Expand All @@ -1099,8 +1089,7 @@ message AnalyzeSyntaxResponse {

// The language of the text, which will be the same as the language specified
// in the request or, if not specified, the automatically-detected language.
// See [Document.language][google.cloud.language.v1.Document.language] field
// for more details.
// See [Document.language][google.cloud.language.v1.Document.language] field for more details.
string language = 3;
}

Expand Down Expand Up @@ -1178,8 +1167,7 @@ message AnnotateTextResponse {

// The language of the text, which will be the same as the language specified
// in the request or, if not specified, the automatically-detected language.
// See [Document.language][google.cloud.language.v1.Document.language] field
// for more details.
// See [Document.language][google.cloud.language.v1.Document.language] field for more details.
string language = 5;

// Categories identified in the input document.
Expand Down
2 changes: 0 additions & 2 deletions google/cloud/language/v1beta2/language_service.proto
Expand Up @@ -99,8 +99,6 @@ service LanguageService {
}
}

// ################################################################ #
//
// Represents the input to API methods.
message Document {
// The document types enum.
Expand Down

0 comments on commit 7f579ee

Please sign in to comment.