Reference documentation and code samples for the Natural Language V1beta2 API class Google::Cloud::Language::V1beta2::Token.
Represents the smallest syntactic building block of the text.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#dependency_edge
def dependency_edge() -> ::Google::Cloud::Language::V1beta2::DependencyEdge
Returns
- (::Google::Cloud::Language::V1beta2::DependencyEdge) — Dependency tree parse for this token.
#dependency_edge=
def dependency_edge=(value) -> ::Google::Cloud::Language::V1beta2::DependencyEdge
Parameter
- value (::Google::Cloud::Language::V1beta2::DependencyEdge) — Dependency tree parse for this token.
Returns
- (::Google::Cloud::Language::V1beta2::DependencyEdge) — Dependency tree parse for this token.
#lemma
def lemma() -> ::String
Returns
- (::String) — Lemma of the token.
#lemma=
def lemma=(value) -> ::String
Parameter
- value (::String) — Lemma of the token.
Returns
- (::String) — Lemma of the token.
#part_of_speech
def part_of_speech() -> ::Google::Cloud::Language::V1beta2::PartOfSpeech
Returns
- (::Google::Cloud::Language::V1beta2::PartOfSpeech) — Parts of speech tag for this token.
#part_of_speech=
def part_of_speech=(value) -> ::Google::Cloud::Language::V1beta2::PartOfSpeech
Parameter
- value (::Google::Cloud::Language::V1beta2::PartOfSpeech) — Parts of speech tag for this token.
Returns
- (::Google::Cloud::Language::V1beta2::PartOfSpeech) — Parts of speech tag for this token.
#text
def text() -> ::Google::Cloud::Language::V1beta2::TextSpan
Returns
- (::Google::Cloud::Language::V1beta2::TextSpan) — The token text.
#text=
def text=(value) -> ::Google::Cloud::Language::V1beta2::TextSpan
Parameter
- value (::Google::Cloud::Language::V1beta2::TextSpan) — The token text.
Returns
- (::Google::Cloud::Language::V1beta2::TextSpan) — The token text.