A relation says whether it happens or holds - #593
Merged
Conversation
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <wayland0916@gmail.com>
This was referenced Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
实现 0007 的一处补漏,状态行已更新;不动 0031,是让它真正落到语料长出来的关系上。
问题
冷启动按票数建关系时,
temporal写死state,注释给的理由是「它只在 functional 为真时驱动时态引擎,而这条路永不自动设那一位,所以没有行为后果」。这个理由在 0031(#486)之后已经不成立:Validity::under现在按谓词的 temporal 规整每一次写入,读出侧world_axis也按它折算。于是语料自己长出来的每一个关系都是状态:时间轴上读出来就是这样。而它是发生过的一件事。实测一个库里 43 个关系全是
state,一个event都没有——这条线画着(0031),没人往里填。改法
答案本来就在手边。提案那一步问模型要的 JSON 里早就有
"temporal":"state|event|eternal",冷启动拿着同一份提案建类、建属性、做 map_to,唯独关系这一档把它丢了。现在按 key 查,再按同组 forms 查(计数取的规范 key 是组里事实最多的说法,模型提案挑的未必是同一个)。采纳与否仍只由票数决定(0007 的原则不变),模型只回答「这个关系是哪一种」——那是计数答不了的意义问题,跟
fold_by_meaning保留模型的理由一样。查不到、或模型编了第四个值,一律
state。三者里它最保守:不会像event那样把valid_to收成一个点——错判成 event 比错判成 state 贵。端到端
隔离库、不种任何谓词、六篇语料冷启动:
两条设计说明
采纳不重规整时间。 这两条事实写入时谓词还不存在,
valid_to存的是 NULL;采纳只补predicate_id。读出侧world_axis是读时查谓词的 temporal:0022/0031 把「读形状」收在 world_axis 一处,写侧再加一个规整就是第二个解释者,还要原地改账本行。不加。
已有库不用迁。同一条读时查的性质意味着:在本体页把
invested从 state 改成 event,它已有的每一行立刻按点读。明确没做的(下一刀)
'state'(create_relation_types_bulk)。OWL 里没有这个信息,1521 个 schema.org 属性无从判;这是包作为冷启动(0008)时最大的一块,要么让模型在导入时分一遍,要么在本体页批量改。[event]标记告诉模型只写一个日期(0031 已有)。测试
proposed_temporal的单测钉住:按 key、按 forms、大小写、不认识的值回落 state、空提案回落 state。fmt / clippy / 232 个单测全绿。🤖 Generated with Claude Code