Resource: Glossary
Represents a glossary built from user provided data.
JSON representation |
---|
{ "name" : string , "inputConfig" : { object ( |
name
string
Required. The resource name of the glossary. Glossary names have the form projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}
.
inputConfig
object (
GlossaryInputConfig
)
Required. Provides examples to build the glossary from. Total glossary must not exceed 10M Unicode codepoints.
entryCount
integer
Output only. The number of entries defined in the glossary.
submitTime
string (
Timestamp
format)
Output only. When glossaries.create was called.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z"
and "2014-10-02T15:01:23.045123456Z"
.
endTime
string (
Timestamp
format)
Output only. When the glossary creation was finished.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z"
and "2014-10-02T15:01:23.045123456Z"
.
languages
. Languages supported by the glossary. languages
can be only one of the following:languagePair
object (
LanguageCodePair
)
Used with unidirectional glossaries.
languageCodesSet
object (
LanguageCodesSet
)
Used with equivalent term set glossaries.
LanguageCodePair
Used with unidirectional glossaries.
JSON representation |
---|
{ "sourceLanguageCode" : string , "targetLanguageCode" : string } |
Fields | |
---|---|
sourceLanguageCode
|
Required. The BCP-47 language code of the input text, for example, "en-US". Expected to be an exact match for GlossaryTerm.language_code. |
targetLanguageCode
|
Required. The BCP-47 language code for translation output, for example, "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. |
LanguageCodesSet
Used with equivalent term set glossaries.
JSON representation |
---|
{ "languageCodes" : [ string ] } |
Fields | |
---|---|
languageCodes[]
|
The BCP-47 language code(s) for terms defined in the glossary. All entries are unique. The list contains at least two entries. Expected to be an exact match for GlossaryTerm.language_code. |
GlossaryInputConfig
Input configuration for glossaries.
JSON representation |
---|
{ // Union field |
source
. Required. Specify the input. source
can be only one of the following:gcsSource
object (
GcsSource
)
Required. Google Cloud Storage location of glossary data. File format is determined based on the filename extension. API returns google.rpc.Code.INVALID_ARGUMENT
for unsupported URI-s and file formats. Wildcards are not allowed. This must be a single file in one of the following formats:
For unidirectional glossaries:
-
TSV/CSV (
.tsv
/.csv
): 2 column file, tab- or comma-separated. The first column is source text. The second column is target text. The file must not contain headers. That is, the first row is data, not column names. -
TMX (
.tmx
): TMX file with parallel data defining source/target term pairs.
For equivalent term sets glossaries:
- CSV (
.csv
): Multi-column CSV file defining equivalent glossary terms in multiple languages. See documentation for more information - glossaries .
GcsSource
The Google Cloud Storage location for the input content.
JSON representation |
---|
{ "inputUri" : string } |
Fields | |
---|---|
inputUri
|
Required. Source data URI. For example, |
Methods |
|
---|---|
|
Creates a glossary and returns the long-running operation. |
|
Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. |
|
Gets a glossary. |
|
Lists glossaries in a project. |