GoogleApi.ContentWarehouse.V1.Model.GoodocLanguageLabel
Table of Contents ▼
Jump to a specific part of the page:
- Description
- Attribute List
- Attributes
- Type
- Function
- Related links
- Possibly related Modules
Description
Language label
Attributes List
This module has the following attributes (case-insensitive ascending order):
Attributes
-
ClosestLanguageId
(type:integer()
, default:nil
)
- Closest id from i18n/languages/proto/languages.proto; caveat: may not accurately capture the language. GoodocLanguageCodeToLanguage() declared in ocr/goodoc/goodoc-utils.h may be used to convert a Language enum (i18n/languages/proto/languages.proto) to a string suitable for this field. -
Confidence
(type:integer()
, default:nil
)
- Confidence level on that language, between 0 and 100 -
LanguageCode
(type:String.t
, default:nil
)
- Old (Ocean) Language Code Usage: The language code is inferred during the running of the Garbage Text Detector and gets set at the paragraph, block and page level. Language code is a string of 3 or more characters. The first 3 letters specify the language, according to ISO 639. Optionally, the 3-letter code can be extended with an underscore and a language variant specifier. Specifiers exist for regional variants or for different forms of language spelling. The regional variants are specified as 2-letter country code, according to ISO 3166. Some examples: Standard "por" - Portuguese, standard "rus" - Russian, standard Regional variants: "por_br" - Portuguese, Brazilian "eng_us" - English, United States Variants of spelling: "rus_old" - Russian, old spelling "chi_tra" - Chinese, traditional "ger_new" - German, new spelling LanguageToGoodocLanguageCode() declared in ocr/goodoc/goodoc-utils.h may be used to convert a Language enum (i18n/languages/proto/languages.proto) to a string suitable for this field. New Language Code Usage: Most of the usages described above were standardized in BCP 47, and these codes are the new stanadard to be used in this field. To load either new or old language codes to form LanguageCode objects, use the function FromOceanCode() in ocr/quality/lang_util.h Note that the function ocr::FromOceanCode is capable of transforming either version of the LanguageCode to a C++ i18n_identifiers::LanguageCode.
Type
Function
@spec decode(struct(), keyword()) :: struct()Data sourced from HexDocs : GoogleApi.ContentWarehouse.V1.Model.GoodocLanguageLabel