Class: Vertex

Inherits:
Object
  • Object
show all
Defined in:
lib/automated_metareview/vertex.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vertex_name, vertex_type, index_value, state, lab, par, pos_tag) ⇒ Vertex

Returns a new instance of Vertex.



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/automated_metareview/vertex.rb', line 4

def initialize(vertex_name, vertex_type, index_value, state, lab, par, pos_tag)
  @name = vertex_name
  @type = vertex_type
  @frequency = 0
  @index = index_value
  @node_id = -1 #to identify if the id has been set or not
  @state = state #they are not negated by default
  
  #for semantic role labelling
  @label = lab
  @parent = par
  
  @pos_tag = pos_tag
end

Instance Attribute Details

#frequencyObject

attr_accessor auto creates the get and set methods for the following attributes



3
4
5
# File 'lib/automated_metareview/vertex.rb', line 3

def frequency
  @frequency
end

#indexObject

attr_accessor auto creates the get and set methods for the following attributes



3
4
5
# File 'lib/automated_metareview/vertex.rb', line 3

def index
  @index
end

#labelObject

attr_accessor auto creates the get and set methods for the following attributes



3
4
5
# File 'lib/automated_metareview/vertex.rb', line 3

def label
  @label
end

#nameObject

attr_accessor auto creates the get and set methods for the following attributes



3
4
5
# File 'lib/automated_metareview/vertex.rb', line 3

def name
  @name
end

#node_idObject

attr_accessor auto creates the get and set methods for the following attributes



3
4
5
# File 'lib/automated_metareview/vertex.rb', line 3

def node_id
  @node_id
end

#parentObject

attr_accessor auto creates the get and set methods for the following attributes



3
4
5
# File 'lib/automated_metareview/vertex.rb', line 3

def parent
  @parent
end

#pos_tagObject

attr_accessor auto creates the get and set methods for the following attributes



3
4
5
# File 'lib/automated_metareview/vertex.rb', line 3

def pos_tag
  @pos_tag
end

#stateObject

attr_accessor auto creates the get and set methods for the following attributes



3
4
5
# File 'lib/automated_metareview/vertex.rb', line 3

def state
  @state
end

#typeObject

attr_accessor auto creates the get and set methods for the following attributes



3
4
5
# File 'lib/automated_metareview/vertex.rb', line 3

def type
  @type
end