Merge pull request 'Lows: show-working allowlist and Display, edition_year meaning' (#48) from weksa/lows-remaining into main

This commit is contained in:
Weksa 2026-11-12 09:46:55 +00:00
commit e9cbd9bbfd
4 changed files with 13 additions and 6 deletions

View file

@ -258,7 +258,7 @@ fn lower_error(e: &LowerError) -> Value {
LowerError::DanglingStress { entity, at } => ("DanglingStress", format!("the ruled pronunciation of {entity} has a stress mark at {at} with no vowel after it")),
LowerError::ConsentMissing { predication } => ("ConsentMissing", format!("{predication} is a request the packet does not carry the addressee's consent to")),
LowerError::AskerNotAddressee { predication } => ("AskerNotAddressee", format!("the agent of {predication} is not the addressee")),
LowerError::EntityRead { entity, why } => ("EntityRead", format!("reading {entity}: {why}")),
LowerError::EntityRead { entity, .. } => ("EntityRead", format!("the entity store failed reading {entity}")),
};
json!({ "variant": variant, "reason": reason })
}
@ -279,11 +279,11 @@ fn run(w: &World, dir: &Path, packet: &Packet) -> Result<(String, Value), Value>
Err(StoreError::Invalid(rs)) => {
return Err(json!({
"kind": "admission_refused",
"refusals": rs.iter().map(|r| json!({ "rule": r.rule(), "detail": format!("{r:?}") })).collect::<Vec<_>>(),
"refusals": rs.iter().map(|r| json!({ "rule": r.rule(), "detail": r.to_string() })).collect::<Vec<_>>(),
}));
}
Err(e) => {
return Err(json!({ "kind": "admission_refused", "refusals": [{ "rule": "store", "detail": format!("{e:?}") }] }));
return Err(json!({ "kind": "admission_refused", "refusals": [{ "rule": "store", "detail": e.to_string() }] }));
}
};
let text = lower(&view, &w.inv, &w.entities).map_err(|e| {

View file

@ -32,7 +32,7 @@ pub enum Source {
/// A public-domain work, with everything a reader needs to check the claim:
/// the edition's licence and the jurisdiction the public-domain status is
/// asserted in, who translated it (the translation is the text's copyright,
/// not the original's) and when the edition appeared. A work missing any
/// not the original's) and when the work or translation first appeared. A work missing any
/// is refused at admission.
PublicDomain {
work: String,
@ -41,6 +41,10 @@ pub enum Source {
licence: String,
jurisdiction: String,
translator: String,
/// The year the work, or for a translation this translation, first
/// appeared. It is not the year of the `edition_url` file's source
/// print: Project Gutenberg's text may be a later or modernised
/// edition, and the claim rests on the date of first appearance.
edition_year: u16,
},
/// Labelled model output; never in the test split. The rule that it is

View file

@ -170,7 +170,7 @@
]
},
{
"description": "A public-domain work, with everything a reader needs to check the claim:\nthe edition's licence and the jurisdiction the public-domain status is\nasserted in, who translated it (the translation is the text's copyright,\nnot the original's) and when the edition appeared. A work missing any\nis refused at admission.",
"description": "A public-domain work, with everything a reader needs to check the claim:\nthe edition's licence and the jurisdiction the public-domain status is\nasserted in, who translated it (the translation is the text's copyright,\nnot the original's) and when the work or translation first appeared. A work missing any\nis refused at admission.",
"type": "object",
"properties": {
"PublicDomain": {
@ -183,6 +183,7 @@
"type": "string"
},
"edition_year": {
"description": "The year the work, or for a translation this translation, first\nappeared. It is not the year of the `edition_url` file's source\nprint: Project Gutenberg's text may be a later or modernised\nedition, and the claim rests on the date of first appearance.",
"type": "integer",
"format": "uint16",
"maximum": 65535,

View file

@ -59,7 +59,9 @@ for m in re.finditer(r'^(item:\S+) \[(.*?)\]\n "(.*)"$', run([str(weksa_bin), "
if set(corpus) != cited:
sys.exit(f"corpus dump lacks cited items {sorted(cited - set(corpus))}; unexpected {sorted(set(corpus) - cited)}")
# The dump's meta ends with the split (`... group=g Validation`, `... excluded`).
held_out = {k: v["meta"].split()[-1] for k, v in corpus.items() if v["meta"].split()[-1] in ("Validation", "Test")}
# Only Train and split-less items publish; any other name, including a split
# added later, is held out until it is allowed here.
held_out = {k: v["meta"].split()[-1] for k, v in corpus.items() if v["meta"].split()[-1] not in ("Train", "excluded")}
if held_out:
sys.exit(f"refusing to publish held-out items (nothing written): {held_out}")
model = "qwen3-embedding:0.6b"