Class: Google::Cloud::DocumentAI::V1beta3::Document::Page::Token

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/documentai/v1beta3/document.rb

Overview

A detected token.

Defined Under Namespace

Classes: DetectedBreak, StyleInfo

Instance Attribute Summary collapse

Instance Attribute Details

#detected_break::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak

Returns Detected break at the end of a Token.



394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 394

class Token
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Detected break at the end of a
  # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type]
  #     Detected break type.
  class DetectedBreak
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Enum to denote the type of break found.
    module Type
      # Unspecified break type.
      TYPE_UNSPECIFIED = 0

      # A single whitespace.
      SPACE = 1

      # A wider whitespace.
      WIDE_SPACE = 2

      # A hyphen that indicates that a token has been split across lines.
      HYPHEN = 3
    end
  end

  # Font and other text style attributes.
  # @!attribute [rw] font_size
  #   @return [::Integer]
  #     Font size in points (`1` point is `¹⁄₇₂` inches).
  # @!attribute [rw] pixel_font_size
  #   @return [::Float]
  #     Font size in pixels, equal to _unrounded
  #     {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_
  #     * _resolution_ ÷ `72.0`.
  # @!attribute [rw] letter_spacing
  #   @return [::Float]
  #     Letter spacing in points.
  # @!attribute [rw] font_type
  #   @return [::String]
  #     Name or style of the font.
  # @!attribute [rw] bold
  #   @return [::Boolean]
  #     Whether the text is bold (equivalent to
  #     {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight}
  #     is at least `700`).
  # @!attribute [rw] italic
  #   @return [::Boolean]
  #     Whether the text is italic.
  # @!attribute [rw] underlined
  #   @return [::Boolean]
  #     Whether the text is underlined.
  # @!attribute [rw] strikeout
  #   @return [::Boolean]
  #     Whether the text is strikethrough.
  # @!attribute [rw] subscript
  #   @return [::Boolean]
  #     Whether the text is a subscript.
  # @!attribute [rw] superscript
  #   @return [::Boolean]
  #     Whether the text is a superscript.
  # @!attribute [rw] smallcaps
  #   @return [::Boolean]
  #     Whether the text is in small caps.
  # @!attribute [rw] font_weight
  #   @return [::Integer]
  #     TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy).
  #     Normal is `400`, bold is `700`.
  # @!attribute [rw] handwritten
  #   @return [::Boolean]
  #     Whether the text is handwritten.
  # @!attribute [rw] text_color
  #   @return [::Google::Type::Color]
  #     Color of the text.
  # @!attribute [rw] background_color
  #   @return [::Google::Type::Color]
  #     Color of the background.
  class StyleInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#detected_languages::Array<::Google::Cloud::DocumentAI::V1beta3::Document::Page::DetectedLanguage>

Returns A list of detected languages together with confidence.

Returns:



394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 394

class Token
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Detected break at the end of a
  # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type]
  #     Detected break type.
  class DetectedBreak
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Enum to denote the type of break found.
    module Type
      # Unspecified break type.
      TYPE_UNSPECIFIED = 0

      # A single whitespace.
      SPACE = 1

      # A wider whitespace.
      WIDE_SPACE = 2

      # A hyphen that indicates that a token has been split across lines.
      HYPHEN = 3
    end
  end

  # Font and other text style attributes.
  # @!attribute [rw] font_size
  #   @return [::Integer]
  #     Font size in points (`1` point is `¹⁄₇₂` inches).
  # @!attribute [rw] pixel_font_size
  #   @return [::Float]
  #     Font size in pixels, equal to _unrounded
  #     {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_
  #     * _resolution_ ÷ `72.0`.
  # @!attribute [rw] letter_spacing
  #   @return [::Float]
  #     Letter spacing in points.
  # @!attribute [rw] font_type
  #   @return [::String]
  #     Name or style of the font.
  # @!attribute [rw] bold
  #   @return [::Boolean]
  #     Whether the text is bold (equivalent to
  #     {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight}
  #     is at least `700`).
  # @!attribute [rw] italic
  #   @return [::Boolean]
  #     Whether the text is italic.
  # @!attribute [rw] underlined
  #   @return [::Boolean]
  #     Whether the text is underlined.
  # @!attribute [rw] strikeout
  #   @return [::Boolean]
  #     Whether the text is strikethrough.
  # @!attribute [rw] subscript
  #   @return [::Boolean]
  #     Whether the text is a subscript.
  # @!attribute [rw] superscript
  #   @return [::Boolean]
  #     Whether the text is a superscript.
  # @!attribute [rw] smallcaps
  #   @return [::Boolean]
  #     Whether the text is in small caps.
  # @!attribute [rw] font_weight
  #   @return [::Integer]
  #     TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy).
  #     Normal is `400`, bold is `700`.
  # @!attribute [rw] handwritten
  #   @return [::Boolean]
  #     Whether the text is handwritten.
  # @!attribute [rw] text_color
  #   @return [::Google::Type::Color]
  #     Color of the text.
  # @!attribute [rw] background_color
  #   @return [::Google::Type::Color]
  #     Color of the background.
  class StyleInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#layout::Google::Cloud::DocumentAI::V1beta3::Document::Page::Layout

