Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Dicklesworthstone/llm_aided_ocr
/ functions
Functions
25 in github.com/Dicklesworthstone/llm_aided_ocr
⨍
Functions
25
◇
Types & classes
0
↓ 3 callers
Function
chunk_text
(text: str, max_chunk_tokens: int, model_name: str)
llm_aided_ocr.py:205
↓ 3 callers
Function
estimate_tokens
(text: str, model_name: str)
llm_aided_ocr.py:177
↓ 3 callers
Function
generate_completion
(prompt: str, max_tokens: int = 5000)
llm_aided_ocr.py:156
↓ 3 callers
Function
get_tokenizer
(model_name: str)
llm_aided_ocr.py:167
↓ 2 callers
Function
process_chunk
(chunk: str, prev_context: str, chunk_index: int, total_chunks: int, reformat_as_markdown: bool, suppress_head
llm_aided_ocr.py:428
↓ 1 callers
Function
adjust_overlaps
(chunks: List[str], tokenizer, max_chunk_tokens: int, overlap_size: int = 50)
llm_aided_ocr.py:250
↓ 1 callers
Function
approximate_tokens
(text: str)
llm_aided_ocr.py:185
↓ 1 callers
Function
assess_output_quality
(original_text, processed_text)
llm_aided_ocr.py:584
↓ 1 callers
Function
convert_pdf_to_images
(input_pdf_file_path: str, max_pages: int = 0, skip_first_n_pages: int = 0)
llm_aided_ocr.py:411
↓ 1 callers
Function
download_models
()
llm_aided_ocr.py:72
↓ 1 callers
Function
generate_completion_from_claude
(prompt: str, max_tokens: int = CLAUDE_MAX_TOKENS - TOKEN_BUFFER)
llm_aided_ocr.py:266
↓ 1 callers
Function
generate_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 callers
Function
generate_completion_from_openai
(prompt: str, max_tokens: int = 5000)
llm_aided_ocr.py:309
↓ 1 callers
Function
load_model
(llm_model_name: str, raise_exception: bool = True)
llm_aided_ocr.py:110
↓ 1 callers
Function
main
()
llm_aided_ocr.py:634
↓ 1 callers
Function
parse_arguments
()
llm-aided-ocr-cli.py:6
↓ 1 callers
Function
preprocess_image
(image)
llm_aided_ocr.py:404
↓ 1 callers
Function
process_chunk_with_context
(chunk: str, prev_context: str, index: int)
llm_aided_ocr.py:514
↓ 1 callers
Function
process_chunks
(chunks: List[str], reformat_as_markdown: bool, suppress_headers_and_page_numbers: bool)
llm_aided_ocr.py:512
↓ 1 callers
Function
process_document
(list_of_extracted_text_strings: List[str], reformat_as_markdown: bool = True, suppress_headers_and_page_numbe
llm_aided_ocr.py:534
↓ 1 callers
Function
remove_corrected_text_header
(text)
llm_aided_ocr.py:581
↓ 1 callers
Function
run_pdf_processor
(args)
llm-aided-ocr-cli.py:18
Function
is_gpu_available
()
llm_aided_ocr.py:53
Function
ocr_image
(image)
llm_aided_ocr.py:424
Function
split_long_sentence
(sentence: str, max_tokens: int, model_name: str)
llm_aided_ocr.py:228