# DataToWord
## Built With
- [Python](https://www.python.org/)
- [Poetry](https://python-poetry.org/)
- [LangChain](https://www.langchain.com/)
- [OpenAI](https://platform.openai.com/docs/models)
## 專案目的
這是一個將資料轉換成文字的專案,可以協助你在進行 RAG 的過程中,將資料類型的檔案轉換成文字,提升轉換為向量後查詢的結果。
目前支援的檔案有:
- CSV
- JSON
## Quick Start
- 建立 LangChain Document
```python
from datatoword import DataToWord
with open('data.csv', 'rb') as file:
file_binary_content = file.read()
data_to_word = DataToWord()
data_to_word.create_documents(
file_name='data.csv',
file_description='這是一個測試的檔案',
file_binary_content=file_binary_content
)
```
- 取得轉換後的內文
```python
from datatoword import DataToWord
with open('data.csv', 'rb') as file:
file_binary_content = file.read()
data_to_word = DataToWord()
data_to_word.create_content(
file_name='data.csv',
file_description='這是一個測試的檔案',
file_binary_content=file_binary_content
)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/nickchen1998/DataToWord",
"name": "datatoword",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.11",
"maintainer_email": null,
"keywords": null,
"author": "nick",
"author_email": "nickchen1998@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/86/fb/c6421acb8038aa7ef260b85db0d51dfd53970873b55edd194b04fcc7ffe7/datatoword-0.7.0.tar.gz",
"platform": null,
"description": "# DataToWord\n\n## Built With\n\n- [Python](https://www.python.org/)\n- [Poetry](https://python-poetry.org/)\n- [LangChain](https://www.langchain.com/)\n- [OpenAI](https://platform.openai.com/docs/models)\n\n## \u5c08\u6848\u76ee\u7684\n\n\u9019\u662f\u4e00\u500b\u5c07\u8cc7\u6599\u8f49\u63db\u6210\u6587\u5b57\u7684\u5c08\u6848\uff0c\u53ef\u4ee5\u5354\u52a9\u4f60\u5728\u9032\u884c RAG \u7684\u904e\u7a0b\u4e2d\uff0c\u5c07\u8cc7\u6599\u985e\u578b\u7684\u6a94\u6848\u8f49\u63db\u6210\u6587\u5b57\uff0c\u63d0\u5347\u8f49\u63db\u70ba\u5411\u91cf\u5f8c\u67e5\u8a62\u7684\u7d50\u679c\u3002\n\n\u76ee\u524d\u652f\u63f4\u7684\u6a94\u6848\u6709\uff1a\n\n- CSV\n- JSON\n\n\n## Quick Start\n\n- \u5efa\u7acb LangChain Document\n```python\nfrom datatoword import DataToWord\n\n\nwith open('data.csv', 'rb') as file:\n file_binary_content = file.read()\n\ndata_to_word = DataToWord()\ndata_to_word.create_documents(\n file_name='data.csv',\n file_description='\u9019\u662f\u4e00\u500b\u6e2c\u8a66\u7684\u6a94\u6848',\n file_binary_content=file_binary_content\n)\n```\n\n- \u53d6\u5f97\u8f49\u63db\u5f8c\u7684\u5167\u6587\n```python\nfrom datatoword import DataToWord\n\n\nwith open('data.csv', 'rb') as file:\n file_binary_content = file.read()\n\ndata_to_word = DataToWord()\ndata_to_word.create_content(\n file_name='data.csv',\n file_description='\u9019\u662f\u4e00\u500b\u6e2c\u8a66\u7684\u6a94\u6848',\n file_binary_content=file_binary_content\n)\n```\n\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "\u4e00\u500b\u5c07\u8cc7\u6599\u8f49\u63db\u70ba\u6587\u672c\u7684\u5c0f\u5de5\u5177\uff0c\u53ef\u63d0\u5347 RAG \u67e5\u8a62\u7684\u6548\u7387\u3002",
"version": "0.7.0",
"project_urls": {
"Homepage": "https://github.com/nickchen1998/DataToWord"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "46c5cb98adcbdea20b4d21abdeb551843f6e210da4caddf3496a44122c78af41",
"md5": "9eebf58d61bcc59e6f4b39f0e2770615",
"sha256": "33433dddecb527fc5fe9883186fd97b6e4f638064bfbcf05d7e5158bfb4374c5"
},
"downloads": -1,
"filename": "datatoword-0.7.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9eebf58d61bcc59e6f4b39f0e2770615",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.11",
"size": 12491,
"upload_time": "2024-08-31T07:45:50",
"upload_time_iso_8601": "2024-08-31T07:45:50.563399Z",
"url": "https://files.pythonhosted.org/packages/46/c5/cb98adcbdea20b4d21abdeb551843f6e210da4caddf3496a44122c78af41/datatoword-0.7.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "86fbc6421acb8038aa7ef260b85db0d51dfd53970873b55edd194b04fcc7ffe7",
"md5": "32dfdc6542a8d725ffb1418044f34583",
"sha256": "379e3ecf68b5a349ba80a12b6eb9e195657955dfa6729b1a650ec5fa02e3c03d"
},
"downloads": -1,
"filename": "datatoword-0.7.0.tar.gz",
"has_sig": false,
"md5_digest": "32dfdc6542a8d725ffb1418044f34583",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.11",
"size": 9328,
"upload_time": "2024-08-31T07:45:52",
"upload_time_iso_8601": "2024-08-31T07:45:52.349277Z",
"url": "https://files.pythonhosted.org/packages/86/fb/c6421acb8038aa7ef260b85db0d51dfd53970873b55edd194b04fcc7ffe7/datatoword-0.7.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-31 07:45:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nickchen1998",
"github_project": "DataToWord",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "datatoword"
}