> For the complete documentation index, see [llms.txt](https://lesp.gitbook.io/lesp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lesp.gitbook.io/lesp/intro/getting-started.md).

# Getting Started

## Getting Started

Getting started with LESP is pretty easy and straightforward. Just follow the steps below to quickly get yourself in the flow of things. Won't take long, I promise.

### Before you install

#### Prerequisites

* [Python 3.6+](https://www.python.org/downloads/)
* [pip](https://pypi.org/) or [git](https://git-scm.com/downloads)
* A wordlist (or use the default one)

And that's about it. Since this library doesn't have any external dependencies, simply a Python 3.6 or higher on your machine is already enough. Git here is only used to clone the repository, but you can also download the source code as a zip file from GitHub, see our [releases](https://github.com/LyubomirT/lesp/releases) page for more information.

### Installing with Git

If you already know how to git clone something, skip this step. If not, here's how to do it:

1. First of all, open up a terminal (or command prompt) and navigate (using `cd`) to the directory where you want to install LESP.

```bash
cd /path/to/where/you/want/to/install/lesp
```

2. Then, clone the repository using git. If you don't have git installed, see the Prerequisites section above for a link.

```bash
git clone https://github.com/LyubomirT/lesp.git
```

3. Now, you should have a directory called `lesp` in the directory you navigated to in step 1. Navigate to it.

```bash
cd lesp
```

Now you're good to go! LESP is successfully installed on your machine.

### Installing with PyPi

The package is now uploaded to PyPi, and you can easily install it simply by running:

```bash
pip install lesp
```

After that, LESP will be successfully installed on your machine!

### Usage

#### Basic Usage

LESP uses a single class called `Proofreader` to do all the work. To use it, simply import it from the `lesp.autocorrect` module and create an instance of it.

```python
from lesp.autocorrect import Proofreader

proofreader = Proofreader()
```

The instance you made is now ready to be used. It's basically the key to all the library's features. It offers quite a bit of functions. Most important ones are `is_correct` and `get_similar` though. Here's how you can integrate these into your code:

```python
from lesp.autocorrect import Proofreader

proofreader = Proofreader()

if not proofreader.is_correct("apgle"):
    print("Did you mean: " + proofreader.get_similar("apgle")[0])
```

Simple as that! This code above will check if the word `apgle` is correct. If it's not, it will print out the most similar word to it. In this case, since `apgle` is not a valid word, it will print out `apple`.

If you need more real-life examples, check out the Examples section of the docs. There are some samples you might want to check out to better understand how LESP can be used.

#### Ready to move on?

If you feel like you're ready to get into developing with LESP deeper, you can go ahead and take a look at [Words](/lesp/words/check-if-a-word-is-correct.md)! There's a lot of useful information there, so make sure to take a look at it. Hopefully you'll find what you're looking for.

### Issues

If you encounter any issues or problems with LESP, or if you ever feel lost, don't hesitate to open an issue on the [Issues page](https://github.com/LyubomirT/lesp/issues). We'll try to get to you as soon as possible!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lesp.gitbook.io/lesp/intro/getting-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
