Cross-Era Text Knowledge Base Construction: From Dialect to Standard Language
This article presents a practical technical approach to building cross-era text knowledge bases, framed around the challenge of converting richly varied historical text into structured, queryable knowledge. Using the life and works of a 13th–14th-century Italian poet as a running example, it explains the three gaps between raw text and usable knowledge — expression gaps (multiple spellings for one entity), semantic gaps (relationships and time hidden in narrative), and evolution gaps (text that changes across transcription, printing, and digitization). It then lays out a four-layer architecture (access, governance, knowledge, application), with detailed coverage of three-level normalization (character, word form, concept), event-based modeling that keeps time computable rather than merely precise, hybrid retrieval, cited graph question answering, chronological visualization, layered quality metrics, engineering deployment, and a phased implementation roadmap with common pitfalls.
Introduction: The Shared Challenge of Digitizing Cross-Era Text
A poet who lived in the 13th and 14th centuries spent his life across three Italian cities — Florence, Verona, and Ravenna. As a young man he studied rhetoric under a renowned scholar, mastering public oratory and the writing of formal Latin letters; in 1289 he fought at the Battle of Campaldino; afterward he entered municipal service, and in 1300 he became one of the six officials holding the highest executive power in the city-state. In 1302 he was fined heavily and exiled on charges of embezzling public funds, opposing the pope, and disturbing the peace of the republic; after refusing to plead guilty, his sentence was commuted to permanent exile, and he wandered from place to place thereafter. In his later years he completed the epic Divine Comedy in the Tuscan dialect. Engels called him “the last poet of the Middle Ages and the first poet of the modern era.”
A person whose life spanned two eras produced work that likewise straddles two linguistic traditions:
- Early works were written in Latin, the common language of scholarship and official documents at the time;
- His masterwork was written in the Tuscan dialect, which later became the foundation of standard Italian.
“The journey from dialect to standard language” closely mirrors cultural knowledge base construction today. The works such a knowledge base must collect often share the following characteristics:
- Multiple registers coexist: academic Latin, vernacular, and later standardized forms appear side by side.
- Multiple versions circulate: different manuscripts and editions differ at the level of individual words.
- Information is incomplete: dates can only be estimated (“circa such-and-such a year”), and place names differ between historical and modern usage.
- Relationships are embedded in narrative: mentorship, offices held, and exile are scattered through the running text rather than captured in dedicated fields.
The core task of knowledge base construction can therefore be summarized in one sentence: to losslessly map “dialectal” text into “standardized” structured knowledge. This article uses that mapping as its through-line and lays out a practical, implementable technical path.
1. Problem Definition: Three Gaps Between Text and Knowledge
Traditional full-text search can only answer “where does a given word appear,” but not “in which city did he complete his masterwork,” “what is the relationship between his exile and his writing,” or “which contemporaries did he interact with.” The gap between these two classes of questions can be divided into roughly three layers.
1.1 The Expression Gap: Multiple Spellings for the Same Entity
The same person may appear under an original name, an honorific, or an abbreviated form across documents, and the same place name may differ between historical and modern sources. For example, “Durante degli Alighieri” and the familiar poetic byline “Dante” point to the same person, and the “Florence” of medieval documents points to the same location as the modern city of the same name in the Italian region of Tuscany. If you rely on literal matching alone, information about a single entity gets scattered across multiple entry points.
1.2 The Semantic Gap: Relationships and Time Hidden in Narrative
Personal histories, mentorship relationships, and event causality mostly exist in narrative form. A statement like “sentenced to exile in 1302, and after refusing to plead guilty, commuted to permanent exile” itself contains multiple relationships among event, time, subject, and outcome — but to a machine it is simply a continuous string of words.
1.3 The Evolution Gap: Text Forms Keep Changing Across Generations
An oral tradition is first recorded as a dialect text, then edited into a standardized text, and then repeatedly reshaped by copying, printing, and digitization. If a knowledge base stores only the “final version,” it cannot trace the source of evidence or explain the differences between versions.
2. Overall Architecture: A Four-Layer Design
To address these gaps, we can adopt a four-layer architecture — Access → Governance → Knowledge → Application — in which each layer has a single responsibility and the layers are tied together through metadata.
┌─────────────── Application Layer ───────────────┐│ Hybrid retrieval │ Graph Q&A (mandatory citations) │ Chronological visualization │├─────────────── Knowledge Layer ─────────────────┤│ Entities (people/places/works…) │ Relations │ Events (with uncertain time and sources) │├─────────────── Governance Layer ────────────────┤│ Character normalization → Word-form normalization → Concept normalization (alias mapping + disambiguation) │├─────────────── Access Layer ────────────────────┤│ Scanned-image OCR │ Electronic text parsing │ Secondary-literature structuring │ Metadata capture │└─────────────────────────────────────────────────┘
- The Access Layer converts materials from varied sources into structured text while preserving provenance.
- The Governance Layer performs three-level normalization and is the key to the quality of the entire pipeline.
- The Knowledge Layer organizes entities, relations, and events under a unified schema.
- The Application Layer faces users and provides traceable retrieval and question answering.
2.1 Access Layer: Making Every Text Traceable
- Image materials: first correct the image and remove noise, then perform layout analysis, and finally do character recognition, preserving positional information such as page and line numbers wherever possible.
- Electronic text: parse hierarchically by piece, chapter, and section, recording the file source and version information.
- Secondary literature: biographical chronologies and research surveys are often already structured and can be extracted directly through document-parsing capabilities.
Every record carries three fields: source_doc, locator, and confidence:
locatorpinpoints the exact chapter, section, and line;confidencereflects how reliable the recognition or extraction is.
These three fields are the foundation for later citation tracing and manual review.
2.2 Governance Layer: Three-Level Normalization of Characters, Word Forms, and Concepts
(1) Character level: unify Unicode code points and the conventions for apostrophes and hyphens, standardize capitalization rules, and merge visually similar variant glyphs introduced by copying.
(2) Word-form level: the different inflected forms of the same word should be merged to a dictionary lemma. Languages differ greatly in morphology: Latin and Latin-influenced Italian rely heavily on inflectional endings, whereas Chinese relies more on word order and function words. The solution should support configuring normalization rules per language, rather than “one set of rules for all text.”
(3) Concept level: map the various names for the same entity to a unique ID. This requires two steps — “alias table + context disambiguation”:
- first use the alias table to converge names into a set of candidate entities;
- then use context to determine the specific referent. Contextual constraints are a strong signal — for example, the same work is often tagged with its place of composition, and a place name within a given battle entry usually points to the battle’s location.
Illustrative data (alias mapping):
{"entity_id": "person:dantismo","canonical_name": "Dante","entity_type": "Person","aliases": [{"surface": "Durante degli Alighieri", "note": "Original baptismal-name form"},{"surface": "Alighieri", "note": "Family surname; must be disambiguated from other family members using context"}]}
Concept normalization is the core of the whole “from dialect to standard language” effort:
- the character and word-form levels resolve literal differences;
- the concept level converges all names onto the same entity.
2.3 Knowledge Layer: Unified Modeling of Entities, Relations, and Events
- Entities: people, places, institutions, works, event types, and so on.
- Relations: mentorship, contemporaneous contacts, offices held, exile, composition — each requiring a clear direction and a time constraint.
- Events: structured objects carrying time, place, participants, and sources.
(1) Event-based modeling. Do not flatten “office held,” “exile,” or “composition” into attributes on a person node — each is an event that occurs over a time interval, at a place, with specific participants. Event-based modeling has three benefits:
- experiences of the same entity at different times can be stored separately;
- every event can carry its own source;
- uncertain information can be expressed naturally.
(2) Time should aim not for “precision” but for “computability.” Cross-era documents contain many expressions like “circa,” “around,” and “at some point between.” An event’s time should be split into three elements: a value, a precision, and the original expression. Example:
{"event_id": "evt:composition-epic","type": "Composition","subject": "person:dantismo","object": "work:commedia","time": {"value": "~1307", "precision": "year_approx", "raw": "circa 1307"},"place": "place:florence_or_tuscany","language": "Tuscan dialect","sources": [{"doc_id": "doc:chronicle-01", "locator": "early-biography/paragraph-2"}]}
At query time, the system can decide matching rules based on precision: “exact to the year” events answer questions about a specific year, while “approximate” events are used only for time-range retrieval, with their uncertainty flagged in the results.
(3) Locations use “standard name + alias + coordinates + historical period.” A medieval city-state and the region it belonged to can be recorded as:
{"entity_id": "place:verona","canonical_name": "Verona","aliases": ["the city of Verona"],"region_current": "Veneto","coords": {"lat": 45.44, "lon": 10.99}}
With coordinates, a person’s migration path can be reconstructed on a map as a “chronological trajectory” — for example, “settled in Ravenna from 1318” maps directly to a single point in time.
(4) Works are modeled as independent nodes. A work node stores genre, language of composition, place of composition, completion status, and so on, so it can answer questions like “what language was his masterwork written in” and “in which city was it completed.”
2.4 Extraction Pipeline and Human Review
A recommended pipeline is “rules/dictionary → model extraction → LLM enrichment → human review”:
- Rules and alias tables guarantee high precision and handle the certain cases;
- a lightweight sequence-labeling model identifies entities such as people, places, and times;
- a large language model suits relations that require reasoning, such as mentorship and event causality;
- all results enter a human-review queue tiered by confidence, and low-confidence entries are not written directly into the formal knowledge base.
Illustrative code (concept-normalization disambiguation logic, pseudocode):
def resolve_entity(mention, context, alias_table):# 1. Match against the alias table to get a set of candidate entitiescandidates = alias_table.lookup(mention) # e.g., {"person:dante", "family:alighieri"}if len(candidates) <= 1:return candidates[0] if candidates else None# 2. Disambiguate multiple candidates using contextbest, best_score = None, 0.0for entity in candidates:# Co-occurring entities: known entities that appeared in the same paragraph/workco_occurrence = len(entity.co_mentions & context.entities)# Place consistency: whether the event location matches the entity's active locationplace_match = entity.check_place(context.place)score = 0.6 * co_occurrence + 0.4 * place_matchif score > best_score:best, best_score = entity, score# 3. Route to human review when confidence is insufficientreturn best if best_score >= 0.75 else "MANUAL_REVIEW"
3. Application Layer: Retrieval, Graph Q&A, and Visualization
3.1 Hybrid Retrieval
Keyword search alone has limited recall, so it is best to combine three result streams:
- Keyword search: ensures exact hits such as years and work titles;
- Vector search: recalls synonymous expressions by semantics;
- Graph constraints: for “works composed in Ravenna between 1318 and 1321,” first use the knowledge layer to filter by time and place, then retrieve the relevant text.
The three streams can be fused and ranked with weights:
final_score = 0.4 * keyword_score + 0.4 * vector_score + 0.2 * graph_score
The weights should be adjusted dynamically according to the query type:
- when looking up a specific entry, increase the keyword weight;
- when looking up topically related content, increase the vector weight.
3.2 Graph Q&A and the “Mandatory Citation” Mechanism
Question answering over a cultural knowledge base must be verifiable. A workable flow is:
retrieve supporting passages → LLM generates an answer → verify each statement is backed by evidence├─ Supported → output the answer + source locator (chapter/section/line)└─ Unsupported → refuse to answer or mark it as speculation
3.3 Chronological Visualization
Arranging a person’s event nodes along a timeline makes the full trajectory — “from office to exile, then wandering and composing” — visible at a glance. An interactive chronological view lets researchers quickly locate the original text of an event, forming a “visualize → trace → correct” loop.
4. Quality Evaluation and Engineering Deployment
4.1 Quality Evaluation: Locating Weak Points with Layered Metrics
| Stage | Metric | Notes |
|---|---|---|
| Character recognition | Character accuracy | Estimated via sampled human proofreading |
| Entity recognition | Precision, recall, F1 | Measured against a labeled dataset |
| Entity disambiguation | Disambiguation accuracy | Focus on same-name and alias scenarios |
| Event extraction | Relation F1, time accuracy | Time precision should be evaluated by tier |
| Retrieval | Hit rate@K, ranking metrics | Focus on the usability of the top few results |
| Q&A | Answer correctness, citation traceability, refusal rate | Missing citations should count as errors |
Key point: do not look at a single metric in isolation. For example, entity disambiguation accuracy may be high while alias-table coverage is poor, dragging recall down; conversely, chasing recall alone introduces noise.
4.2 Engineering Deployment: Separating Batch Processing from Online Services
- Batch jobs: character recognition of scanned images, document parsing, and entity extraction are offline tasks suited to decoupling via message queues. Queues can route traffic by document type, and consumers can scale out horizontally when backlogs build up.
- Online services: retrieval and Q&A are latency-sensitive and can be containerized. The retrieval service and the Q&A service should scale independently to avoid interfering with each other.
- Storage: raw images and text live in object storage, structured entities and events go into a graph database or relational database, and vector data is served by a vector-retrieval service.
- Observability: logging and monitoring/alerting services track extraction success rate, retrieval latency, and error rate.
On Baidu AI Cloud, these capabilities can be assembled from products such as object storage, message queues, container platforms, document parsing, logging, and monitoring/alerting, without building infrastructure from scratch.
4.3 Security and Compliance
- Modern editions under copyright must be licensed before entering the corpus;
- Even public-domain scans of ancient texts require a clear definition of permitted use;
- The knowledge base should follow the principle of least privilege, managing data access through unified identity authentication and access control;
- All operations should be retained in audit logs.
5. Implementation Roadmap and Common Pitfalls
5.1 A Four-Phase Roadmap
| Phase | Reference timeline | Core tasks | Deliverables |
|---|---|---|---|
| Phase 1: Access | Weeks 1–2 | Define corpus scope; build the collection and parsing pipeline | Raw text store + metadata inventory |
| Phase 2: Governance | Weeks 3–4 | Build the alias table; implement three-level normalization | Entity store with ≥90% disambiguation accuracy |
| Phase 3: Modeling | Weeks 5–6 | Design the event schema; run the extraction pipeline; human review | Entity/relation/event knowledge base |
| Phase 4: Application | Weeks 7–8 | Hybrid retrieval, graph Q&A, chronological visualization | Demonstrable knowledge base system |
The timeline can be adjusted to the corpus size. It is best to produce a demonstrable intermediate result at each phase, so that requirement mismatches surface early.
5.2 Common Pitfalls and Countermeasures
- Pitfall 1: Storing only full text without building entities. Full-text search cannot answer relational questions. → Build the entity and event model from day one.
- Pitfall 2: Chasing “precision” while discarding “circa” and “around.” Once this information is deleted, the reliability of the evidence is lost with it. → Retain all three time elements (value, precision, original expression).
- Pitfall 3: Using one set of normalization rules for all languages. Latin and Chinese differ greatly in morphology. → Configure rules separately per language.
- Pitfall 4: Q&A without citations. Answers without citations cannot be verified. → Establish mandatory-citation and refusal mechanisms.
- Pitfall 5: No version management. Ancient texts are continually re-edited, so old data will conflict with new conclusions. → Assign version numbers to text, graph, and alias tables, and support rollback and incremental updates.
Conclusion
The poet’s experience reveals a simple principle: dialect and standard language are not opposites — the standard language in fact grows out of the soil of the dialect. Cultural knowledge base construction works the same way. Features that seem “messy” — multiple registers, multiple versions, uncertain information — are precisely what the knowledge base truly looks like. By applying three-level normalization at the character, word-form, and concept levels, “dialectal” text is converged into standard expression; then, through event-based modeling and traceable retrieval, every piece of knowledge can be traced back to its source text. This turns cross-era documents into knowledge assets that are computable, verifiable, and able to evolve sustainably.
