mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-14 17:54:42 +00:00
Pipeline: City rename, add address/postal-code generation, add xeger generation (#232)
This commit is contained in:
@@ -11,9 +11,7 @@
|
||||
|
||||
#include "data_model/models.h"
|
||||
|
||||
// ============================================================================
|
||||
// Generation Output Models
|
||||
// ============================================================================
|
||||
|
||||
/**
|
||||
* @brief Generated brewery payload.
|
||||
@@ -79,23 +77,39 @@ struct UserResult {
|
||||
float activity_weight{};
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
// Pipeline Data Models
|
||||
// ============================================================================
|
||||
|
||||
/**
|
||||
* @brief Enriched city data with Wikipedia context.
|
||||
*/
|
||||
struct EnrichedCity {
|
||||
Location location;
|
||||
City location;
|
||||
std::string region_context{};
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A physical address: the city plus a concrete postal code selected
|
||||
* from that city's curated postal-code examples.
|
||||
*/
|
||||
struct BreweryAddress {
|
||||
City city;
|
||||
std::string postal_code{};
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A physical address for a generated user: the city plus a concrete
|
||||
* postal code selected from that city's curated postal-code examples.
|
||||
*/
|
||||
struct UserAddress {
|
||||
City city;
|
||||
std::string postal_code{};
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Helper struct to store generated brewery data.
|
||||
*/
|
||||
struct BreweryRecord {
|
||||
Location location;
|
||||
BreweryAddress address;
|
||||
BreweryResult brewery;
|
||||
};
|
||||
|
||||
@@ -107,7 +121,7 @@ struct BreweryRecord {
|
||||
* consumer can register real accounts from the pipeline's SQLite export.
|
||||
*/
|
||||
struct UserRecord {
|
||||
Location location;
|
||||
UserAddress address;
|
||||
UserResult user;
|
||||
std::string email{};
|
||||
std::string date_of_birth{};
|
||||
|
||||
@@ -21,14 +21,36 @@ class ILogger;
|
||||
|
||||
namespace prog_opts = boost::program_options;
|
||||
|
||||
// ============================================================================
|
||||
// Location Models
|
||||
// ============================================================================
|
||||
// City Models
|
||||
|
||||
/**
|
||||
* @brief Canonical location record for city-level generation.
|
||||
* @brief Curated postal-code metadata for a city, mirroring the
|
||||
* `postal_code` object in the locations dataset.
|
||||
*/
|
||||
struct Location {
|
||||
struct PostalCodeSpec {
|
||||
/**
|
||||
* @brief Permissive country-wide postal-code format regex, used as the
|
||||
* validation fallback for a selected example.
|
||||
*/
|
||||
std::string country_format_regex{};
|
||||
|
||||
/**
|
||||
* @brief City-specific postal-code regexes (more precise than the country
|
||||
* format).
|
||||
*/
|
||||
std::vector<std::string> city_regexes{};
|
||||
|
||||
/**
|
||||
* @brief Concrete example postal codes for this city. The postal code
|
||||
* service selects from these rather than synthesizing codes.
|
||||
*/
|
||||
std::vector<std::string> examples{};
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Canonical city record for city-level generation.
|
||||
*/
|
||||
struct City {
|
||||
std::string city{};
|
||||
std::string state_province{};
|
||||
|
||||
@@ -50,19 +72,13 @@ struct Location {
|
||||
std::vector<std::string> local_languages{};
|
||||
|
||||
/**
|
||||
* @brief Latitude in decimal degrees.
|
||||
* @brief Postal-code metadata (format regex, city regexes, and concrete
|
||||
* examples) sourced directly from the curated locations dataset.
|
||||
*/
|
||||
double latitude{};
|
||||
|
||||
/**
|
||||
* @brief Longitude in decimal degrees.
|
||||
*/
|
||||
double longitude{};
|
||||
PostalCodeSpec postal_code{};
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
// Name / Persona Models
|
||||
// ============================================================================
|
||||
|
||||
/**
|
||||
* @brief A sampled first/last name pair, with the source forename's gender.
|
||||
@@ -131,9 +147,7 @@ struct UserPersona {
|
||||
std::vector<std::string> style_affinities{};
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
// Configuration Models
|
||||
// ============================================================================
|
||||
|
||||
/**
|
||||
* @brief LLM sampling parameters.
|
||||
@@ -223,9 +237,7 @@ struct ApplicationOptions {
|
||||
PipelineOptions pipeline;
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
// Function Declarations
|
||||
// ============================================================================
|
||||
|
||||
std::optional<ApplicationOptions> ParseArguments(
|
||||
const int argc, char** argv, std::shared_ptr<ILogger> logger = nullptr);
|
||||
|
||||
Reference in New Issue
Block a user