Open neuroretransmit opened 7 months ago
Ideas:
def print_page_context(page_num, text):
""" Print context information for a page """
print(f"=== PAGE {page_num} CONTEXT ===")
print("Imagery or context information goes here")
print("===============================")
print(text)
def print_section_context(page_num, segment_num, paragraph_num, sentence_num, word_num, text):
print(f"=== PAGE {page_num}:SEGMENT {segment_num}:PARAGRAPH {paragraph_num};SENTENCE {sentence_num};WORD {word_num} CONTEXT ===")
print("Imagery or context information goes here")
print("===============================")
print(text)
#and
# inside retrieval functions
def retrieve_page(page_num):
text = get_pages(page_num)
print_page_context(page_num, text)
return text
def retrieve_section(page_num, segment_num, paragraph_num, sentence_num, word_num):
text = retrieve_section_text(page_num, segment_num, paragraph_num, sentence_num, word_num)
print_section_context(page_num, segment_num, paragraph_num, sentence_num, word_num, text)
return text
When working with unsolved pages and sections, the user should know some context of what they are pulling out of liber. Print something about the imagery or a hash/base60 etc. this applies to pages and any other parts in the hierarchy. Additionally maybe identifying page:segment:paragraph;sentence word is useful