Skip to main content

Bronze / Silver / Gold 텍스트 처리 실습 라이브러리

Project description

rag_lab

Bronze / Silver / Gold 3단계로 텍스트를 처리하는 RAG 실습용 라이브러리.

설치

pip install rag-lab-bsg

설치 패키지명은 rag-lab-bsg 이지만, 임포트 이름은 rag_lab 입니다.

사용 예시

from rag_lab import bronze, silver, gold

# 1) Bronze — 원본 문서를 .txt 로 추출
txt_path = bronze.to_text("data/input/manual.pdf")

# 2) Silver — 글자 수 기준 단순 분할 (.jsonl)
silver_path = silver.split(txt_path, chunk_size=300, chunk_overlap=30)

# 3) Gold — 단락/문장 경계를 살리는 재귀 분할 (.jsonl)
gold_path = gold.split(silver_path, chunk_size=300, chunk_overlap=30)

각 단계의 함수는

  • 다음 단계 입력으로 쓸 산출물(.txt / .jsonl) 경로를 반환하고
  • 호출 결과를 화면에도 짧게 출력합니다.

단계 설명

단계 입력 출력 핵심 동작
Bronze PDF / TXT / MD .txt 원본 보존, 페이지 사이는 빈 줄로만 구분
Silver Bronze .txt .jsonl CharacterTextSplitter — 의미 무시, 글자 수로 분할
Gold Silver .jsonl .jsonl RecursiveCharacterTextSplitter — 단락 → 문장 → 어절

요구 사항

  • Python 3.10+
  • langchain-community, langchain-text-splitters, pypdf

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rag_lab_bsg-0.1.1.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rag_lab_bsg-0.1.1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file rag_lab_bsg-0.1.1.tar.gz.

File metadata

  • Download URL: rag_lab_bsg-0.1.1.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for rag_lab_bsg-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fe47809794a51409a899087334bc3543ed161b541da13465dfe6bca72872de41
MD5 992da5d7994be6dc002185e6529f5f23
BLAKE2b-256 ca5073ea7ff4f80b0af4675c92e64b42d9883f872d3164cba791934b6340c4f8

See more details on using hashes here.

File details

Details for the file rag_lab_bsg-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: rag_lab_bsg-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for rag_lab_bsg-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e728228d822cb6ce1a1c8ccdf8c68d37c9f8f6eb930ee339d14e090df9f4cae5
MD5 8bded7f7ea75bc0bad23d33607ed0794
BLAKE2b-256 58ac37e27fe525a8c392e6eb781e9223029ebd8c307a205deddcda426c5ae896

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page