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
147
148
149
|
# File 'lib/punchblock/component/input.rb', line 147
def confidence
nlsml.best_interpretation[:confidence]
end
|
#inherit(xml_node) ⇒ Object
159
160
161
162
|
# File 'lib/punchblock/component/input.rb', line 159
def inherit(xml_node)
self.nlsml = result_node(xml_node)
super
end
|
#interpretation ⇒ Object
155
156
157
|
# File 'lib/punchblock/component/input.rb', line 155
def interpretation
nlsml.best_interpretation[:instance]
end
|
143
144
145
|
# File 'lib/punchblock/component/input.rb', line 143
def mode
nlsml.best_interpretation[:input][:mode]
end
|
#nlsml=(other) ⇒ Object
133
134
135
136
137
138
139
140
141
|
# File 'lib/punchblock/component/input.rb', line 133
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
151
152
153
|
# File 'lib/punchblock/component/input.rb', line 151
def utterance
nlsml.best_interpretation[:input][:content]
end
|