KnowledgeAnswersValueType

AI Overview😉

  • The potential purpose of this module is to specify the allowed data types for a value in a knowledge graph or semantic search system. It defines a ValueType that can have various sub-types, such as entity type, string type, boolean type, etc. This allows the system to enforce specific data types for certain slots or fields, ensuring data consistency and accuracy.
  • This module could impact search results by influencing how the search algorithm interprets and processes the data. By specifying allowed data types, the system can filter out irrelevant or incorrect data, improving the overall quality of search results. For example, if a slot is defined to only accept entity types, the search algorithm can ignore any non-entity type values, leading to more accurate results.
  • To be more favorable for this function, a website could ensure that its data is accurately typed and consistent with the specified ValueType. This might involve using schema.org or other semantic markup to define the data types for specific fields, or providing additional metadata to help the search algorithm understand the data. By doing so, the website can increase the chances of its data being accurately processed and returned in search results.

Interesting Module? Vote 👇

Voting helps other researchers find interesting modules.

Current Votes: 0

GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersValueType (google_api_content_warehouse v0.4.0)

Specifies the allowed type(s) that a value can have, e.g. for a Slot. For example, having both entitytype and string_type present in a ValueType field of a Slot means that the Slot can take _either an an EntityType or StringType as a value, and nothing else. It may be helpful to think of this proto as being called something like AllAllowedValueTypes. To enforce a component-specific contract (go/contract-based-conformance) for allowed type(s), we add a repeated field viewspecific${x} for the type ${x}. For example, if we want a slot that can hold any type by default, but can only hold an integer when checking against the P2_LWA contract, then the following should be added to MeaningCatalog: slot { name: "integer_only_slot" type { // The default view has no sub_type or other options. number_type {} // The P2_LWA view specifies INTEGER sub_type. view_specific_number_types { sub_type: INTEGER component_specific_contracts: P2_LWA } } } See go/view-based-options-for-valuetype for more information. Next tag id: 26 LINT.IfChange

Attributes

  • anyType (type: GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersAnyType.t, default: nil) - This type is meant to accept "any" type and allow any and all composition. As such, it should not be used for any composition algorithms, e.g. in Loose Parser. See more detailed discussion at go/any-type-in-mrf. This type may appear on an answer_type, implying that the output of that Meaning Schema is allowed to nest in any other slot. However, support for this is NOT implemented in Loose Parser due to risk of overcomposition, but the MRF Conformance checker allows for this. If you are thinking of using this, please contact mrf-team@.
  • attributeType (type: GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersAttributeType.t, default: nil) -
  • booleanType (type: GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersBooleanType.t, default: nil) -
  • collectionType (type: GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersCollectionType.t, default: nil) -
  • compoundType (type: GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersCompoundType.t, default: nil) -
  • dateType (type: GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersDateType.t, default: nil) -
  • dependencyType (type: GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersDependencyType.t, default: nil) - Used for configuring dynamic types to allow for type transparency. See: go/type-dependencies
  • durationType (type: GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersDurationType.t, default: nil) -
  • entityType (type: GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersEntityType.t, default: nil) -
  • inputCompositionConfig (type: String.t, default: nil) - When specified on a slot's type, restricts composition based on the enum value. This does not mean anything when the value type is to be interpreted as an output_type.
  • measurementType (type: GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersMeasurementType.t, default: nil) -
  • normalizedStringType (type: GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersNormalizedStringType.t, default: nil) - Note that normalized_string_type is NOT supported in the loose parser. A slot with this type will cause the intent to not be parsed.
  • numberType (type: GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersNumberType.t, default: nil) -
  • opaqueType (type: GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersOpaqueType.t, default: nil) -
  • plexityRequirement (type: GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersPlexityRequirement.t, default: nil) -
  • polarQuestionType (type: GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersPolarQuestionType.t, default: nil) -
  • semanticType (type: GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersSemanticType.t, default: nil) -
  • stateOfAffairsType (type: GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersStateOfAffairsType.t, default: nil) -
  • stringType (type: GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersStringType.t, default: nil) -
  • timezoneType (type: GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersTimeZoneType.t, default: nil) -
  • trackingNumberType (type: GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersTrackingNumberType.t, default: nil) -
  • viewSpecificNumberTypes (type: list(GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersNumberType.t), default: nil) - LINT.IfChange Contract-specific typing (go/view-based-options-for-valuetype). NOTE: To facilitate writing macros for view-specific filtering, all view-specific fields should be named with the format "viewspecific${singular_field}s" -- e.g., for the singular field |number_type|, the view-specific repeated field is |view_specific_number_types|. LINT.ThenChange( //depot/google3/nlp/meaning/remodel/meaning_remodeling_utils.cc:ViewSpecificTypes, //depot/google3/nlp/meaning/analyzer/checks/component_specific_contracts_checks.cc:ViewSpecificTypes)

Summary

Types

t()

Functions

decode(value, options)

Unwrap a decoded JSON object into its complex fields.

Types

Link to this type

t()

@type t() :: %GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersValueType{
  anyType:
    GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersAnyType.t() | nil,
  attributeType:
    GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersAttributeType.t() | nil,
  booleanType:
    GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersBooleanType.t() | nil,
  collectionType:
    GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersCollectionType.t() | nil,
  compoundType:
    GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersCompoundType.t() | nil,
  dateType:
    GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersDateType.t() | nil,
  dependencyType:
    GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersDependencyType.t() | nil,
  durationType:
    GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersDurationType.t() | nil,
  entityType:
    GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersEntityType.t() | nil,
  inputCompositionConfig: String.t() | nil,
  measurementType:
    GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersMeasurementType.t()
    | nil,
  normalizedStringType:
    GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersNormalizedStringType.t()
    | nil,
  numberType:
    GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersNumberType.t() | nil,
  opaqueType:
    GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersOpaqueType.t() | nil,
  plexityRequirement:
    GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersPlexityRequirement.t()
    | nil,
  polarQuestionType:
    GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersPolarQuestionType.t()
    | nil,
  semanticType:
    GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersSemanticType.t() | nil,
  stateOfAffairsType:
    GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersStateOfAffairsType.t()
    | nil,
  stringType:
    GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersStringType.t() | nil,
  timezoneType:
    GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersTimeZoneType.t() | nil,
  trackingNumberType:
    GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersTrackingNumberType.t()
    | nil,
  viewSpecificNumberTypes:
    [GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersNumberType.t()] | nil
}

Functions

Link to this function

decode(value, options)

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

Unwrap a decoded JSON object into its complex fields.