Returns Layout for Token.



394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 394

class Token
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Detected break at the end of a
  # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type]
  #     Detected break type.
  class DetectedBreak
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Enum to denote the type of break found.
    module Type
      # Unspecified break type.
      TYPE_UNSPECIFIED = 0

      # A single whitespace.
      SPACE = 1

      # A wider whitespace.
      WIDE_SPACE = 2

      # A hyphen that indicates that a token has been split across lines.
      HYPHEN = 3
    end
  end

  # Font and other text style attributes.
  # @!attribute [rw] font_size
  #   @return [::Integer]
  #     Font size in points (`1` point is `¹⁄₇₂` inches).
  # @!attribute [rw] pixel_font_size
  #   @return [::Float]
  #     Font size in pixels, equal to _unrounded
  #     {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_
  #     * _resolution_ ÷ `72.0`.
  # @!attribute [rw] letter_spacing
  #   @return [::Float]
  #     Letter spacing in points.
  # @!attribute [rw] font_type
  #   @return [::String]
  #     Name or style of the font.
  # @!attribute [rw] bold
  #   @return [::Boolean]
  #     Whether the text is bold (equivalent to
  #     {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight}
  #     is at least `700`).
  # @!attribute [rw] italic
  #   @return [::Boolean]
  #     Whether the text is italic.
  # @!attribute [rw] underlined
  #   @return [::Boolean]
  #     Whether the text is underlined.
  # @!attribute [rw] strikeout
  #   @return [::Boolean]
  #     Whether the text is strikethrough.
  # @!attribute [rw] subscript
  #   @return [::Boolean]
  #     Whether the text is a subscript.
  # @!attribute [rw] superscript
  #   @return [::Boolean]
  #     Whether the text is a superscript.
  # @!attribute [rw] smallcaps
  #   @return [::Boolean]
  #     Whether the text is in small caps.
  # @!attribute [rw] font_weight
  #   @return [::Integer]
  #     TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy).
  #     Normal is `400`, bold is `700`.
  # @!attribute [rw] handwritten
  #   @return [::Boolean]
  #     Whether the text is handwritten.
  # @!attribute [rw] text_color
  #   @return [::Google::Type::Color]
  #     Color of the text.
  # @!attribute [rw] background_color
  #   @return [::Google::Type::Color]
  #     Color of the background.
  class StyleInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#provenance::Google::Cloud::DocumentAI::V1beta3::Document::Provenance

Returns The history of this annotation.

Returns:



394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 394

