{% macro pct(share) -%}{{ '%.1f' | format(share * 100) }}%{%- endmacro %} {% macro node_line(n) -%} {{ n.render }} {{ n.facet_text }}{% if n.also %}, also {{ n.also | join(', ') }}{% endif %}{% if n.role == 'principal' %} principal{% endif %}{{ n.d | count }} distinct · {{ pct(n.share_d) }} {{ n.o | count }} occurrences · {{ pct(n.share_o) }}{% if n.validated is not none %} file: {{ n.validated | count }}{% if n.validated_distinct is not none %} ({{ 'at least ' if not n.validated_exact }}{{ n.validated_distinct | count }} distinct){% endif %}{% endif %}{% if n.bits_d is not none %} {{ '%.1f' | format(n.bits_d) }} bits d · {{ '%.1f' | format(n.bits_o) }} bits o{% endif %} {%- endmacro %} {% macro node_tree(nodes) -%} {%- endmacro %} {% macro family_tree(pv, kind, acc) -%}
{% for f in pv.families %}
Family {{ f.key }}{% if f.composition %} merges {{ f.composition | join(', ') }}{% endif %}{{ f.d | count }} distinct · {{ pct(f.share_d) }} · {{ f.o | count }} occurrences · {{ pct(f.share_o) }}{% if f.validated is not none %} · file: {{ f.validated | count }}{% endif %} {% if f.new_variant_length or f.new_variant_segment %}

New variants seen in the file, never in the sample: {{ f.new_variant_length | count }} of length, {{ f.new_variant_segment | count }} of segment.

{% endif %} {% for p in f.patterns %}

{{ p.render }} token lengths {{ p.lengths | join(' + ') }}

Distinct values
{{ p.d | count }} · {{ pct(p.share_d) }} {{ acc(kind) }}
Occurrences
{{ p.o | count }} · {{ pct(p.share_o) }} {{ acc('exact' if kind == 'exact' else 'sample') }}
{% if p.validated is not none %}
On every value
{{ p.validated | count }} {{ acc('exact') }}{% if p.validated_distinct is not none %} · {{ 'at least ' if not p.validated_exact }}{{ p.validated_distinct | count }} distinct{% endif %}
{% endif %}
Commonest format
{{ p.format }}
{% if p.examples %}

Examples {% for value in p.examples %}{{ value }} {% endfor %}

{% endif %}{% if p.unresolved %}

{{ p.unresolved }} example{{ '' if p.unresolved == 1 else 's' }} of the scan {{ 'is' if p.unresolved == 1 else 'are' }} not among the values this report keeps.

{% endif %} {% if p.nodes %}{{ node_tree(p.nodes) }}{% endif %}
{% endfor %} {% for t in f.tables %}

Table: {{ t.facet_text }}{% if t.bits is not none %} sigma {{ '%.2f' | format(t.bits) }}{% endif %}{% if t.saturated %} saturated{% endif %}

{% if pv.has_validation %}{% endif %}{% for c in t.cells %}{% if pv.has_validation %}{% endif %}{% endfor %}{% if pv.has_validation %}{% endif %}
ValueDistinctShareOccurrencesOn every value
{{ c.value }}{{ c.d | count }}{{ pct(c.share_d) }}{{ c.o | count }}{{ (c.validated | count) if c.validated is not none else '–' }}
others ({{ t.others_distinct | count }} values){{ t.others_d | count }}{{ pct(t.others_d / pv.entry.population.distinct if pv.entry.population.distinct else 0) }}{{ t.others_o | count }}–
{% endfor %}
{% endfor %}
{%- endmacro %}