INNER CODE UNIT · Python

parse_sections

gokayfem/awesome-vlm-architectures · scripts/build_release_timeline.py:372

def parse_sections(text: str) -> list[dict[str, object]]:
    start = text.index("## Architectures")
    end = text.index("## Important References", start)
    body = text[start:end]
    matches = list(re.finditer(r"(?m)^### \*\*(.+?)\*\*\s*$", body))
    sections: list[dict[str, object]] = []
    for position, match in enumerate(matches):
        section_end = (
            matches[position + 1].start() if position + 1 < len(matches) else len(body)
        )
        raw = body[match.start() : section_end]
        paragraphs = [part.strip() for part in re.split(r"\n\s*\n", raw)]
        contribution = next(
            (
                part
                for part in paragraphs[1:]
                if part and not part.startswith(("[!", "<", "<!--", "**Released:**"))
            ),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…