Module: LLM::Spell::Engine

Included in:
Document, Text
Defined in:
lib/llm/spell/engine.rb

Instance Method Summary collapse

Instance Method Details

#correctionsArray<String>

Returns An array of unique corrections corresponding to the mistakes.

Returns:

  • (Array<String>)

    An array of unique corrections corresponding to the mistakes



15
16
17
# File 'lib/llm/spell/engine.rb', line 15

def corrections
  response["corrections"].uniq
end

#inspectString

Returns:

  • (String)


21
22
# File 'lib/llm/spell/engine.rb', line 21

def inspect = "#<#{self.class}:0x#{object_id.to_s(16)} " \
"mistakes=#{mistakes.size} corrections=#{corrections.size}>"

#mistakesArray<String>

Returns An array of unique spelling mistakes found in the text.

Returns:

  • (Array<String>)

    An array of unique spelling mistakes found in the text



8
9
10
# File 'lib/llm/spell/engine.rb', line 8

def mistakes
  response["mistakes"].uniq
end