ConversionDetailExtraction.h header

#include <ew/app/ConversionDetailExtraction.h>

Namespace ew::app

ConvertedEntityDetails struct

struct ew::app::ConvertedEntityDetails

The relationship/lifespan/state-over-time details the conversion proposes for ONE already -known entity (docs/AI_FOLDER_CONVERSION.md §4 C5). Details only ever attach to entities that exist: the parser drops proposals for unknown names and drops references whose target is unknown, so a conversion can never create a dangling link.

Members

QString ew::app::ConvertedEntityDetails::entityName

The entity these details belong to (must match a known name).

std::vector<std::pair<QString, QString> > ew::app::ConvertedEntityDetails::references

Reference-field proposals as (field label, target entity name) pairs – the relationship-graph edges ("Mentor" -> "Master Coriander").

QString ew::app::ConvertedEntityDetails::born

Birth instant as the text expresses it; empty when the text does not say.

QString ew::app::ConvertedEntityDetails::died

Death instant; empty when the text does not say (or the entity still lives).

std::vector<ConvertedTimedValue> ew::app::ConvertedEntityDetails::timedValues

Field values that change across story time.

bool ew::app::ConvertedEntityDetails::operator==(const ConvertedEntityDetails &) const =default

Value equality across all fields.

ConvertedTimedValue struct

struct ew::app::ConvertedTimedValue

A field value that changes at a story instant – the conversion's proposal for the codex's state-over-time machinery ("Rank" becomes "Master" in year 1240).

Members

QString ew::app::ConvertedTimedValue::field

The field whose value changes.

QString ew::app::ConvertedTimedValue::when

The story instant, as the text expresses it (a year or date in the world's reckoning).

QString ew::app::ConvertedTimedValue::value

The value from that instant on.

bool ew::app::ConvertedTimedValue::operator==(const ConvertedTimedValue &) const =default

Value equality across all fields.

Functions

AiRequest ew::app::buildConversionDetailRequest(const QString &sourceText, const QStringList &knownNames)

Builds the AI request asking for relationships, lifespans, and state-over-time changes among knownNames as found in sourceText, as strict JSON for parseConversionDetailResponse. Pure; the caller sets the model and sends it.

std::vector< ConvertedEntityDetails > ew::app::parseConversionDetailResponse(const QString &content, const QStringList &knownNames)

Parses the model reply into per-entity details. Tolerant like every conversion parser (hardened JSON isolation; empty parts dropped), and SAFE: an entry whose entityName is not in knownNames is dropped whole, a reference whose target is not known is dropped, and duplicate entity entries collapse to the first (case-insensitive throughout). Returns empty when no well-formed array is present.