REST Resource: projects.locations.glossaries

Resource: Glossary

Represents a glossary built from user-provided data.

JSON representation
{
  "name": string,
  "inputConfig": {
    object (GlossaryInputConfig)
  },
  "entryCount": integer,
  "submitTime": string,
  "endTime": string,
  "displayName": string,

  // Union field languages can be only one of the following:
  "languagePair": {
    object (LanguageCodePair)
  },
  "languageCodesSet": {
    object (LanguageCodesSet)
  }
  // End of list of possible types for union field languages.
}
Fields
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".

displayName

string

Optional. The display name of the glossary.

Union field 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

string

Required. The ISO-639 language code of the input text, for example, "en-US". Expected to be an exact match for GlossaryTerm.language_code.

targetLanguageCode

string

Required. The ISO-639 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[]

string

The ISO-639 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 can be only one of the following:
  "gcsSource": {
    object (GcsSource)
  }
  // End of list of possible types for union field source.
}
Fields
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): Two column file, tab- or comma-separated. The first column is source text. The second column is target text. No headers in this file. The first row contains data and 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

string

Required. Source data URI. For example, gs://my_bucket/my_object.

Methods

create

Creates a glossary and returns the long-running operation.

delete

Deletes a glossary, or cancels glossary construction if the glossary isn't created yet.

get

Gets a glossary.

list

Lists glossaries in a project.

patch

Updates a glossary.