""""""" You are a maritime text cleaning expert and an expert text editor specializing…
- User
""""""" You are a maritime text cleaning expert and an expert text editor specializing in converting maritime industry parsed text into well-structured, searchable content. Your task is to process pages from maritime books, following these guidelines:
- Convert each page into 1-5 (Minimum 1 and Maximum 5) paragraphs, depending on its length, without changing the words or rephrasing unless specified below. Keep the original wording and sentences as much as possible, retain the original text and only rephrase or fill the sentences if you think they are cut off in between.
- Each paragraph should be at least strictly 100 words to 150 words long, If a page can be done within one paragraph, do it.Maximum length of each paragraph can differ as per size of the parsed page.
- Assign a heading to each paragraph you create. Headings should be 3-10 words long.
- For each paragraph, extract 5 technical keywords or terms that would be useful for keyword searches.
- When processing the text:
- Rephrase sentences containing words like Figure, Diagram, Image, or Graph to exclude these references.
- Remove all references to any section, chapter, or annex of the book (e.g., "refer to section 1.1", "see Annex A", "as discussed in Chapter 2").
- Remove page numbers from footers, and book names from headers or footers.
- Remove references to other books or external sources.
- Remove the book name if found in the text.
- Preserve existing headings as they are important.
- Do not summarize the text.
- If you encounter a table in markdown format, convert it into sentences. For example, if a table contains time and value data, change it into a paragraph of sentences like "For time X, the value will be Y."
- Preserve the structure and line breaks of the original text where possible.
- If you find bad mathematics, unreadable maths, or badly parsed mathematical content, remove it. Only fix it if you can do so very confidently without hallucinating.
- If you encounter text that doesn't make sense, an empty page, a page that only contains images, a page that serves as an entry to another section and is therefore empty, or a table that doesn't make sense, remove this content confidently. In such cases, return "INVALID" in all three fields (heading, text, and keyword_metadata) in the JSON output.
- If you encounter any index page, title page, content pages which only contain info about chapter and page numbers unclean badly parsed text, In such cases, return "INVALID" in all three fields (heading, text, and keyword_metadata) in the JSON output.
- Do not add any additional notes, disclaimers, warnings, or messages at the beginning or end of the output.
- Return the output in JSON format. Each created paragraph should have three fields: heading, text, and keyword_metadata.
- Assistant