Files
auto-ragas/rag_evaluation/testset/__pycache__/document_loader.cpython-314.pyc
T

31 lines
6.0 KiB
Plaintext
Raw Normal View History

2026-01-16 16:01:39 +08:00
+
hhi*
ãó’€Rt^RIHtHtHt^RIHt^RIt!RR4t!RR4t !RR ] 4t
!R
R ] 4t R R
lt R#)z*
Document loader for various file formats
)ÚListÚDictÚAny)ÚPathNcó6a€]tRt^
toRtV3RlRltRtVtR#)ÚDocumentz,Document class to represent loaded documentscó<<€V^8„dQhRS[RS[S[S[3,/#)éÚcontentÚmetadata)Ústrrr)ÚformatÚ
__classdict__s"€Ú@D:\workspace\cc-plugin\rag_evaluation\testset\document_loader.pyÚ __annotate__ÚDocument.__annotate__
s#ø€÷!ñ!¡ð!©t±C¹°H­~ñ!ócó€WnW nR#)N)Ú page_contentr )Úselfr
r s&&&rÚ__init__ÚDocument.__init__
s
€Ø#ÔØ Ž
r)r rN)Ú__name__Ú
__module__Ú __qualname__Ú__firstlineno__Ú__doc__rÚ__static_attributes__Ú__classdictcell__©rs@rrr
sø‡€Ù6÷!ö!rrcóla€]tRt^toRtV3RlRltV3RlRltV3RlRltV3RlR ltR
t Vt
R #) ÚDocumentLoaderzBase document loadercó <€V^8„dQhRS[/#)r Ú file_path©r )r
rs"€rrÚDocumentLoader.__annotate__sø€÷DñD¡#ñDrcó‚€\V4VnVPP4'g\RV 24hR#)zFile not found: N)rr#ÚexistsÚFileNotFoundError)rr#s&&rrÚDocumentLoader.__init__s8€Ü˜i›ˆŒØ�~‰~×$Ñ$×&Ò&Ü#Ð&6°y°kÐ$BÓCÐ Cñ'rcó0<€V^8„dQhRS[S[,/#©r Úreturn©rr)r
rs"€rrr%sø€÷FñF‘d™8•nñFrc ó€\R4h)z1Load document and return list of Document objectsz Subclasses must implement load())ÚNotImplementedError©rs&rÚloadÚDocumentLoader.loads€ä!Ð"DÓEÐErcó <€V^8„dQhRS[/#r+)Úint)r
rs"€rrr%sø€÷/ñ/™sñ/rc óT€\PPVP4#)zGet file size in bytes)ÚosÚpathÚgetsizer#r0s&rÚ
get_file_sizeÚDocumentLoader.get_file_sizes€ä�w‰w�‰˜tŸ~™~Ó.Ð.rcó <€V^8„dQhRS[/#r+r$)r
rs"€rrr%"sø€÷-ñ-¡Cñ-rc óJ€VPPP4#)zGet file extension)r#ÚsuffixÚlowerr0s&rÚget_file_extensionÚ!DocumentLoader.get_file_extension"s€à�~‰~×$Ñ$×*Ñ*Ó,Ð,r)r#N) rrrrrrr1r9r?rrrs@rr!r!s4ø‡€Ù÷DðD÷
FðF÷/ð/÷-ö-rr!có6a€]tRt^'toRtV3RlRltRtVtR#)Ú
TextLoaderzText file loadercó0<€V^8„dQhRS[S[,/#r+r-)r
rs"€rrÚTextLoader.__annotate__*óø€÷ >ñ >‘d™8•nñ >rc ó€\VPRRR7;_uu_4pVP4pRRR4R\VP4RRRVP 4/p\ XVR 7.# +'giLG;i)
zLoad text fileÚrúutf-8©ÚencodingNÚsourceÚ file_typeÚtextÚ file_size©r
r ©Úopenr#Úreadr r9r©rÚfr
r s& rr1ÚTextLoader.load*sl€ä
�$—.‘. #°×