Class: Google::Cloud::Language::V1beta2::Document

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/language/v1beta2/language_service.rb

Overview

Represents the input to API methods.

Defined Under Namespace

Modules: BoilerplateHandling, Type

Instance Attribute Summary collapse

Instance Attribute Details

#boilerplate_handling::Google::Cloud::Language::V1beta2::Document::BoilerplateHandling

Returns Indicates how detected boilerplate(e.g. advertisements, copyright declarations, banners) should be handled for this document. If not specified, boilerplate will be treated the same as content.

Returns:



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'proto_docs/google/cloud/language/v1beta2/language_service.rb', line 58

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

  # The document types enum.
  module Type
    # The content type is not specified.
    TYPE_UNSPECIFIED = 0

    # Plain text
    PLAIN_TEXT = 1

    # HTML
    HTML = 2
  end

  # Ways of handling boilerplate detected in the document
  module BoilerplateHandling
    # The boilerplate handling is not specified.
    BOILERPLATE_HANDLING_UNSPECIFIED = 0

    # Do not analyze detected boilerplate. Reference web URI is required for
    # detecting boilerplate.
    SKIP_BOILERPLATE = 1

    # Treat boilerplate the same as content.
    KEEP_BOILERPLATE = 2
  end
end

#content::String

Returns The content of the input in string format. Cloud audit logging exempt since it is based on user data.

Returns:

  • (::String)

    The content of the input in string format. Cloud audit logging exempt since it is based on user data.



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'proto_docs/google/cloud/language/v1beta2/language_service.rb', line 58

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

  # The document types enum.
  module Type
    # The content type is not specified.
    TYPE_UNSPECIFIED = 0

    # Plain text
    PLAIN_TEXT = 1

    # HTML
    HTML = 2
  end

  # Ways of handling boilerplate detected in the document
  module BoilerplateHandling
    # The boilerplate handling is not specified.
    BOILERPLATE_HANDLING_UNSPECIFIED = 0

    # Do not analyze detected boilerplate. Reference web URI is required for
    # detecting boilerplate.
    SKIP_BOILERPLATE = 1

    # Treat boilerplate the same as content.
    KEEP_BOILERPLATE = 2
  end
end

#gcs_content_uri::String

Returns The Google Cloud Storage URI where the file content is located. This URI must be of the form: gs://bucket_name/object_name. For more details, see https://cloud.google.com/storage/docs/reference-uris. NOTE: Cloud Storage object versioning is not supported.

Returns:

  • (::String)

    The Google Cloud Storage URI where the file content is located. This URI must be of the form: gs://bucket_name/object_name. For more details, see https://cloud.google.com/storage/docs/reference-uris. NOTE: Cloud Storage object versioning is not supported.



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'proto_docs/google/cloud/language/v1beta2/language_service.rb', line 58

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

  # The document types enum.
  module Type
    # The content type is not specified.
    TYPE_UNSPECIFIED = 0

    # Plain text
    PLAIN_TEXT = 1

    # HTML
    HTML = 2
  end

  # Ways of handling boilerplate detected in the document
  module BoilerplateHandling
    # The boilerplate handling is not specified.
    BOILERPLATE_HANDLING_UNSPECIFIED = 0

    # Do not analyze detected boilerplate. Reference web URI is required for
    # detecting boilerplate.
    SKIP_BOILERPLATE = 1

    # Treat boilerplate the same as content.
    KEEP_BOILERPLATE = 2
  end
end

#language::String

Returns The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted.
Language Support lists currently supported languages for each API method. If the language (either specified by the caller or automatically detected) is not supported by the called API method, an INVALID_ARGUMENT error is returned.

Returns:

  • (::String)

    The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted.
    Language Support lists currently supported languages for each API method. If the language (either specified by the caller or automatically detected) is not supported by the called API method, an INVALID_ARGUMENT error is returned.



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'proto_docs/google/cloud/language/v1beta2/language_service.rb', line 58

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

  # The document types enum.
  module Type
    # The content type is not specified.
    TYPE_UNSPECIFIED = 0

    # Plain text
    PLAIN_TEXT = 1

    # HTML
    HTML = 2
  end

  # Ways of handling boilerplate detected in the document
  module BoilerplateHandling
    # The boilerplate handling is not specified.
    BOILERPLATE_HANDLING_UNSPECIFIED = 0

    # Do not analyze detected boilerplate. Reference web URI is required for
    # detecting boilerplate.
    SKIP_BOILERPLATE = 1

    # Treat boilerplate the same as content.
    KEEP_BOILERPLATE = 2
  end
end

#reference_web_uri::String

Returns The web URI where the document comes from. This URI is not used for fetching the content, but as a hint for analyzing the document.

Returns:

  • (::String)

    The web URI where the document comes from. This URI is not used for fetching the content, but as a hint for analyzing the document.



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'proto_docs/google/cloud/language/v1beta2/language_service.rb', line 58

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

  # The document types enum.
  module Type
    # The content type is not specified.
    TYPE_UNSPECIFIED = 0

    # Plain text
    PLAIN_TEXT = 1

    # HTML
    HTML = 2
  end

  # Ways of handling boilerplate detected in the document
  module BoilerplateHandling
    # The boilerplate handling is not specified.
    BOILERPLATE_HANDLING_UNSPECIFIED = 0

    # Do not analyze detected boilerplate. Reference web URI is required for
    # detecting boilerplate.
    SKIP_BOILERPLATE = 1

    # Treat boilerplate the same as content.
    KEEP_BOILERPLATE = 2
  end
end

#type::Google::Cloud::Language::V1beta2::Document::Type

Required. If the type is not set or is TYPE_UNSPECIFIED, returns an INVALID_ARGUMENT error.

Returns:



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'proto_docs/google/cloud/language/v1beta2/language_service.rb', line 58

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

  # The document types enum.
  module Type
    # The content type is not specified.
    TYPE_UNSPECIFIED = 0

    # Plain text
    PLAIN_TEXT = 1

    # HTML
    HTML = 2
  end

  # Ways of handling boilerplate detected in the document
  module BoilerplateHandling
    # The boilerplate handling is not specified.
    BOILERPLATE_HANDLING_UNSPECIFIED = 0

    # Do not analyze detected boilerplate. Reference web URI is required for
    # detecting boilerplate.
    SKIP_BOILERPLATE = 1

    # Treat boilerplate the same as content.
    KEEP_BOILERPLATE = 2
  end
end