MCPcopy Create free account

hub / github.com/Dicklesworthstone/llm_aided_ocr / functions

Functions25 in github.com/Dicklesworthstone/llm_aided_ocr

↓ 3 callersFunctionchunk_text
(text: str, max_chunk_tokens: int, model_name: str)
llm_aided_ocr.py:205
↓ 3 callersFunctionestimate_tokens
(text: str, model_name: str)
llm_aided_ocr.py:177
↓ 3 callersFunctiongenerate_completion
(prompt: str, max_tokens: int = 5000)
llm_aided_ocr.py:156
↓ 3 callersFunctionget_tokenizer
(model_name: str)
llm_aided_ocr.py:167
↓ 2 callersFunctionprocess_chunk
(chunk: str, prev_context: str, chunk_index: int, total_chunks: int, reformat_as_markdown: bool, suppress_head
llm_aided_ocr.py:428
↓ 1 callersFunctionadjust_overlaps
(chunks: List[str], tokenizer, max_chunk_tokens: int, overlap_size: int = 50)
llm_aided_ocr.py:250
↓ 1 callersFunctionapproximate_tokens
(text: str)
llm_aided_ocr.py:185
↓ 1 callersFunctionassess_output_quality
(original_text, processed_text)
llm_aided_ocr.py:584
↓ 1 callersFunctionconvert_pdf_to_images
(input_pdf_file_path: str, max_pages: int = 0, skip_first_n_pages: int = 0)
llm_aided_ocr.py:411
↓ 1 callersFunctiondownload_models
()
llm_aided_ocr.py:72
↓ 1 callersFunctiongenerate_completion_from_claude
(prompt: str, max_tokens: int = CLAUDE_MAX_TOKENS - TOKEN_BUFFER)
llm_aided_ocr.py:266
↓ 1 callersFunctiongenerate_completion_from_local_llm
(llm_model_name: str, input_prompt: str, number_of_tokens_to_generate: int = 100, temperature: float = 0.7, gr
llm_aided_ocr.py:350
↓ 1 callersFunctiongenerate_completion_from_openai
(prompt: str, max_tokens: int = 5000)
llm_aided_ocr.py:309
↓ 1 callersFunctionload_model
(llm_model_name: str, raise_exception: bool = True)
llm_aided_ocr.py:110
↓ 1 callersFunctionmain
()
llm_aided_ocr.py:634
↓ 1 callersFunctionparse_arguments
()
llm-aided-ocr-cli.py:6
↓ 1 callersFunctionpreprocess_image
(image)
llm_aided_ocr.py:404
↓ 1 callersFunctionprocess_chunk_with_context
(chunk: str, prev_context: str, index: int)
llm_aided_ocr.py:514
↓ 1 callersFunctionprocess_chunks
(chunks: List[str], reformat_as_markdown: bool, suppress_headers_and_page_numbers: bool)
llm_aided_ocr.py:512
↓ 1 callersFunctionprocess_document
(list_of_extracted_text_strings: List[str], reformat_as_markdown: bool = True, suppress_headers_and_page_numbe
llm_aided_ocr.py:534
↓ 1 callersFunctionremove_corrected_text_header
(text)
llm_aided_ocr.py:581
↓ 1 callersFunctionrun_pdf_processor
(args)
llm-aided-ocr-cli.py:18
Functionis_gpu_available
()
llm_aided_ocr.py:53
Functionocr_image
(image)
llm_aided_ocr.py:424
Functionsplit_long_sentence
(sentence: str, max_tokens: int, model_name: str)
llm_aided_ocr.py:228