Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
json_entry_added_etc (#500)
Browse files Browse the repository at this point in the history
  • Loading branch information
sangwongenip authored Sep 12, 2023
1 parent 33155c7 commit b078914
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 137 deletions.
16 changes: 0 additions & 16 deletions llama_hub/hangeul/README.md

This file was deleted.

1 change: 0 additions & 1 deletion llama_hub/hangeul/__init__.py

This file was deleted.

112 changes: 0 additions & 112 deletions llama_hub/hangeul/base.py

This file was deleted.

1 change: 0 additions & 1 deletion llama_hub/hangeul/requirements.txt

This file was deleted.

13 changes: 6 additions & 7 deletions llama_hub/hwp/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from llama_index.readers.schema.base import Document

class HWPReader(BaseReader):
"""Hangeul Reader. Reads contents from Hangeul file.
"""Hwp Reader. Reads contents from Hwp file.
Args: None
"""
def __init__(
Expand All @@ -26,14 +26,13 @@ def __init__(
def load_data(
self,
file: Path,
extra_info: Optional[Dict] = None
) -> Document:
"""Load data and extract table from PDF file.
"""Load data and extract table from Hwp file.
Args:
file (Path): Path for the PDF file.
file (Path): Path for the Hwp file.
Returns:
List[Document]: List of documents.
Document
"""
import olefile

Expand All @@ -44,7 +43,7 @@ def load_data(
raise Exception("Not Valid HwpFile")

result_text = self._get_text(load_file, file_dir)
result = self._text_to_document(text=result_text)
result = self._text_to_document(text=result_text, extra_info=extra_info)
return result

def is_valid(self, dirs):
Expand Down
7 changes: 7 additions & 0 deletions llama_hub/library.json
Original file line number Diff line number Diff line change
Expand Up @@ -939,5 +939,12 @@
"keywords": [
"linear"
]
},
"HWPReader": {
"id": "hwp",
"author": "sangwongenip",
"keywords": [
"hwp"
]
}
}
2 changes: 2 additions & 0 deletions test_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ typing_extensions==4.5.0
llama-index>=0.6.9
atlassian-python-api
html2text
olefile

# hotfix
psutil

Expand Down

0 comments on commit b078914

Please sign in to comment.