Class: Google::Apis::LanguageV1::DependencyEdge
- Inherits:
- 
      Object
      
        - Object
- Google::Apis::LanguageV1::DependencyEdge
 
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/language_v1/classes.rb,
 generated/google/apis/language_v1/representations.rb,
 generated/google/apis/language_v1/representations.rb
Overview
Represents dependency parse tree information for a token. (For more information on dependency labels, see http://www.aclweb.org/anthology/P13-2017
Instance Attribute Summary collapse
- 
  
    
      #head_token_index  ⇒ Fixnum 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Represents the head of this token in the dependency tree. 
- 
  
    
      #label  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The parse label for the token. 
Instance Method Summary collapse
- 
  
    
      #initialize(**args)  ⇒ DependencyEdge 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of DependencyEdge. 
- 
  
    
      #update!(**args)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Update properties of this object. 
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ DependencyEdge
Returns a new instance of DependencyEdge
| 427 428 429 | # File 'generated/google/apis/language_v1/classes.rb', line 427 def initialize(**args) update!(**args) end | 
Instance Attribute Details
#head_token_index ⇒ Fixnum
Represents the head of this token in the dependency tree.
This is the index of the token which has an arc going to this token.
The index is the position of the token in the array of tokens returned
by the API method. If this token is a root token, then the
head_token_index is its own index.
Corresponds to the JSON property headTokenIndex
| 420 421 422 | # File 'generated/google/apis/language_v1/classes.rb', line 420 def head_token_index @head_token_index end | 
#label ⇒ String
The parse label for the token.
Corresponds to the JSON property label
| 425 426 427 | # File 'generated/google/apis/language_v1/classes.rb', line 425 def label @label end | 
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
| 432 433 434 435 | # File 'generated/google/apis/language_v1/classes.rb', line 432 def update!(**args) @head_token_index = args[:head_token_index] if args.key?(:head_token_index) @label = args[:label] if args.key?(:label) end |