RepositoryWebrefLightweightTokensMatchedLightweightToken

GoogleApi.ContentWarehouse.V1.Model.RepositoryWebrefLightweightTokensMatchedLightweightToken


Table of Contents ▼

Jump to a specific part of the page:

Description

Necessary information of lightweight token pattern with entity retrieval to pass to downstream clients. For example: FpTokenRange: normalized_text: "zurichben" language: Hungarian retrieved_entity: /m/08966 (with name "zurich") will get: MatchedLightweightToken: LightweightTokenType: "LOCATIVE" begin_offset: 6 end_offset: 9 pattern_id: 8141703461898598811 source_entity_index: 0 FpTokenRange: normalized_text: "egyesult allamokott" language: Hungarian retrieved_entity: /m/09c7w0 (with name "egyesult allamok") will get: MatchedLightweightToken: LightweightTokenType: "LOCATIVE" begin_offset: 16 end_offset: 19 pattern_id: 10449962977910715124 source_entity_index: 0 Note that begin_offset and end_offset marks the input byte range of the matched input text. For example, if the input text is [tannlegas] in Norwegian, this matches with the rewrite rule "e:as" to transform "tannlegas" to "tannlege". The matched byte range is [7, 9) on "as", therefore begin_offset = 7 and end_offset = 9. This must not be confused with the rewritten range [7, 8) on "e". Also, keep in mind these are byte offsets, not codepoints.

Attributes List

This module has the following attributes (case-insensitive ascending order):

View Attributes

Attributes

  1. additionalBeginOffset (type: integer(), default: nil)
    - The byte offset of the beging of the additional lightweight token match. e.g. the prefix pattern of the circumfix.
  2. additionalEndOffset (type: integer(), default: nil)
    - The byte offset of the end of the additional lightweight token match. e.g. the suffix pattern of the circumfix.
  3. beginOffset (type: integer(), default: nil)
    - The byte offset of the begin of the lightweight token match within each range. The default value of -1 (std::string::npos) means that there's no affix or adposition detected.
  4. endOffset (type: integer(), default: nil)
    - The byte offset of the end of the lightweight token match within each range. The default value of 0 means that there's no affix or adposition detected.
  5. patternId (type: String.t, default: nil)
    - Matched pattern Id which will be used to retrieve back pattern features. Pattern id is only populated for Enricher model.
  6. sourceEntityIndex (type: integer(), default: nil)
    - The index of the source entity in the resulting WebrefEntities or WebrefEntitiesWrapper, to which the lightweight token rule is applied. This field is only populated at the end of Qref scorer when we are sure which source entity should output.
  7. type (type: String.t, default: nil)
    - The type of the lightweight token match, which provides the semantic information.

Type

@type t() :: %GoogleApi.ContentWarehouse.V1.Model.RepositoryWebrefLightweightTokensMatchedLightweightToken{
additionalBeginOffset: integer() | nil,
additionalEndOffset: integer() | nil,
beginOffset: integer() | nil,
endOffset: integer() | nil,
patternId: String.t() | nil,
sourceEntityIndex: integer() | nil,
type: String.t() | nil
}

Function

@spec decode(struct(), keyword()) :: struct()

Data sourced from HexDocs : GoogleApi.ContentWarehouse.V1.Model.RepositoryWebrefLightweightTokensMatchedLightweightToken