Class: LLM::Spell::Document

Inherits:
Object
  • Object
show all
Includes:
Engine
Defined in:
lib/llm/spell/document.rb

Overview

The LLM::Spell::Document class can analyze a given text file or document, and return any spelling mistakes that were found – along with suggested corrections.

Instance Method Summary collapse

Methods included from Engine

#corrections, #inspect, #mistakes

Constructor Details

#initialize(input, llm) ⇒ LLM::Spell::Document

Parameters:

  • input (File)

    The file to be analyzed

  • provider (LLM::Provider)

    An instance of LLM::Provider



17
18
19
20
21
# File 'lib/llm/spell/document.rb', line 17

def initialize(input, llm)
  @input = input
  @llm = llm
  @bot = LLM::Bot.new(llm, schema:)
end