class Glove::TokenPair

Holds a token string and its neighbors in an array

Attributes

neighbors[RW]

@!attribute [r] token

@return [String] The word/token

@!attribute [r] neighbors

@return [Array<(String)>>] List of neighboring words
token[RW]

@!attribute [r] token

@return [String] The word/token

@!attribute [r] neighbors

@return [Array<(String)>>] List of neighboring words

Public Class Methods

new(token='', neighbors=[]) click to toggle source

Get class instance and set token and neighbors variables

# File lib/glove/token_pair.rb, line 11
def initialize(token='', neighbors=[])
  @token, @neighbors = token, neighbors
end