class Token
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Detected break at the end of a
  # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type]
  #     Detected break type.
  class DetectedBreak
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Enum to denote the type of break found.
    module Type
      # Unspecified break type.
      TYPE_UNSPECIFIED = 0

      # A single whitespace.
      SPACE = 1

      # A wider whitespace.
      WIDE_SPACE = 2

      # A hyphen that indicates that a token has been split across lines.
      HYPHEN = 3
    end
  end

  # Font and other text style attributes.
  # @!attribute [rw] font_size
  #   @return [::Integer]
  #     Font size in points (`1` point is `¹⁄₇₂` inches).
  # @!attribute [rw] pixel_font_size
  #   @return [::Float]
  #     Font size in pixels, equal to _unrounded
  #     {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_
  #     * _resolution_ ÷ `72.0`.
  # @!attribute [rw] letter_spacing
  #   @return [::Float]
  #     Letter spacing in points.
  # @!attribute [rw] font_type
  #   @return [::String]
  #     Name or style of the font.
  # @!attribute [rw] bold
  #   @return [::Boolean]
  #     Whether the text is bold (equivalent to
  #     {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight}
  #     is at least `700`).
  # @!attribute [rw] italic
  #   @return [::Boolean]
  #     Whether the text is italic.
  # @!attribute [rw] underlined
  #   @return [::Boolean]
  #     Whether the text is underlined.
  # @!attribute [rw] strikeout
  #   @return [::Boolean]
  #     Whether the text is strikethrough.
  # @!attribute [rw] subscript
  #   @return [::Boolean]
  #     Whether the text is a subscript.
  # @!attribute [rw] superscript
  #   @return [::Boolean]
  #     Whether the text is a superscript.
  # @!attribute [rw] smallcaps
  #   @return [::Boolean]
  #     Whether the text is in small caps.
  # @!attribute [rw] font_weight
  #   @return [::Integer]
  #     TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy).
  #     Normal is `400`, bold is `700`.
  # @!attribute [rw] handwritten
  #   @return [::Boolean]
  #     Whether the text is handwritten.
  # @!attribute [rw] text_color
  #   @return [::Google::Type::Color]
  #     Color of the text.
  # @!attribute [rw] background_color
  #   @return [::Google::Type::Color]
  #     Color of the background.
  class StyleInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#style_info::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo

Returns Text style attributes.



394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
# File 'proto_docs/google/cloud/documentai/v1beta3/document.rb', line 394

class Token
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Detected break at the end of a
  # {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token Token}.
  # @!attribute [rw] type
  #   @return [::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::DetectedBreak::Type]
  #     Detected break type.
  class DetectedBreak
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Enum to denote the type of break found.
    module Type
      # Unspecified break type.
      TYPE_UNSPECIFIED = 0

      # A single whitespace.
      SPACE = 1

      # A wider whitespace.
      WIDE_SPACE = 2

      # A hyphen that indicates that a token has been split across lines.
      HYPHEN = 3
    end
  end

  # Font and other text style attributes.
  # @!attribute [rw] font_size
  #   @return [::Integer]
  #     Font size in points (`1` point is `¹⁄₇₂` inches).
  # @!attribute [rw] pixel_font_size
  #   @return [::Float]
  #     Font size in pixels, equal to _unrounded
  #     {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_size font_size}_
  #     * _resolution_ ÷ `72.0`.
  # @!attribute [rw] letter_spacing
  #   @return [::Float]
  #     Letter spacing in points.
  # @!attribute [rw] font_type
  #   @return [::String]
  #     Name or style of the font.
  # @!attribute [rw] bold
  #   @return [::Boolean]
  #     Whether the text is bold (equivalent to
  #     {::Google::Cloud::DocumentAI::V1beta3::Document::Page::Token::StyleInfo#font_weight font_weight}
  #     is at least `700`).
  # @!attribute [rw] italic
  #   @return [::Boolean]
  #     Whether the text is italic.
  # @!attribute [rw] underlined
  #   @return [::Boolean]
  #     Whether the text is underlined.
  # @!attribute [rw] strikeout
  #   @return [::Boolean]
  #     Whether the text is strikethrough.
  # @!attribute [rw] subscript
  #   @return [::Boolean]
  #     Whether the text is a subscript.
  # @!attribute [rw] superscript
  #   @return [::Boolean]
  #     Whether the text is a superscript.
  # @!attribute [rw] smallcaps
  #   @return [::Boolean]
  #     Whether the text is in small caps.
  # @!attribute [rw] font_weight
  #   @return [::Integer]
  #     TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy).
  #     Normal is `400`, bold is `700`.
  # @!attribute [rw] handwritten
  #   @return [::Boolean]
  #     Whether the text is handwritten.
  # @!attribute [rw] text_color
  #   @return [::Google::Type::Color]
  #     Color of the text.
  # @!attribute [rw] background_color
  #   @return [::Google::Type::Color]
  #     Color of the background.
  class StyleInfo
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end