diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 38073102..65f588c0 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -61,6 +61,7 @@ boundaries above remain the target modular MSA architecture. | `tepp_simulation` | known-truth temporal/event data generation | | `validation_core` | RMSE, bias, coverage, graph, and Monte Carlo metrics | | `tepp_api` | versioned DTO, schema, and export contracts | +| `corpus_background` | corpus-background wording is not unique latent content and not stopword deletion | | `modality_source` | non-lexical modality is not unique latent content and not stopword deletion | | `copied_text` | copied-text residue is not unique latent content and not stopword deletion | | `style_source` | house-voice style residue is not unique latent content and not stopword deletion | diff --git a/CHANGELOG.md b/CHANGELOG.md index 5edf99ad..ad9d0dde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ All notable changes to TEPP are documented here. The format follows Keep a Chang ### Added +- `corpus_background` identity gate: corpus-level background wording is not unique latent content and is not erased by a stopword list; recovered background kinds match known truth at a higher computed rate than collapsing every token to unique content (ADR 0004/0012). - `modality_source` identity gate: non-lexical modality is not unique latent content and is not erased by a stopword list; recovered modality kinds match known truth at a higher computed rate than collapsing every token to unique content (ADR 0004/0012). - `copied_text` identity gate: copied and boilerplate residue is not unique latent content and is not erased by a stopword list; recovered copied-text kinds match known truth at a higher computed rate than collapsing every token to unique content (ADR 0004/0012). - `style_source` identity gate: house-voice style residue is not unique latent content and is not erased by a stopword list; recovered style kinds match known truth at a higher computed rate than collapsing every token to unique content (ADR 0004/0012). diff --git a/Cargo.lock b/Cargo.lock index 8d4341f6..fcd7b90e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -199,6 +199,10 @@ version = "0.1.0" name = "copy_identity" version = "0.1.0" +[[package]] +name = "corpus_background" +version = "0.1.0" + [[package]] name = "corpus_split" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 1fb34faf..c9b5b199 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ members = [ "crates/tepp_simulation", "crates/validation_core", "crates/tepp_api", + "crates/corpus_background", "crates/modality_source", "crates/copied_text", "crates/style_source", @@ -58,6 +59,7 @@ default-members = [ "crates/tepp_simulation", "crates/validation_core", "crates/tepp_api", + "crates/corpus_background", "crates/modality_source", "crates/copied_text", "crates/style_source", diff --git a/README.md b/README.md index e88ae397..5c59f762 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ crates/corpus_split crates/tepp_simulation crates/validation_core crates/tepp_api +crates/corpus_background crates/modality_source crates/copied_text crates/style_source diff --git a/crates/corpus_background/Cargo.toml b/crates/corpus_background/Cargo.toml new file mode 100644 index 00000000..86915786 --- /dev/null +++ b/crates/corpus_background/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "corpus_background" +description = "Corpus-background wording is not unique content and not stopword deletion." +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +authors.workspace = true +repository.workspace = true +homepage.workspace = true +readme.workspace = true +keywords.workspace = true +categories.workspace = true +publish = false + +[lints] +workspace = true diff --git a/crates/corpus_background/src/error.rs b/crates/corpus_background/src/error.rs new file mode 100644 index 00000000..369ddc67 --- /dev/null +++ b/crates/corpus_background/src/error.rs @@ -0,0 +1,57 @@ +//! Fail-closed corpus-background errors. + +use std::fmt; + +/// A fail-closed corpus-background error. +#[derive(Clone, Copy, Debug, Eq, PartialEq)] +#[non_exhaustive] +pub enum CorpusBackgroundError { + /// Corpus-background wording was treated as unique latent content. + CorpusBackgroundIsNotUniqueContent, + /// Corpus-background wording was treated as stopword deletion. + CorpusBackgroundIsNotStopwordDeletion, + /// A recovery slice was empty or length-mismatched. + InvalidCorpusBackgroundPayload, +} + +impl fmt::Display for CorpusBackgroundError { + fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { + let message = match self { + Self::CorpusBackgroundIsNotUniqueContent => { + "corpus-background wording is not unique latent content" + } + Self::CorpusBackgroundIsNotStopwordDeletion => { + "corpus-background wording is not stopword deletion" + } + Self::InvalidCorpusBackgroundPayload => "invalid corpus-background payload", + }; + formatter.write_str(message) + } +} + +impl std::error::Error for CorpusBackgroundError {} + +#[cfg(test)] +mod tests { + use super::CorpusBackgroundError; + + #[test] + fn error_messages_are_stable() { + for (error, message) in [ + ( + CorpusBackgroundError::CorpusBackgroundIsNotUniqueContent, + "corpus-background wording is not unique latent content", + ), + ( + CorpusBackgroundError::CorpusBackgroundIsNotStopwordDeletion, + "corpus-background wording is not stopword deletion", + ), + ( + CorpusBackgroundError::InvalidCorpusBackgroundPayload, + "invalid corpus-background payload", + ), + ] { + assert_eq!(error.to_string(), message); + } + } +} diff --git a/crates/corpus_background/src/kind.rs b/crates/corpus_background/src/kind.rs new file mode 100644 index 00000000..0b475864 --- /dev/null +++ b/crates/corpus_background/src/kind.rs @@ -0,0 +1,145 @@ +//! Corpus-background wording versus unique latent content. + +use crate::CorpusBackgroundError; + +/// Closed vocabulary of corpus-background token treatments. +#[derive(Clone, Copy, Debug, Eq, PartialEq)] +pub enum CorpusBackgroundKind { + /// Corpus-level background language, not unique document meaning. + CorpusBackground, + /// Token treatment reserved for unique latent content. + UniqueContent, +} + +impl CorpusBackgroundKind { + /// Return the stable wire kind name. + #[must_use] + pub const fn wire_name(self) -> &'static str { + match self { + Self::CorpusBackground => "corpus_background", + Self::UniqueContent => "unique_content", + } + } + + /// Parse a stable wire kind name. + /// + /// # Errors + /// + /// Returns [`CorpusBackgroundError::InvalidCorpusBackgroundPayload`] for + /// unrecognized names. + pub fn from_wire_name(name: &str) -> Result { + match name { + "corpus_background" => Ok(Self::CorpusBackground), + "unique_content" => Ok(Self::UniqueContent), + _ => Err(CorpusBackgroundError::InvalidCorpusBackgroundPayload), + } + } +} + +/// Refuse to treat corpus-background wording as unique latent content. +/// +/// # Errors +/// +/// Returns [`CorpusBackgroundError::CorpusBackgroundIsNotUniqueContent`] when +/// `kind` is [`CorpusBackgroundKind::CorpusBackground`]. +pub fn refuse_corpus_background_as_unique_content( + kind: CorpusBackgroundKind, +) -> Result<(), CorpusBackgroundError> { + match kind { + CorpusBackgroundKind::CorpusBackground => { + Err(CorpusBackgroundError::CorpusBackgroundIsNotUniqueContent) + } + CorpusBackgroundKind::UniqueContent => Ok(()), + } +} + +/// Refuse to treat corpus-background wording as stopword deletion. +/// +/// # Errors +/// +/// Returns [`CorpusBackgroundError::CorpusBackgroundIsNotStopwordDeletion`] +/// when `kind` is [`CorpusBackgroundKind::CorpusBackground`]. +pub fn refuse_corpus_background_as_stopword_deletion( + kind: CorpusBackgroundKind, +) -> Result<(), CorpusBackgroundError> { + match kind { + CorpusBackgroundKind::CorpusBackground => { + Err(CorpusBackgroundError::CorpusBackgroundIsNotStopwordDeletion) + } + CorpusBackgroundKind::UniqueContent => Ok(()), + } +} + +/// Fraction of recovered corpus-background kinds that match known truth. +/// +/// # Errors +/// +/// Returns [`CorpusBackgroundError::InvalidCorpusBackgroundPayload`] when +/// either slice is empty or the lengths differ. +pub fn identity_recovery_rate( + truth: &[CorpusBackgroundKind], + decided: &[CorpusBackgroundKind], +) -> Result { + if truth.is_empty() || truth.len() != decided.len() { + return Err(CorpusBackgroundError::InvalidCorpusBackgroundPayload); + } + let mut matches = 0_u32; + for (truth_kind, decided_kind) in truth.iter().zip(decided) { + if truth_kind == decided_kind { + matches += 1; + } + } + Ok(f64::from(matches) / truth.len() as f64) +} + +#[cfg(test)] +mod tests { + use super::{ + CorpusBackgroundKind, identity_recovery_rate, + refuse_corpus_background_as_stopword_deletion, refuse_corpus_background_as_unique_content, + }; + use crate::CorpusBackgroundError; + + #[test] + fn local_branches_cover_kinds_payloads_and_wire_names() { + assert_eq!( + refuse_corpus_background_as_unique_content(CorpusBackgroundKind::CorpusBackground), + Err(CorpusBackgroundError::CorpusBackgroundIsNotUniqueContent) + ); + assert_eq!( + refuse_corpus_background_as_stopword_deletion(CorpusBackgroundKind::CorpusBackground), + Err(CorpusBackgroundError::CorpusBackgroundIsNotStopwordDeletion) + ); + refuse_corpus_background_as_unique_content(CorpusBackgroundKind::UniqueContent) + .expect("unique"); + refuse_corpus_background_as_stopword_deletion(CorpusBackgroundKind::UniqueContent) + .expect("unique"); + for kind in [ + CorpusBackgroundKind::CorpusBackground, + CorpusBackgroundKind::UniqueContent, + ] { + assert_eq!( + CorpusBackgroundKind::from_wire_name(kind.wire_name()).expect("round-trip"), + kind + ); + } + assert_eq!( + CorpusBackgroundKind::from_wire_name("stopword"), + Err(CorpusBackgroundError::InvalidCorpusBackgroundPayload) + ); + let matched = identity_recovery_rate( + &[CorpusBackgroundKind::CorpusBackground], + &[CorpusBackgroundKind::CorpusBackground], + ) + .expect("rate"); + assert!((matched - 1.0).abs() < f64::EPSILON); + assert_eq!( + identity_recovery_rate(&[], &[]), + Err(CorpusBackgroundError::InvalidCorpusBackgroundPayload) + ); + assert_eq!( + identity_recovery_rate(&[CorpusBackgroundKind::CorpusBackground], &[]), + Err(CorpusBackgroundError::InvalidCorpusBackgroundPayload) + ); + } +} diff --git a/crates/corpus_background/src/lib.rs b/crates/corpus_background/src/lib.rs new file mode 100644 index 00000000..a11a0df2 --- /dev/null +++ b/crates/corpus_background/src/lib.rs @@ -0,0 +1,22 @@ +#![forbid(unsafe_code)] +#![deny(missing_docs)] +#![allow(clippy::cast_precision_loss)] +//! Corpus-background wording is not unique latent content. +//! +//! Corpus-level background language stays explicit method/background +//! structure. It is not unique document meaning and is not erased by a +//! stopword list (ADR 0004/0012). + +mod error; +mod kind; + +/// Fail-closed corpus-background errors. +pub use error::CorpusBackgroundError; +/// Closed vocabulary of corpus-background token treatments. +pub use kind::CorpusBackgroundKind; +/// Fraction of recovered corpus-background kinds that match known truth. +pub use kind::identity_recovery_rate; +/// Refuse to treat corpus-background wording as stopword deletion. +pub use kind::refuse_corpus_background_as_stopword_deletion; +/// Refuse to treat corpus-background wording as unique latent content. +pub use kind::refuse_corpus_background_as_unique_content; diff --git a/crates/corpus_background/tests/corpus_background_contract.rs b/crates/corpus_background/tests/corpus_background_contract.rs new file mode 100644 index 00000000..9ce19975 --- /dev/null +++ b/crates/corpus_background/tests/corpus_background_contract.rs @@ -0,0 +1,72 @@ +//! Corpus-background wording is not unique content and not stopword deletion. + +use corpus_background::{ + CorpusBackgroundError, CorpusBackgroundKind, identity_recovery_rate, + refuse_corpus_background_as_stopword_deletion, refuse_corpus_background_as_unique_content, +}; + +#[test] +fn corpus_background_cannot_become_unique_content_or_stopword_deletion() { + assert_eq!( + refuse_corpus_background_as_unique_content(CorpusBackgroundKind::CorpusBackground), + Err(CorpusBackgroundError::CorpusBackgroundIsNotUniqueContent) + ); + assert_eq!( + refuse_corpus_background_as_stopword_deletion(CorpusBackgroundKind::CorpusBackground), + Err(CorpusBackgroundError::CorpusBackgroundIsNotStopwordDeletion) + ); + refuse_corpus_background_as_unique_content(CorpusBackgroundKind::UniqueContent) + .expect("unique"); + refuse_corpus_background_as_stopword_deletion(CorpusBackgroundKind::UniqueContent) + .expect("unique"); +} + +#[test] +fn recovered_kinds_match_known_truth_better_than_a_unique_content_collapse() { + let truth = [ + CorpusBackgroundKind::CorpusBackground, + CorpusBackgroundKind::UniqueContent, + CorpusBackgroundKind::CorpusBackground, + ]; + let recovered = truth; + let collapsed = [ + CorpusBackgroundKind::UniqueContent, + CorpusBackgroundKind::UniqueContent, + CorpusBackgroundKind::UniqueContent, + ]; + let recovered_rate = identity_recovery_rate(&truth, &recovered).expect("recovered"); + let collapsed_rate = identity_recovery_rate(&truth, &collapsed).expect("collapsed"); + let expected = { + let mut matches = 0_u32; + for (truth_kind, decided_kind) in truth.iter().zip(recovered.iter()) { + if truth_kind == decided_kind { + matches += 1; + } + } + f64::from(matches) / f64::from(u32::try_from(truth.len()).expect("len")) + }; + assert!((recovered_rate - expected).abs() < f64::EPSILON); + assert!(recovered_rate > collapsed_rate); +} + +#[test] +fn empty_or_mismatched_kind_payloads_fail_closed() { + assert_eq!( + identity_recovery_rate(&[], &[]), + Err(CorpusBackgroundError::InvalidCorpusBackgroundPayload) + ); + assert_eq!( + identity_recovery_rate(&[CorpusBackgroundKind::CorpusBackground], &[]), + Err(CorpusBackgroundError::InvalidCorpusBackgroundPayload) + ); + assert_eq!( + identity_recovery_rate( + &[ + CorpusBackgroundKind::CorpusBackground, + CorpusBackgroundKind::UniqueContent + ], + &[CorpusBackgroundKind::CorpusBackground] + ), + Err(CorpusBackgroundError::InvalidCorpusBackgroundPayload) + ); +} diff --git a/crates/corpus_background/tests/crate_contract.rs b/crates/corpus_background/tests/crate_contract.rs new file mode 100644 index 00000000..d5dda9ec --- /dev/null +++ b/crates/corpus_background/tests/crate_contract.rs @@ -0,0 +1,7 @@ +//! Integration contract for the `corpus_background` package identity. + +#[test] +fn package_identity_is_stable() { + let observed = std::hint::black_box(env!("CARGO_PKG_NAME")); + assert_eq!(observed, "corpus_background"); +} diff --git a/docs/TRACEABILITY.md b/docs/TRACEABILITY.md index 81ebb20f..1f3fac43 100644 --- a/docs/TRACEABILITY.md +++ b/docs/TRACEABILITY.md @@ -25,7 +25,7 @@ The full APA 7th standards/literature register remains `docs/research/standards- | TRSL-TM temporal/relational topic posterior and backend compatibility | ADR 0012; ADR 0004 | future `topic_measurement` | accepted-target | | global P0 topic identity with activity/dormancy/reactivation | ADR 0012 | future topic lineage/activity state | accepted-target | | no default stopword deletion / no TF-IDF-BM25 inferential weighting | ADR 0004/0012; PRD/TRD | future semantic/method-source model | accepted-target | -| report template/section/copied/style/modality method effects | ADR 0004/0012; PRD/TRD | simulation truth factors implemented; `modality_source` modality-versus-unique-content identity on the active PR; estimator-side method model remains future | partial | +| report template/section/copied/style/modality method effects | ADR 0004/0012; PRD/TRD | simulation truth factors implemented; `corpus_background` background-versus-unique-content identity on the active PR; estimator-side method model remains future | partial | | candidate K statistical/Pareto gates + blinded LLM review | ADR 0012; research | future `model_selection` | accepted-target | | compositional topic correlation / stable clustering | ADR 0005/0012; research | future `network_analysis` | accepted-target | | posterior ESEM / longitudinal invariance / DSEM | ADR 0005 | `psychometric_fit` ESEM loading and DSEM lag gates on the active PR; `psychometric_core` input gates remain #49; invariance/multilevel remain accepted-target | active-PR | diff --git a/docs/adr/0004-shared-multilingual-latent-space.md b/docs/adr/0004-shared-multilingual-latent-space.md index e6b070c7..00934224 100644 --- a/docs/adr/0004-shared-multilingual-latent-space.md +++ b/docs/adr/0004-shared-multilingual-latent-space.md @@ -1,6 +1,7 @@ # ADR 0004 — Shared multilingual latent semantic space **Decision status:** Accepted +**Implementation maturity:** accepted-target — corpus-background-versus-unique-content identity in `corpus_background` on the active PR; shared-space estimators remain accepted-target **Implementation maturity:** accepted-target — modality-versus-unique-content identity in `modality_source` on the active PR; shared-space estimators remain accepted-target **Implementation maturity:** accepted-target — copied-versus-unique-content identity in `copied_text` on the active PR; shared-space estimators remain accepted-target **Implementation maturity:** accepted-target — style-versus-unique-content identity in `style_source` on the active PR; shared-space estimators remain accepted-target diff --git a/docs/adr/0012-temporal-relational-shared-latent-topic-measurement.md b/docs/adr/0012-temporal-relational-shared-latent-topic-measurement.md index 47e673c9..d47d1f02 100644 --- a/docs/adr/0012-temporal-relational-shared-latent-topic-measurement.md +++ b/docs/adr/0012-temporal-relational-shared-latent-topic-measurement.md @@ -1,6 +1,7 @@ # ADR 0012 — Temporal Relational Shared-Latent Topic Measurement **Decision status:** Accepted +**Implementation maturity:** accepted-target — corpus-background-versus-unique-content identity in `corpus_background` on the active PR; estimator-side method model remains accepted-target **Implementation maturity:** accepted-target — modality-versus-unique-content identity in `modality_source` on the active PR; estimator-side method model remains accepted-target **Implementation maturity:** accepted-target — copied-versus-unique-content identity in `copied_text` on the active PR; estimator-side method model remains accepted-target **Implementation maturity:** accepted-target — style-versus-unique-content identity in `style_source` on the active PR; estimator-side method model remains accepted-target diff --git a/docs/adr/README.md b/docs/adr/README.md index 391763c4..75ccdd13 100644 --- a/docs/adr/README.md +++ b/docs/adr/README.md @@ -25,6 +25,7 @@ Read [`ADR_POLICY.md`](ADR_POLICY.md) first. **Decision status and implementatio | [0002](0002-six-clock-temporal-semantics.md) | Six-clock temporal semantics and fail-closed historical leakage prevention | Accepted | active-PR | Typed clocks/intervals are implemented-main; `document_clocks` refuses omitted assertion/document time on the active PR. Later graph/split enforcement remains target work. | | [0002](0002-six-clock-temporal-semantics.md) | Six-clock temporal semantics and fail-closed historical leakage prevention | Accepted | active-PR | Provenance-vs-transition gate in `citation_edge` on the active PR; remaining graph/split enforcement stays accepted-target. | | [0003](0003-relational-event-multiple-membership.md) | Relational event ontology and time-varying cross-classified multiple membership | Accepted | partial | Weighted time-varying membership network/roles are active-PR (PR #12); full multilevel estimators, graph ontology, and persistence remain accepted-target. ADR 0016 owns event-intelligence tasks. | +| [0004](0004-shared-multilingual-latent-space.md) | One shared multilingual latent space with explicit invariance status | Accepted | accepted-target | Corpus-background-versus-unique-content identity is `corpus_background` on the active PR; ADR 0012 owns the full topic-estimator contract. | | [0004](0004-shared-multilingual-latent-space.md) | One shared multilingual latent space with explicit invariance status | Accepted | accepted-target | Modality-versus-unique-content identity is `modality_source` on the active PR; ADR 0012 owns the full topic-estimator contract. | | [0004](0004-shared-multilingual-latent-space.md) | One shared multilingual latent space with explicit invariance status | Accepted | accepted-target | Copied-versus-unique-content identity is `copied_text` on the active PR; ADR 0012 owns the full topic-estimator contract. | | [0004](0004-shared-multilingual-latent-space.md) | One shared multilingual latent space with explicit invariance status | Accepted | accepted-target | Style-versus-unique-content identity is `style_source` on the active PR; ADR 0012 owns the full topic-estimator contract. | @@ -56,6 +57,7 @@ Read [`ADR_POLICY.md`](ADR_POLICY.md) first. **Decision status and implementatio | [0010](0010-adaptive-llm-orchestration.md) | Adaptive LLM orchestration and test-time compute | Accepted | partial | `tepp_api` router/ablation/orchestrator binding implemented-main; evidence-bounded `interpretation_gateway` is on the active PR; live NIM execution and production ablation evidence remain accepted-target. | | [0010](0010-adaptive-llm-orchestration.md) | Adaptive LLM orchestration and test-time compute | Accepted | partial | `tepp_api` router/ablation/orchestrator binding implemented-main; live NIM execution and production ablation evidence remain accepted-target. | | [0011](0011-standalone-modular-msa-boundary.md) | Standalone operation and modular CWL MSA boundary | Accepted | partial | Owns cross-service persistence/credential/API authority; no direct cross-service application-table coupling. | +| [0012](0012-temporal-relational-shared-latent-topic-measurement.md) | Temporal Relational Shared-Latent Topic Measurement (TRSL-TM) | Accepted | accepted-target | Corpus-background-versus-unique-content identity is `corpus_background` on the active PR; estimator-side method model, backend, and K gates remain accepted-target. | | [0012](0012-temporal-relational-shared-latent-topic-measurement.md) | Temporal Relational Shared-Latent Topic Measurement (TRSL-TM) | Accepted | accepted-target | Modality-versus-unique-content identity is `modality_source` on the active PR; estimator-side method model, backend, and K gates remain accepted-target. | | [0012](0012-temporal-relational-shared-latent-topic-measurement.md) | Temporal Relational Shared-Latent Topic Measurement (TRSL-TM) | Accepted | accepted-target | Copied-versus-unique-content identity is `copied_text` on the active PR; estimator-side method model, backend, and K gates remain accepted-target. | | [0012](0012-temporal-relational-shared-latent-topic-measurement.md) | Temporal Relational Shared-Latent Topic Measurement (TRSL-TM) | Accepted | accepted-target | Style-versus-unique-content identity is `style_source` on the active PR; estimator-side method model, backend, and K gates remain accepted-target. | diff --git a/docs/research/corpus-background-identity.md b/docs/research/corpus-background-identity.md new file mode 100644 index 00000000..78407995 --- /dev/null +++ b/docs/research/corpus-background-identity.md @@ -0,0 +1,34 @@ +# Corpus-background wording is not unique content (doctoring) + +## Scope + +`corpus_background` keeps corpus-level background language out of unique +latent content and out of global stopword deletion. Recovery is the +computed share of recovered kinds that match known truth. + +This slice does not persist method sources, allocate migration `0008`, +or replace `method_effects`, `section_source`, `style_source`, +`copied_text`, `modality_source`, `stopword_deletion`, or the in-flight +TF-IDF/BM25 inferential-weight refusal. + +## Authority + +### Normative TEPP contract + +- `docs/adr/0004-shared-multilingual-latent-space.md` and + `docs/adr/0012-temporal-relational-shared-latent-topic-measurement.md` + — template, section, copied-text, style, modality, and + corpus-background sources are modeled explicitly and are not + inferential topic weights or stopword deletions. + +### Supporting literature + +Chemudugunta, Smyth, and Steyvers (2007) separate a shared background +word distribution from document-specific topical content. Background +mass is not unique latent meaning and is not deleted by a stopword +list. + +Chemudugunta, C., Smyth, P., & Steyvers, M. (2007). Modeling general +and specific aspects of documents with a probabilistic topic model. In +B. Schölkopf, J. Platt, & T. Hoffman (Eds.), *Advances in Neural +Information Processing Systems 19* (pp. 241–248). MIT Press. diff --git a/docs/research/standards-and-literature.md b/docs/research/standards-and-literature.md index 1ce32552..ae0dfcec 100644 --- a/docs/research/standards-and-literature.md +++ b/docs/research/standards-and-literature.md @@ -32,13 +32,13 @@ Roberts, M. E., Stewart, B. M., & Tingley, D. (2019). stm: An R package for stru Roberts, M. E., Stewart, B. M., Tingley, D., Lucas, C., Leder-Luis, J., Gadarian, S. K., Albertson, B., & Rand, D. G. (2014). Structural topic models for open-ended survey responses. *American Journal of Political Science, 58*(4), 1064–1082. https://doi.org/10.1111/ajps.12103 -Bateman, J. A. (2008). *Multimodality and genre: A foundation for the systematic analysis of multimodal documents*. Palgrave Macmillan. +Chemudugunta, C., Smyth, P., & Steyvers, M. (2007). Modeling general and specific aspects of documents with a probabilistic topic model. In B. Schölkopf, J. Platt, & T. Hoffman (Eds.), *Advances in Neural Information Processing Systems 19* (pp. 241–248). MIT Press. Bianchi, F., Terragni, S., Hovy, D., Nozza, D., & Fersini, E. (2021). Cross-lingual contextualized topic models with zero-shot learning. In *Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics* (pp. 1676–1683). Association for Computational Linguistics. https://doi.org/10.18653/v1/2021.eacl-main.143 Nguyen, T. P., Minh, N. V., Nguyen, T., Van, L. N., Nguyen, D. A., Sang, D. V., & Le, T. (2025). XTRA: Cross-lingual topic modeling with topic and representation alignments. In *Findings of the Association for Computational Linguistics: EMNLP 2025*. Association for Computational Linguistics. -TEPP retains a logistic-normal CPU reference while allowing adapter backends that satisfy shared-latent, posterior, temporal, relational, and measurement-invariance contracts. Non-lexical modality is modeled as explicit structure, not unique latent content and not a stopword deletion (Bateman, 2008). +TEPP retains a logistic-normal CPU reference while allowing adapter backends that satisfy shared-latent, posterior, temporal, relational, and measurement-invariance contracts. Corpus-background wording is modeled as explicit structure, not unique latent content and not a stopword deletion (Chemudugunta et al., 2007). ## Topic-model evaluation and LLM judges diff --git a/docs/validation/temporal-event-foundation.md b/docs/validation/temporal-event-foundation.md index 0a338abb..b397358e 100644 --- a/docs/validation/temporal-event-foundation.md +++ b/docs/validation/temporal-event-foundation.md @@ -36,6 +36,7 @@ This report tracks exact-head scientific and engineering evidence required befor | Mention-confidence Brier score | `event_core` | active-PR | calibration vs binary truth | perfect 0 / half 0.25 RMSE | ADR 0003; `docs/research/mention-confidence-brier.md` | | Checkpoint is not the estimator | `checkpoint_authority` | accepted-target | active PR | refuse checkpoint-as-estimator + unvalidated artifact + recovery vs estimator collapse | ADR 0001/0014 | | Versioned API/export contracts | `tepp_api` | implemented-main | naruon HTTP interchange | unknown-field/version/limit + naruon HTTPS interchange tests | Task 12 / PR #21; live HTTP service remaining | +| Corpus-background-versus-unique-content identity | `corpus_background` | accepted-target | active PR | refuse background-as-unique/stopword + recovery vs unique-content collapse | ADR 0004/0012 | | Modality-versus-unique-content identity | `modality_source` | accepted-target | active PR | refuse modality-as-unique/stopword + recovery vs unique-content collapse | ADR 0004/0012 | | Copied-versus-unique-content identity | `copied_text` | accepted-target | active PR | refuse copied-text-as-unique/stopword + recovery vs unique-content collapse | ADR 0004/0012 | | Style-versus-unique-content identity | `style_source` | accepted-target | active PR | refuse style-as-unique/stopword + recovery vs unique-content collapse | ADR 0004/0012 | diff --git a/scripts/check_workspace_contract.py b/scripts/check_workspace_contract.py index 6c601158..e3139024 100644 --- a/scripts/check_workspace_contract.py +++ b/scripts/check_workspace_contract.py @@ -23,6 +23,7 @@ "tepp_simulation", "validation_core", "tepp_api", + "corpus_background", "modality_source", "copied_text", "style_source",