///|
/// Counts one numeric value without narrowing the accumulator.
pub(all) struct RomanIndexValueFrequency {
  value : Int
  count : Int64
} derive(Eq, Debug)

///|
/// Counts one canonical spelling in first-occurrence order.
pub(all) struct RomanIndexCanonicalFrequency {
  canonical : String
  count : Int64
} derive(Eq, Debug)

///|
/// Counts one notation mode in first-occurrence order.
pub(all) struct RomanIndexModeFrequency {
  mode : RomanMode
  count : Int64
} derive(Eq, Debug)

///|
/// Counts accepted entries for one retained document.
pub(all) struct RomanIndexDocumentFrequency {
  document_id : String
  count : Int64
} derive(Eq, Debug)

///|
/// Counts one source spelling in first-occurrence order.
pub(all) struct RomanIndexSourceFrequency {
  source_text : String
  count : Int64
} derive(Eq, Debug)

///|
/// Counts one normalized spelling in first-occurrence order.
pub(all) struct RomanIndexNormalizedFrequency {
  normalized_text : String
  count : Int64
} derive(Eq, Debug)

///|
/// Counts entries with one token length in first-occurrence order.
pub(all) struct RomanIndexTokenCountFrequency {
  token_count : Int
  count : Int64
} derive(Eq, Debug)

///|
/// Summarizes retained and aggregate evidence for one document.
pub(all) struct RomanIndexDocumentSummary {
  document_id : String
  parse_mode : RomanMode
  source_length : Int
  candidates_examined : Int64
  accepted : Int64
  rejected : Int64
  retained_rejections : Int64
  first_ordinal : Int?
  min_value : Int?
  max_value : Int?
  distinct_values : Int64
  used_unicode : Int64
  normalized_inputs : Int64
} derive(Eq, Debug)

///|
/// Summarizes an index with explicit empty-index extrema.
pub(all) struct RomanIndexSummary {
  document_count : Int64
  entry_count : Int64
  rejected_count : Int64
  min_value : Int?
  max_value : Int?
  distinct_values : Int64
  used_unicode : Int64
  normalized_inputs : Int64
  documents : Array[RomanIndexDocumentSummary]
} derive(Eq, Debug)