You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// is set to true, this field will contain the sentiment for the sentence.
154
+
// [AnnotateTextRequest.Features.extract_document_sentiment][google.cloud.language.v1.AnnotateTextRequest.Features.extract_document_sentiment] is set to
155
+
// true, this field will contain the sentiment for the sentence.
142
156
Sentimentsentiment=2;
143
157
}
144
158
145
159
// Represents a phrase in the text that is a known entity, such as
146
160
// a person, an organization, or location. The API associates information, such
147
161
// as salience and mentions, with entities.
148
162
messageEntity {
149
-
// The type of the entity.
163
+
// The type of the entity. For most entity types, the associated metadata is a
164
+
// Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`). The table
165
+
// below lists the associated fields for entities that have different
166
+
// metadata.
150
167
enumType {
151
168
// Unknown
152
169
UNKNOWN=0;
@@ -163,28 +180,53 @@ message Entity {
163
180
// Event
164
181
EVENT=4;
165
182
166
-
// Work of art
183
+
// Artwork
167
184
WORK_OF_ART=5;
168
185
169
-
// Consumer goods
186
+
// Consumer product
170
187
CONSUMER_GOOD=6;
171
188
172
-
// Other types
189
+
// Other types of entities
173
190
OTHER=7;
174
191
175
-
// Phone number
192
+
// Phone number<br><br>
193
+
// The metadata lists the phone number, formatted according to local
194
+
// convention, plus whichever additional elements appear in the text:<ul>
195
+
// <li><code>number</code> – the actual number, broken down into
196
+
// sections as per local convention</li> <li><code>national_prefix</code>
197
+
// – country code, if detected</li> <li><code>area_code</code> –
198
+
// region or area code, if detected</li> <li><code>extension</code> –
199
+
// phone extension (to be dialed after connection), if detected</li></ul>
176
200
PHONE_NUMBER=9;
177
201
178
-
// Address
202
+
// Address<br><br>
203
+
// The metadata identifies the street number and locality plus whichever
204
+
// additional elements appear in the text:<ul>
205
+
// <li><code>street_number</code> – street number</li>
206
+
// <li><code>locality</code> – city or town</li>
207
+
// <li><code>street_name</code> – street/route name, if detected</li>
208
+
// <li><code>postal_code</code> – postal code, if detected</li>
209
+
// <li><code>country</code> – country, if detected</li>
210
+
// <li><code>broad_region</code> – administrative area, such as the
211
+
// state, if detected</li> <li><code>narrow_region</code> – smaller
212
+
// administrative area, such as county, if detected</li>
213
+
// <li><code>sublocality</code> – used in Asian addresses to demark a
214
+
// district within a city, if detected</li></ul>
179
215
ADDRESS=10;
180
216
181
-
// Date
217
+
// Date<br><br>
218
+
// The metadata identifies the components of the date:<ul>
219
+
// <li><code>year</code> – four digit year, if detected</li>
220
+
// <li><code>month</code> – two digit month number, if detected</li>
221
+
// <li><code>day</code> – two digit day number, if detected</li></ul>
182
222
DATE=11;
183
223
184
-
// Number
224
+
// Number<br><br>
225
+
// The metadata is the number itself.
185
226
NUMBER=12;
186
227
187
-
// Price
228
+
// Price<br><br>
229
+
// The metadata identifies the <code>value</code> and <code>currency</code>.
188
230
PRICE=13;
189
231
}
190
232
@@ -196,8 +238,9 @@ message Entity {
196
238
197
239
// Metadata associated with the entity.
198
240
//
199
-
// Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if
200
-
// available. The associated keys are "wikipedia_url" and "mid", respectively.
241
+
// For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`)
242
+
// and Knowledge Graph MID (`mid`), if they are available. For the metadata
243
+
// associated with other entity types, see the Type table below.
201
244
map<string, string> metadata=3;
202
245
203
246
// The salience score associated with the entity in the [0, 1.0] range.
0 commit comments