Romanet parsing is the algorithmic process of identifying, interpreting, and normalizing the traditional lowercase Roman numeral numbering scheme—specifically (i), (ii), (iii)—used to define deeply nested sub-levels within legal document outlines. It is a critical component of legal document structure parsing, distinct from standard Arabic numeral or alphabetical enumeration, requiring models to recognize a sequence that is semantically hierarchical rather than purely decorative.
Glossary
Romanet Parsing

What is Romanet Parsing?
Romanet parsing is the specialized computational task of interpreting and normalizing the lowercase Roman numeral numbering scheme (i, ii, iii, iv) used to denote nested hierarchical levels in formal legal outlines and contracts.
This task is essential for accurate header hierarchy extraction and section boundary detection in complex contracts and statutes. A failure in Romanet parsing can corrupt the reconstructed document tree, causing a sub-clause to be misclassified as a sibling rather than a child of its parent provision, which undermines downstream tasks like cross-reference resolution and operative provision segmentation.
Key Characteristics of Romanet Parsing
Romanet parsing is the specialized computational task of interpreting and normalizing the traditional lowercase Roman numeral numbering scheme (i, ii, iii, iv, etc.) used in nested legal outlines. This process is critical for accurately reconstructing the hierarchical structure of contracts, statutes, and pleadings.
Hierarchical Nesting Recognition
The core challenge of romanet parsing is distinguishing between sibling and child elements in deeply nested outlines. A parser must recognize that 'subsection (i)' and 'subsection (ii)' are siblings under a parent clause, while 'sub-subsection (i)' under subsection (ii) begins a new hierarchical level. This requires stateful tracking of indentation, preceding markers, and context.
Normalization to Numeric Values
Romanet parsing converts string representations into their integer equivalents for computational processing. Key rules include:
- Additive principle: 'vi' = 5 + 1 = 6
- Subtractive principle: 'iv' = 5 - 1 = 4
- Valid character set: I, V, X, L, C, D, M only
- Maximum sequential repeats: Three identical symbols (e.g., 'iii' = 3, but 'iv' for 4) This normalization enables sorting, comparison, and cross-referencing with other numbering schemes.
Disambiguation from Alphabetic Text
A critical preprocessing step is distinguishing romanet numerals from identical alphabetic text. The string 'i' could be a romanet numeral, the English first-person pronoun, or part of a word like 'in'. Disambiguation strategies include:
- Positional analysis: Is the token at the start of a line or after whitespace?
- Contextual cues: Is it followed by a period, parenthesis, or other delimiter?
- Dictionary exclusion: Is the token a known word in the document's language?
- Pattern matching: Does it conform to a known outline numbering sequence?
Multi-Level Outline Reconstruction
Romanet parsing is rarely performed in isolation. It typically operates within a larger outline reconstruction pipeline that handles mixed numbering schemes:
- Level 1: Uppercase Roman (I, II, III)
- Level 2: Uppercase Alpha (A, B, C)
- Level 3: Arabic Numeric (1, 2, 3)
- Level 4: Lowercase Romanet (i, ii, iii) — the romanet layer
- Level 5: Lowercase Alpha (a, b, c) The parser must correctly assign each romanet token to its appropriate depth in the document tree.
Edge Cases and Irregular Inputs
Real-world legal documents present numerous parsing challenges:
- Malformed numerals: 'iiii' instead of 'iv' (common in older texts)
- Mixed case: 'Iv' or 'iV' due to OCR errors
- Overlapping ranges: Romanet sequences that restart within sibling sections
- Non-standard delimiters: Periods, double parentheses, or em-dashes
- Inline references: 'as described in subsection (iv) above' Robust parsers must handle these variations gracefully without breaking the structural parse.
Integration with Legal NLP Pipelines
Romanet parsing serves as a foundational preprocessing step for downstream legal AI tasks:
- Citation resolution: Linking 'see § 5(a)(iv)' to the correct target
- Clause extraction: Isolating operative provisions by their romanet identifiers
- Document comparison: Aligning corresponding sub-clauses across versions
- Obligation extraction: Identifying duties tied to specific sub-provisions
- Summarization: Preserving hierarchical context in condensed outputs Accurate romanet parsing directly impacts the citation integrity of legal reasoning systems.
Frequently Asked Questions
Answers to common technical questions about the interpretation and normalization of lowercase Roman numeral numbering schemes used in nested legal outlines.
Romanet parsing is the specific computational task of interpreting and normalizing the traditional lowercase Roman numeral numbering scheme (i, ii, iii, iv, etc.) used in deeply nested legal outlines, often called 'romanets.' It works by applying a combination of optical character recognition (OCR) and deterministic rule-based algorithms to identify these numerals, distinguish them from alphabetic characters (like the word 'ii' as a typo or abbreviation), and map them to their integer equivalents. The parser must understand the hierarchical context—recognizing that a romanet 'i' under a capital letter 'A' represents a distinct level of nesting—to reconstruct the document's logical outline structure for downstream tasks like cross-reference resolution and header hierarchy extraction.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Romanet parsing is one component of a larger legal document structure parsing pipeline. These related concepts form the technical foundation for building robust legal AI systems that can decompose, classify, and normalize complex legal outlines.
Header Hierarchy Extraction
The process of identifying section titles and subtitles and reconstructing the nested parent-child relationships that form the document's outline. Romanet parsing is a specialized subset of this broader task.
- Detects font size, weight, and indentation as structural signals
- Reconstructs the logical tree of sections, subsections, and clauses
- Handles mixed numbering schemes: Arabic, Roman, and alphabetical
- Critical for generating accurate table of contents and navigation panes
Example: A contract may use 'Article I' (uppercase Roman), 'Section 1.1' (Arabic decimal), and '(a)' (lowercase alpha) simultaneously. Header hierarchy extraction must normalize all three into a coherent outline.
Statutory Reference String Parsing
The specialized task of decomposing a citation to a statute into its constituent parts, including title, chapter, section, and subsection numbers. Romanet values frequently appear as subsection identifiers within these references.
- Parses strings like '42 U.S.C. § 1983(b)(iii)' into structured fields
- Must distinguish romanet 'iii' from the word 'iii' in party names
- Enables cross-reference resolution and hyperlink generation
- Validates citations against authority databases for correctness
Statutory parsers often use the same romanet normalization logic to convert '§ 5(a)(iv)' into a machine-readable path for retrieval systems.
BIO Tagging Scheme
A token-level annotation standard used in sequence labeling where tokens are tagged as the Beginning, Inside, or Outside of a named entity or structural chunk. This is the dominant approach for training romanet detection models.
- B-Romanet: Marks the first token of a romanet sequence
- I-Romanet: Marks continuation tokens within the same romanet
- O: Marks tokens outside any romanet span
- Enables token classification models to learn structural boundaries
Training data example: 'subsection ( B-Romanet iv I-Romanet ) O shall O govern O' teaches the model to recognize parenthetical romanet spans as distinct from surrounding legal text.
Cross-Reference Resolution
The process of computationally linking a textual reference pointer within a legal document to the specific target provision, section, or external authority it cites. Romanet parsing is a prerequisite for resolving internal cross-references.
- Resolves 'as set forth in § 2(a)(iv) above' to the exact clause
- Requires normalized identifiers — romanets must be converted to a canonical form
- Handles Id. references that point to the immediately preceding authority
- Builds a citation graph for network analysis of legal reasoning
Without accurate romanet parsing, a reference to 'subsection (v)' cannot be reliably matched to its target, breaking the citation network that powers legal research tools.
Structural Role Classification
The task of assigning a functional label — such as 'title', 'recital', 'operative provision', or 'signature block' — to a segmented block of text within a legal document. Romanet-labeled blocks typically receive the 'operative provision' classification.
- Distinguishes binding clauses from prefatory recitals
- Uses spatial features (indentation, position) and textual features (numbering patterns)
- Romanet presence is a strong signal that text is a subordinate operative clause
- Enables downstream tasks like obligation extraction and clause comparison
A block beginning with '(iii)' is almost certainly a binding sub-provision, not a recital or definition. This classification signal helps legal AI systems prioritize which text to analyze for deontic logic.
Font-Based Heuristic Parsing
A rule-based method for inferring document structure by analyzing changes in font size, weight, and style to detect headings and hierarchy. Romanet paragraphs often share identical font characteristics with their parent clause, making them invisible to font-based heuristics alone.
- Detects heading levels by font size thresholds
- Identifies bold, italic, and small caps as emphasis signals
- Limitation: Cannot distinguish romanet '(i)' from body text if font is unchanged
- Must be combined with regex-based numbering detection for complete coverage
This limitation is precisely why dedicated romanet parsing is necessary — font heuristics fail when the only structural signal is the numbering scheme itself.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us