Class: Punchblock::Component::Input::Complete::Match
Instance Attribute Summary
Attributes inherited from RayoNode
#client, #connection, #original_component
Instance Method Summary
collapse
Methods inherited from RayoNode
#==, class_from_registration, from_xml, #inspect, #rayo_attributes, #rayo_children, register, #source, #to_rayo, #to_xml
Instance Method Details
#confidence ⇒ Object
140
141
142
|
# File 'lib/punchblock/component/input.rb', line 140
def confidence
nlsml.best_interpretation[:confidence]
end
|
#inherit(xml_node) ⇒ Object
152
153
154
155
|
# File 'lib/punchblock/component/input.rb', line 152
def inherit(xml_node)
self.nlsml = result_node(xml_node)
super
end
|
#interpretation ⇒ Object
148
149
150
|
# File 'lib/punchblock/component/input.rb', line 148
def interpretation
nlsml.best_interpretation[:instance]
end
|
136
137
138
|
# File 'lib/punchblock/component/input.rb', line 136
def mode
nlsml.best_interpretation[:input][:mode]
end
|
#nlsml=(other) ⇒ Object
126
127
128
129
130
131
132
133
134
|
# File 'lib/punchblock/component/input.rb', line 126
def nlsml=(other)
doc = case other
when Nokogiri::XML::Element, Nokogiri::XML::Document
RubySpeech::NLSML::Document.new(other)
else
other
end
super doc
end
|
#utterance ⇒ Object
144
145
146
|
# File 'lib/punchblock/component/input.rb', line 144
def utterance
nlsml.best_interpretation[:input][:content]
end
|