SnapshotTextNode

AI Overview😉

  • The potential purpose of this module is to analyze the visual layout and structure of a webpage, including the text content, font sizes, and bounding boxes (position and size) of text elements within the page. It also detects if the text is within a link and assigns a "powerful" splitting tag category to it.
  • This module could impact search results by influencing how Google's algorithm understands the organization and hierarchy of content on a webpage. It may prioritize pages with clear and organized structures, and potentially demote pages with cluttered or hard-to-read layouts. The detection of links and splitting tags may also affect how Google identifies and weights keywords and phrases on a page.
  • To be more favorable for this function, a website could:
    • Use a clear and consistent visual hierarchy, with headings, paragraphs, and other elements properly structured and sized.
    • Ensure that links are properly marked up and easily identifiable, both for users and search engines.
    • Optimize font sizes and styles to improve readability and accessibility.
    • Avoid cluttered or overly complex page layouts that may confuse or mislead users and search engines.

Interesting Module? Vote 👇

Voting helps other researchers find interesting modules.

Current Votes: 0

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

The SnapshotDocument contains a list of TextNode's. Each node contains a string of text of the webpage, its bounding box in the agove snapshot image, and its font size (in number of pixels in the snapshot, which could be a fraction number since the snapshot image is typically shrinked). This list of text nodes are extracted from the output from the rendering service: htmlrender_webkit_headless_proto.Document The extraction is done by TrimDocument defined in ./shared/doctrimmer.cc

Attributes

  • boundingBox (type: GoogleApi.ContentWarehouse.V1.Model.SnapshotBox.t, default: nil) -
  • fontSize (type: number(), default: nil) -
  • inLink (type: integer(), default: nil) - One if the current text node is within a link; otherwise zero/not present.
  • maxSplit (type: integer(), default: nil) - A value in the range [0,7] (zero if not present) indicating the most "powerful" splitting tag since the last text node. See "enum Category" in mustang/snippets/taginfo.h.
  • text (type: String.t, default: nil) -

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.SnapshotTextNode{
  boundingBox: GoogleApi.ContentWarehouse.V1.Model.SnapshotBox.t() | nil,
  fontSize: number() | nil,
  inLink: integer() | nil,
  maxSplit: integer() | nil,
  text: String.t() | nil
}

Functions

Link to this function

decode(value, options)

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

Unwrap a decoded JSON object into its complex fields.