> For the complete documentation index, see [llms.txt](https://nomadamas.gitbook.io/ragchain-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nomadamas.gitbook.io/ragchain-docs/ragchain-structure/file-loader/hwp-loader.md).

# Hwp Loader

## Overview

The `HwpLoader` class is a dedicated loader for handling HWP files, which are widely used in South Korea. It provides functionality to load and convert HWP files into text using an external API, namely the [hwp-converter-api](https://github.com/NomaDamas/hwp-converter-api).

The hwp-converter-api is a service that converts HWP files into plain text. You can find more information about this API at [here](https://github.com/NomaDamas/hwp-converter-api).

## Usage

To use this class, you would need to instantiate it by providing necessary parameters and then call its load or lazy\_load method:

```python
from RAGchain.preprocess.loader import HwpLoader

loader = HwpLoader(path="path_to_your_file.hwp", 
                   hwp_host_url="http://your_hwp_converter_api_url")
documents = loader.load()
```

You can get list of [`Document`](https://docs.langchain.com/docs/components/schema/document) objects that came from original hwp file.

Please note that currently only .hwp files are supported; .hwpx files are not supported yet by this loader.

Also note that you must have aiohttp library installed in your environment.

Lastly, ensure that provided URL points to running instance of hwa-converter-api.


---

# 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, and the optional `goal` query parameter:

```
GET https://nomadamas.gitbook.io/ragchain-docs/ragchain-structure/file-loader/hwp-loader.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
