Class: Google::Apis::LanguageV1beta1::Token
- Inherits:
- 
      Object
      
        - Object
- Google::Apis::LanguageV1beta1::Token
 
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/language_v1beta1/classes.rb,
 generated/google/apis/language_v1beta1/representations.rb,
 generated/google/apis/language_v1beta1/representations.rb
Overview
Represents the smallest syntactic building block of the text.
Instance Attribute Summary collapse
- 
  
    
      #dependency_edge  ⇒ Google::Apis::LanguageV1beta1::DependencyEdge 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Represents dependency parse tree information for a token. 
- 
  
    
      #lemma  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Lemma of the token. 
- 
  
    
      #part_of_speech  ⇒ Google::Apis::LanguageV1beta1::PartOfSpeech 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Represents part of speech information for a token. 
- 
  
    
      #text  ⇒ Google::Apis::LanguageV1beta1::TextSpan 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Represents an output piece of text. 
Instance Method Summary collapse
- 
  
    
      #initialize(**args)  ⇒ Token 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Token. 
- 
  
    
      #update!(**args)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Update properties of this object. 
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Token
Returns a new instance of Token
| 744 745 746 | # File 'generated/google/apis/language_v1beta1/classes.rb', line 744 def initialize(**args) update!(**args) end | 
Instance Attribute Details
#dependency_edge ⇒ Google::Apis::LanguageV1beta1::DependencyEdge
Represents dependency parse tree information for a token.
Corresponds to the JSON property dependencyEdge
| 727 728 729 | # File 'generated/google/apis/language_v1beta1/classes.rb', line 727 def dependency_edge @dependency_edge end | 
#lemma ⇒ String
Lemma of the token.
Corresponds to the JSON property lemma
| 732 733 734 | # File 'generated/google/apis/language_v1beta1/classes.rb', line 732 def lemma @lemma end | 
#part_of_speech ⇒ Google::Apis::LanguageV1beta1::PartOfSpeech
Represents part of speech information for a token.
Corresponds to the JSON property partOfSpeech
| 737 738 739 | # File 'generated/google/apis/language_v1beta1/classes.rb', line 737 def part_of_speech @part_of_speech end | 
#text ⇒ Google::Apis::LanguageV1beta1::TextSpan
Represents an output piece of text.
Corresponds to the JSON property text
| 742 743 744 | # File 'generated/google/apis/language_v1beta1/classes.rb', line 742 def text @text end | 
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
| 749 750 751 752 753 754 | # File 'generated/google/apis/language_v1beta1/classes.rb', line 749 def update!(**args) @dependency_edge = args[:dependency_edge] if args.key?(:dependency_edge) @lemma = args[:lemma] if args.key?(:lemma) @part_of_speech = args[:part_of_speech] if args.key?(:part_of_speech) @text = args[:text] if args.key?(:text) end |