Class: ActiveGenie::Extractor::Litote
- Inherits:
-
BaseModule
- Object
- BaseModule
- ActiveGenie::Extractor::Litote
- Defined in:
- lib/active_genie/extractor/litote.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(text, data_to_extract, config: {}) ⇒ Hash
constructor
Extracts data from informal text while also detecting litotes and their meanings.
Methods inherited from BaseModule
Constructor Details
#initialize(text, data_to_extract, config: {}) ⇒ Hash
Extracts data from informal text while also detecting litotes and their meanings. This method extends the basic extraction by analyzing rhetorical devices.
27 28 29 30 31 |
# File 'lib/active_genie/extractor/litote.rb', line 27 def initialize(text, data_to_extract, config: {}) @text = text @data_to_extract = data_to_extract super(config:) end |
Instance Method Details
#call ⇒ Object
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/active_genie/extractor/litote.rb', line 33 def call response = Explanation.call(@text, extract_with_litote, config:) if response.data[:message_litote] response = Explanation.call(response.data[:litote_rephrased], @data_to_extract, config:) end response end |