1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
//! Analysis configuration. See `docs/architecture.md`.
use Arc;
use Serialize;
use crateFragmentCorpus;
/// Scoring profile. Only `GeneralOrganic` is implemented — AGENTS.md §12
/// explicitly forbids publishing unimplemented profiles as dummies, so no
/// `MedicinalChemistry`/`Custom` placeholder variants exist yet.
/// How aggressively borderline molecules are pushed toward abstention
/// (`Verdict::Indeterminate`/`Verdict::OutOfDomain`). Affects the
/// applicability component's confidence-penalty weighting.
/// Fragment model configuration (AGENTS.md §12's `fragment_model` field).
/// `corpus: None` (the default) disables the `fragment_precedent`
/// component entirely — `SynthesizabilityReport.fragment_precedent` stays
/// `None` (round 21 moved this field out of `ComponentScores`, since the
/// signal no longer contributes to `overall.difficulty` — see `rules.rs`'s
/// "Fragment precedent" section), the same default-off behavior as every
/// v0.1 release. No corpus ships with yomitoki itself (AGENTS.md §5.4
/// forbids embedding one directly in the library); load one with
/// [`FragmentCorpus::load_dir`] and attach it here to enable the component.
///
/// Named `FragmentModelConfig`/`fragment_model`, not
/// `FragmentPrecedentConfig`/`fragment_precedent` (considered and rejected
/// in round 18, alongside the `fragment_rarity` -> `fragment_precedent`
/// rename elsewhere in this crate): this type is already the generic
/// "config for whatever fragment-level model is configured," not tied to
/// the precedent-scoring approach specifically — it currently holds
/// exactly one thing (a `FragmentCorpus`), but the name deliberately
/// leaves room for a future fragment-level model that isn't
/// precedent-based without implying a mismatch the way a
/// precedent-specific name would.
///
/// `Serialize` is hand-implemented (not derived) so `AnalysisConfig`'s
/// `config_hash` reflects *which* corpus is configured (via
/// `FragmentCorpus::version`) without serializing the corpus's full
/// fragment table on every hash computation — a loaded corpus can be
/// several megabytes; its identity, not its content, is what needs to be
/// distinguishable across configs.
/// Analysis configuration. `#[non_exhaustive]` so new fields (e.g.
/// `abstention_policy` from AGENTS.md §12's full sketch) can be added later
/// without breaking existing callers — they're omitted for now rather than
/// included as inert placeholders, since nothing reads them yet.