World's first open-source enterprise world model.
Rust agent-memorybitemporalgraphragknowledge-baseknowledge-graphllmontologypgvectorpostgresqlragrustself-hostedsemantic-searchtemporal-knowledge-graphworld-model
Errata retracts on two votes and a flag, alignment shortlists its candidates, and each task thinks as hard as it needs (#906)
WaylandYangceaa7dfe87ab
diff --git a/crates/utopia-cli/src/main.rs b/crates/utopia-cli/src/main.rsindex dbb76c53..9f2f490c 100644--- a/crates/utopia-cli/src/main.rs+++ b/crates/utopia-cli/src/main.rs@@ -82,7 +82,7 @@ struct ManifestDataDir {/// not a side effect of a code change.// 是迁移文件的**个数**,不是最大的编号(守卫 `schema_version_policy_compares_against_current`// 按个数比):编号有空缺时两者不同——0071 由一个开放 PR 占着,0072 先落,个数是 71-const CURRENT_SCHEMA_VERSION: u32 = 77;+const CURRENT_SCHEMA_VERSION: u32 = 78;fn main() -> anyhow::Result<()> {dotenvy::dotenv().ok();diff --git a/crates/utopia-core/src/models.rs b/crates/utopia-core/src/models.rsindex 59c2d371..49f1b351 100644--- a/crates/utopia-core/src/models.rs+++ b/crates/utopia-core/src/models.rs@@ -466,6 +466,9 @@ pub struct LlmSettings {#[serde(skip_serializing)]pub transcribe_api_key: Option<String>,pub transcribe_model: Option<String>,+ /// 对话模型的推理强度(OpenAI 兼容口的 `reasoning_effort`):minimal | low | medium | high;+ /// 空 = 不带字段。照原文写 JSON 的任务用 minimal,思考 token 归零、答案不变+ pub chat_reasoning_effort: Option<String>,}impl LlmSettings {diff --git a/crates/utopia-extract/src/errata.rs b/crates/utopia-extract/src/errata.rsindex e3fc11cb..2667602d 100644--- a/crates/utopia-extract/src/errata.rs+++ b/crates/utopia-extract/src/errata.rs@@ -97,7 +97,11 @@ pub fn build_errata_messages(.map(property_line).collect::<Vec<_>>().join("\n");- let list = facts.iter().map(fact_line).collect::<Vec<_>>().join("\n");+ let mut list = facts.iter().map(fact_line).collect::<Vec<_>>().join("\n");+ if list.is_empty() {+ // 没有类型化事实的文档也送去看:清单为空,agent 只能加+ list.push_str("(none yet: add what the document states plainly)");+ }vec![ChatMessage {role: "system".into(),@@ -243,6 +247,58 @@ pub fn parse_errata_response(Ok(out)}+/// 第二票(撤改要两票):agent 说撤或改的那几条再问一遍,只问「文档说了没有」。+/// 第一票带着整份清单和结构的理由,容易顺着理由撤掉原文其实说了的事;第二票只看事实与原文+pub const CONFIRM_SYSTEM: &str = "You check facts against ONE document. For each numbered fact answer whether the document states it, \+in its own words or in other words with the same meaning. Answer stated when the document supports the fact even if a name is \+abbreviated or the wording differs; answer not_stated only when the document does not say it or says otherwise. \+Judge only from the document. Answer with JSON only: {\"c\":[[id,\"stated\"|\"not_stated\"]]}";++pub fn build_confirm_messages(document: &str, facts: &[ErrataFact<'_>]) -> Vec<ChatMessage> {+ let list = facts+ .iter()+ .map(|f| format!("{}: {} —{}→ {}", f.id, f.subject, f.property, f.object))+ .collect::<Vec<_>>()+ .join("\n");+ vec![+ ChatMessage {+ role: "system".into(),+ content: CONFIRM_SYSTEM.to_string(),+ },+ ChatMessage {+ role: "user".into(),+ content: format!("DOCUMENT:\n{document}\n\nFACTS:\n{list}"),+ },+ ]+}++/// 第二票的回复:哪些 id 被判 not_stated。没答到的、答成别的都不算票——撤要两票齐,缺一票就留着+pub fn parse_confirm_response(+ raw: &str,+ ids: &[i64],+) -> Result<std::collections::HashSet<i64>, String> {+ let v: serde_json::Value =+ serde_json::from_str(extract_json(raw)).map_err(|e| e.to_string())?;+ let rows = v+ .get("c")+ .and_then(|x| x.as_array())+ .ok_or_else(|| "no \"c\" array".to_string())?;+ let mut not_stated = std::collections::HashSet::new();+ for row in rows {+ let Some(arr) = row.as_array() else { continue };+ let (Some(id), Some(verdict)) = (+ arr.first().and_then(|x| x.as_i64()),+ arr.get(1).and_then(|x| x.as_str()),+ ) else {+ continue;+ };+ if ids.contains(&id) && verdict == "not_stated" {+ not_stated.insert(id);+ }+ }+ Ok(not_stated)+}+fn extract_json(raw: &str) -> &str {match (raw.find('{'), raw.rfind('}')) {(Some(a), Some(b)) if b > a => &raw[a..=b],@@ -343,6 +399,24 @@ mod tests {assert_eq!(r.malformed, 1);}+ #[test]+ fn the_second_vote_only_counts_an_explicit_not_stated() {+ let m = build_confirm_messages("Acme is based in London.", &facts()[..1]);+ assert!(m[1].content.contains("0: Acme —based_in→ Paris"));+ let ids = [0, 1];+ let r = parse_confirm_response(+ r#"{"c":[[0,"not_stated"],[1,"stated"],[7,"not_stated"],[2]]}"#,+ &ids,+ )+ .unwrap();+ assert!(r.contains(&0) && !r.contains(&1) && !r.contains(&7));+ // 没答到的不算票+ assert!(parse_confirm_response(r#"{"c":[]}"#, &ids)+ .unwrap()+ .is_empty());+ assert!(parse_confirm_response("nope", &ids).is_err());+ }+#[test]fn no_array_is_an_error_not_an_empty_answer() {assert!(parse_errata_response("{}", &facts()).is_err());diff --git a/crates/utopia-extract/src/implication.rs b/crates/utopia-extract/src/implication.rsindex d0c487a9..f624c692 100644--- a/crates/utopia-extract/src/implication.rs+++ b/crates/utopia-extract/src/implication.rs@@ -61,7 +61,22 @@ fn readings_text(readings: &[(&str, &str)]) -> String {}pub fn build_rule_messages(items: &[RuleItem<'_>], readings: &[(&str, &str)]) -> Vec<ChatMessage> {+ // 候选表一批只写一遍,各项只列键(与 `phrase_align::build_phrase_messages` 同一条理由:+ // 每项带整张表时一次请求五万多 token)+ let mut glossary: Vec<String> = Vec::new();+ let mut seen = std::collections::HashSet::new();+ for c in items.iter().flat_map(|i| i.candidates.iter()) {+ if seen.insert(c.key.trim()) {+ glossary.push(candidate_line(&PropertyCandidate {+ via: Vec::new(),+ ..c.clone()+ }));+ }+ }let mut user = String::new();+ if !glossary.is_empty() {+ user.push_str(&format!("Properties:\n{}\n\n", glossary.join("\n")));+ }for item in items {let shape = if item.trigger == "kind_word" {format!("kind word \"{}\"", item.phrase)@@ -92,8 +107,8 @@ pub fn build_rule_messages(items: &[RuleItem<'_>], readings: &[(&str, &str)]) ->let candidates = if item.candidates.is_empty() {" (none)".to_string()} else {- let lines: Vec<String> = item.candidates.iter().map(candidate_line).collect();- format!("\n{}", lines.join("\n"))+ let keys: Vec<&str> = item.candidates.iter().map(|c| c.key.trim()).collect();+ format!(" {}", keys.join(", "))};user.push_str(&format!("Item {}: {shape}{bound}\nExamples:{examples}\nCandidates:{candidates}\n\n",@@ -141,8 +156,9 @@ pub fn parse_rule_response(let reading = arr.get(2).and_then(|x| x.as_str());let implies = match key {None => None,- Some(k) => {- if !item.candidates.iter().any(|c| c.key == k) || item.bound_to == Some(k) {+ Some(written) => {+ let k = resolve_key(item, written)?;+ if item.bound_to == Some(k) {return None;}if let Some(r) = reading {@@ -281,6 +297,30 @@ pub fn parse_reading_response(}/// 回复里可能裹着 ```json 围栏或前后的话:取第一个 { 到最后一个 }+/// 模型写的键:候选里的键(大小写不论),或唯一对上的标签——键是 `p569` 这种代号时模型+/// 常答标签(与 `phrase_align::candidate_key` 同一条理由)+fn resolve_key<'a>(item: &RuleItem<'a>, written: &str) -> Option<&'a str> {+ let written = written.trim();+ if let Some(c) = item.candidates.iter().find(|c| c.key.trim() == written) {+ return Some(c.key);+ }+ let lower = written.to_lowercase();+ let mut by_key = item+ .candidates+ .iter()+ .filter(|c| c.key.trim().to_lowercase() == lower);+ if let Some(c) = by_key.next() {+ return by_key.next().is_none().then_some(c.key);+ }+ let folded = crate::phrase_align::fold(written);+ let mut by_label = item+ .candidates+ .iter()+ .filter(|c| crate::phrase_align::fold(c.label) == folded);+ let c = by_label.next()?;+ by_label.next().is_none().then_some(c.key)+}+fn extract_json(raw: &str) -> &str {match (raw.find('{'), raw.rfind('}')) {(Some(a), Some(b)) if b > a => &raw[a..=b],diff --git a/crates/utopia-extract/src/phrase_align.rs b/crates/utopia-extract/src/phrase_align.rsindex 4c9a40e8..9cfd17c3 100644--- a/crates/utopia-extract/src/phrase_align.rs+++ b/crates/utopia-extract/src/phrase_align.rs@@ -62,6 +62,9 @@ pub struct PhraseItem<'a> {pub examples: &'a [String],pub quotes: &'a [String],pub candidates: Vec<PropertyCandidate<'a>>,+ /// 结构上也对得上、但没进短名单的键:模型在批里的属性表里看见了它、选了它,照样算票——+ /// 短名单是省 token 的手段,不是限制+ pub also_allowed: Vec<&'a str>,}/// 模型对一条签名的裁决:Some = (候选的键, 方向);None = 不绑@@ -92,11 +95,12 @@ You bind the relation phrases documents use to the properties of a knowledge basEach numbered item is one signature: a phrase as the documents wrote it, the class of the thing \it is said of (its subject) and the class of what it points at (its object), or \"value\" when \the object is a figure, a title or a status; a few statements with that signature, each with the \-sentence it was taken from; and the candidate properties, each with its key, its label, its \-definition, its kind (a relation between two things, or an attribute whose object is a value), \-its domain and its range. A class written as \"?\" means the documents' kind word for that side \-is bound to no class yet. A candidate marked \"fits by inheritance\" declares its domain or range on \-an ancestor of the item's class; that is a fit, not a mismatch.\n\+sentence it was taken from; and the keys of its candidate properties. The properties themselves \+are listed once under \"Properties\", each with its key, its label, its kind (a relation between two \+things, or an attribute whose object is a value), its domain, its range and its definition. A class \+written as \"?\" means the documents' kind word for that side is bound to no class yet. A candidate \+key marked \"fits by inheritance\" declares its domain or range on an ancestor of the item's class; \+that is a fit, not a mismatch.\n\For each item, answer with the key of the one property that every statement of this signature \states by that property's definition, and the direction: \"forward\" when the statement's \subject is the property's subject, \"reverse\" when the statement's object is; or null.\n\@@ -137,8 +141,24 @@ pub fn candidate_line(c: &PropertyCandidate<'_>) -> String {}/// 构造两条消息:常量系统消息 + 逐项的用户消息。每项:id、短语、两端的类、例句与引文、候选。+/// 候选属性表在一批里只写一遍(Properties),每项只列它的候选键;从前每项都带整张表+/// (最多 60 条、各带定义),12 项一批就是三万多 token,一轮跑下来对齐占了八成的用量+/// (bench README,2026-09-24)。「按继承对上」是项与候选之间的事,写在项的键后面pub fn build_phrase_messages(items: &[PhraseItem<'_>]) -> Vec<ChatMessage> {+ let mut glossary: Vec<String> = Vec::new();+ let mut seen = std::collections::HashSet::new();+ for c in items.iter().flat_map(|i| i.candidates.iter()) {+ if seen.insert(c.key.trim()) {+ glossary.push(candidate_line(&PropertyCandidate {+ via: Vec::new(),+ ..c.clone()+ }));+ }+ }let mut user = String::new();+ if !glossary.is_empty() {+ user.push_str(&format!("Properties:\n{}\n\n", glossary.join("\n")));+ }for item in items {let object = if item.object_is_value {"value".to_string()@@ -156,8 +176,18 @@ pub fn build_phrase_messages(items: &[PhraseItem<'_>]) -> Vec<ChatMessage> {let candidates = if item.candidates.is_empty() {" (none)".to_string()} else {- let lines: Vec<String> = item.candidates.iter().map(candidate_line).collect();- format!("\n{}", lines.join("\n"))+ let keys: Vec<String> = item+ .candidates+ .iter()+ .map(|c| {+ if c.via.is_empty() {+ c.key.to_string()+ } else {+ format!("{} (fits by inheritance: {})", c.key, c.via.join("; "))+ }+ })+ .collect();+ format!(" {}", keys.join(", "))};user.push_str(&format!("Item {}: phrase \"{}\" · subject class: {} · object: {} · {} statements\nStatements:{examples}\nCandidates:{candidates}\n\n",@@ -321,14 +351,38 @@ fn candidate_key(item: &PhraseItem<'_>, written: &str) -> Option<String> {if written.is_empty() {return None;}- let keys = || item.candidates.iter().map(|c| c.key.trim());+ let keys = || {+ item.candidates+ .iter()+ .map(|c| c.key.trim())+ .chain(item.also_allowed.iter().map(|k| k.trim()))+ };if let Some(exact) = keys().find(|k| *k == written) {return Some(exact.to_string());}let lower = written.to_lowercase();let mut hits = keys().filter(|k| k.to_lowercase() == lower);- let first = hits.next()?;- hits.next().is_none().then(|| first.to_string())+ if let Some(first) = hits.next() {+ return hits.next().is_none().then(|| first.to_string());+ }+ // 键是 `p569` 这种代号时模型十有八九答标签("dateOfBirth"):第一次真跑里一半的签名+ // 因此判成坏票(bench README,2026-09-24)。标签唯一对上就认它的键;对上两个不认+ let folded = fold(written);+ let mut by_label = item+ .candidates+ .iter()+ .filter(|c| fold(c.label) == folded)+ .map(|c| c.key.trim());+ let first = by_label.next()?;+ by_label.next().is_none().then(|| first.to_string())+}++/// 标签比较用的折叠:大小写、空格、下划线、连字符都不算+pub fn fold(s: &str) -> String {+ s.chars()+ .filter(|c| !c.is_whitespace() && *c != '_' && *c != '-')+ .flat_map(char::to_lowercase)+ .collect()}#[cfg(test)]@@ -385,12 +439,26 @@ mod tests {examples: &examples,quotes: "es,candidates: candidates(),+ also_allowed: vec![],}];let msgs = build_phrase_messages(&items);let user = &msgs[1].content;assert!(user.contains("Item 3: phrase \"is based in\" · subject class: organization · object: ? · 4 statements"), "{user}");assert!(user.contains("· Harbor Bakery —is based in→ Port Ellen\n \"Harbor Bakery is based in Port Ellen.\""), "{user}");assert!(user.contains("- headquartered_in · headquartered in · relation · domain: organization · range: place · The organization's"), "{user}");+ assert!(+ user.starts_with("Properties:\n- "),+ "the glossary comes first, once: {user}"+ );+ assert!(+ user.contains("Candidates: headquartered_in"),+ "items list keys only: {user}"+ );+ assert_eq!(+ user.matches("- headquartered_in ·").count(),+ 1,+ "each property is described once: {user}"+ );assert!(user.contains("- revenue · revenue · attribute · domain: organization · Total income"),"{user}"@@ -400,6 +468,60 @@ mod tests {.contains("every statement of this signature"));}+ #[test]+ fn a_key_the_shortlist_hid_still_counts_when_it_fits_structurally() {+ let examples = strings(&[]);+ let quotes = strings(&[]);+ let items = vec![PhraseItem {+ id: 0,+ phrase: "is based in",+ subject_class: Some("organization"),+ object_class: None,+ object_is_value: false,+ statement_count: 1,+ examples: &examples,+ quotes: "es,+ candidates: candidates(),+ also_allowed: vec!["located_in"],+ }];+ let (choices, malformed) =+ parse_phrase_response(r#"{"b":[[0,"located_in","forward"]]}"#, &items).unwrap();+ assert_eq!(malformed, 0);+ assert_eq!(+ choices[0].property.as_ref().map(|(k, _)| k.as_str()),+ Some("located_in")+ );+ let (_, malformed) =+ parse_phrase_response(r#"{"b":[[0,"made_up","forward"]]}"#, &items).unwrap();+ assert_eq!(malformed, 1, "a key that fits nowhere is still malformed");+ }++ #[test]+ fn a_label_answer_maps_to_its_key_when_unique() {+ let examples = strings(&[]);+ let quotes = strings(&[]);+ let items = vec![PhraseItem {+ id: 0,+ phrase: "is based in",+ subject_class: Some("organization"),+ object_class: None,+ object_is_value: false,+ statement_count: 1,+ examples: &examples,+ quotes: "es,+ candidates: candidates(),+ also_allowed: vec![],+ }];+ let (choices, malformed) =+ parse_phrase_response(r#"{"b":[[0,"Headquartered In","forward"]]}"#, &items).unwrap();+ assert_eq!(malformed, 0, "a label, folded, names the key");+ assert_eq!(+ choices[0].property.as_ref().map(|(k, _)| k.as_str()),+ Some("headquartered_in")+ );+ assert_eq!(fold("Date of Birth"), "dateofbirth");+ }+#[test]fn a_value_signature_says_value_for_its_object() {let examples = strings(&["Harbor Bakery —revenue→ $2 million"]);@@ -414,6 +536,7 @@ mod tests {examples: &examples,quotes: "es,candidates: candidates(),+ also_allowed: vec![],}];let user = &build_phrase_messages(&items)[1].content;assert!(user.contains("· object: value ·"), "{user}");@@ -434,6 +557,7 @@ mod tests {examples: &examples,quotes: "es,candidates: candidates(),+ also_allowed: vec![],};let items = vec![mk(0, "owns"),@@ -480,6 +604,7 @@ mod tests {examples: &examples,quotes: "es,candidates: candidates(),+ also_allowed: vec![],},PhraseItem {id: 1,@@ -491,6 +616,7 @@ mod tests {examples: &examples,quotes: "es,candidates: candidates(),+ also_allowed: vec![],},];let raw = r#"{"b": [[0, "revenue", "forward"], [1, "subsid"#;@@ -511,6 +637,7 @@ mod tests {examples,quotes,candidates: candidates(),+ also_allowed: vec![],};vec![mk(0, "owns", false),diff --git a/crates/utopia-llm/src/lib.rs b/crates/utopia-llm/src/lib.rsindex e1bf5696..f57f50f4 100644--- a/crates/utopia-llm/src/lib.rs+++ b/crates/utopia-llm/src/lib.rs@@ -327,6 +327,8 @@ pub struct LlmClient {base_url: String,api_key: Option<String>,pub model: String,+ /// OpenAI 兼容口的 `reasoning_effort`;设了就带进每个对话请求体+ reasoning_effort: Option<String>,}/// 建连多久算失败。@@ -396,6 +398,20 @@ impl LlmClient {Self::with_timeouts(base_url, api_key, model, CONNECT_TIMEOUT, READ_TIMEOUT)}+ /// 推理强度(`reasoning_effort`)。推理模型默认边想边答,抽取一次调用出的 token 九成是+ /// 思考;minimal 把它归零而答案不变(bench README,2026-09-24)。空 = 不带字段+ pub fn with_reasoning_effort(mut self, effort: Option<String>) -> Self {+ self.reasoning_effort = effort.filter(|e| !e.trim().is_empty());+ self+ }++ fn with_effort(&self, mut body: serde_json::Value) -> serde_json::Value {+ if let Some(e) = &self.reasoning_effort {+ body["reasoning_effort"] = json!(e);+ }+ body+ }+/// 超时可注入,只为**测得动**——生产走 [`LlmClient::new`]。/// 拿 300 秒去测一次挂死要跑 5 分钟,那样的测试没人会留着。pub fn with_timeouts(@@ -419,6 +435,7 @@ impl LlmClient {base_url: base_url.trim_end_matches('/').to_string(),api_key: api_key.map(String::from),model: model.to_string(),+ reasoning_effort: None,}}@@ -442,7 +459,8 @@ impl LlmClient {messages: &[ChatMessage],temperature: Option<f32>,) -> anyhow::Result<String> {- let mut body = json!({ "model": self.model, "messages": messages, "stream": false });+ let mut body =+ self.with_effort(json!({ "model": self.model, "messages": messages, "stream": false }));if let Some(t) = temperature {body["temperature"] = json!(t);}@@ -482,7 +500,7 @@ impl LlmClient {messages: &[ChatMessage],temperature: Option<f32>,) -> anyhow::Result<Reply> {- let mut body = json!({+ let body = json!({"model": self.model,"messages": messages,"stream": true,@@ -492,6 +510,7 @@ impl LlmClient {// 上限归我们,不归端点的默认值([`MAX_COMPLETION_TOKENS`])"max_tokens": MAX_COMPLETION_TOKENS,});+ let mut body = self.with_effort(body);if let Some(t) = temperature {body["temperature"] = json!(t);}@@ -634,11 +653,11 @@ impl LlmClient {tool_choice: Option<&serde_json::Value>,stream: bool,) -> serde_json::Value {- let mut body = json!({+ let mut body = self.with_effort(json!({"model": self.model,"messages": messages,"stream": stream,- });+ }));if let Some(tools) = tools {body["tools"] = tools.clone();if let Some(choice) = tool_choice {@@ -830,12 +849,14 @@ impl LlmClient {&self,messages: &[serde_json::Value],) -> anyhow::Result<impl Stream<Item = anyhow::Result<String>> + Send + use<>> {- let resp = self- .request("/chat/completions")- .json(&json!({ "model": self.model, "messages": messages, "stream": true }))- .send()- .await- .map_err(Unreachable)?;+ let resp =+ self.request("/chat/completions")+ .json(&self.with_effort(+ json!({ "model": self.model, "messages": messages, "stream": true }),+ ))+ .send()+ .await+ .map_err(Unreachable)?;if !resp.status().is_success() {let status = resp.status();let retry_after = retry_after_of(resp.headers());@@ -1009,6 +1030,22 @@ fn says_out_of_credit(body: &serde_json::Value) -> bool {#[cfg(test)]mod tests {+ #[test]+ fn reasoning_effort_rides_in_every_chat_body_only_when_set() {+ let plain = LlmClient::new("http://x", None, "m");+ let body = plain.tools_body(&[], None, None, false);+ assert!(body.get("reasoning_effort").is_none());+ let eager =+ LlmClient::new("http://x", None, "m").with_reasoning_effort(Some("minimal".into()));+ let body = eager.tools_body(&[], None, None, true);+ assert_eq!(body["reasoning_effort"], "minimal");+ let blank = LlmClient::new("http://x", None, "m").with_reasoning_effort(Some(" ".into()));+ assert!(blank+ .tools_body(&[], None, None, false)+ .get("reasoning_effort")+ .is_none());+ }+use super::*;use tokio::io::AsyncWriteExt;diff --git a/crates/utopia-server/src/api/settings_routes.rs b/crates/utopia-server/src/api/settings_routes.rsindex d6822ec8..1a525b0c 100644--- a/crates/utopia-server/src/api/settings_routes.rs+++ b/crates/utopia-server/src/api/settings_routes.rs@@ -24,6 +24,7 @@ pub async fn get(Some(s) => json!({"chat_base_url": s.chat_base_url,"chat_model": s.chat_model,+ "chat_reasoning_effort": s.chat_reasoning_effort,"has_chat_key": s.chat_api_key.as_deref().is_some_and(|k| !k.is_empty()),"embed_base_url": s.embed_base_url,"embed_model": s.embed_model,@@ -45,6 +46,8 @@ pub struct PutSettingsReq {/// None 或空串 = 保留旧密钥pub chat_api_key: Option<String>,pub chat_model: Option<String>,+ /// minimal | low | medium | high;空 = 不带字段,端点按默认。缺席 = 不改+ pub chat_reasoning_effort: Option<String>,pub embed_base_url: Option<String>,pub embed_api_key: Option<String>,pub embed_model: Option<String>,@@ -76,6 +79,24 @@ pub async fn put(req.embed_dim,).await?;+ if let Some(effort) = &req.chat_reasoning_effort {+ let effort = nonempty(&Some(effort.clone()));+ if let Some(e) = effort.as_deref() {+ if !matches!(e, "minimal" | "low" | "medium" | "high") {+ return Err(utopia_core::AppError::invalid(+ "bad_reasoning_effort",+ "reasoning effort is one of minimal, low, medium, high, or empty",+ )+ .into());+ }+ }+ utopia_store::settings::set_chat_reasoning_effort(+ &state.pool,+ workspace_id,+ effort.as_deref(),+ )+ .await?;+ }// **配好嵌入模型的这一刻,就是本体索引能开工的最早时刻。**//// 注册时自动建的默认库会装上本体包,而那一刻还没有模型:`embed_ontology`diff --git a/crates/utopia-server/src/errata.rs b/crates/utopia-server/src/errata.rsindex 01dd689e..ac3d0bab 100644--- a/crates/utopia-server/src/errata.rs+++ b/crates/utopia-server/src/errata.rs@@ -10,7 +10,8 @@use std::collections::HashMap;use utopia_extract::errata::{- build_errata_messages, parse_errata_response, ErrataFact, ErrataProperty, Verdict,+ build_confirm_messages, build_errata_messages, parse_confirm_response, parse_errata_response,+ ErrataFact, ErrataProperty, Verdict,};use utopia_store::errata::{self, ActionInput, Candidate, Proposed};use uuid::Uuid;@@ -27,7 +28,7 @@ pub const FACTS_PER_DOCUMENT: usize = 40;pub const SAMPLE: usize = 10;/// 一次请求最多几条pub const FACTS_PER_REQUEST: usize = 20;-/// 一份文档最多问几次+/// 一份文档最多问几次(撤改的第二票另算,每批至多一次)pub const REQUESTS_PER_DOCUMENT: usize = 2;/// 正文最多带多少字;再长的文档截断,截掉的部分这一轮看不到pub const DOC_CHARS: usize = 16_000;@@ -134,7 +135,8 @@ pub async fn review_document(let all = errata::candidates(pool, kb_id, document_id).await?;let chosen = choose(&all);let mut outcome = DocumentOutcome::default();- if chosen.is_empty() {+ // 没有可看的行:第一次见这份文档就送一份空清单去(agent 只能加);看过的不再送+ if chosen.is_empty() && errata::runs_of(pool, document_id).await? > 0 {return Ok(outcome);}let flagged = chosen.iter().filter(|c| c.flag.is_some()).count();@@ -148,9 +150,21 @@ pub async fn review_document(.await?;let text = errata::document_text(pool, document_id).await?;let document = truncate(&text, DOC_CHARS);+ // 属性表按这份文档裁:整份本体每次都带是勘误一次请求 4.7k token 里的 4k(bench README,+ // 2026-09-24)。文档的向量取最近的几十条,再并上清单里事实已用的属性;没有向量就带全部+ let glossary = shortlist_glossary(state, settings, kb_id, document, glossary, &chosen).await;+ let glossary = &glossary[..];let (mut prompt_tokens, mut completion_tokens, mut saw_usage) = (0u64, 0u64, false);let mut error = None;- for batch in chosen.chunks(FACTS_PER_REQUEST).take(REQUESTS_PER_DOCUMENT) {+ let batches: Vec<&[Candidate]> = if chosen.is_empty() {+ vec![&chosen[..]]+ } else {+ chosen+ .chunks(FACTS_PER_REQUEST)+ .take(REQUESTS_PER_DOCUMENT)+ .collect()+ };+ for batch in batches {let items: Vec<ErrataFact<'_>> = batch.iter().enumerate()@@ -192,7 +206,52 @@ pub async fn review_document(tracing::info!(%kb_id, %document_id, malformed = parsed.malformed,additions_refused = parsed.additions_refused, "勘误回复里有坏项");}- for v in &parsed.verdicts {+ // 第二票:结构报了的、agent 要撤或改的,再问一遍文档说了没有;没拿到 not_stated 的+ // 改成 keep(没报的那些由库留给人,不用问)+ let mut verdicts = parsed.verdicts;+ let doubted: Vec<ErrataFact<'_>> = verdicts+ .iter()+ .filter(|v| v.verdict != Verdict::Keep)+ .filter_map(|v| usize::try_from(v.id).ok().and_then(|i| items.get(i)))+ .filter(|f| f.flag.is_some())+ .cloned()+ .collect();+ if !doubted.is_empty() {+ let ids: Vec<i64> = doubted.iter().map(|f| f.id).collect();+ let messages = build_confirm_messages(document, &doubted);+ outcome.requests += 1;+ let reply =+ match chat_retrying_rate_limits_at(state, settings, client, &messages, Some(0.0))+ .await+ {+ Ok(r) => r,+ Err(e) => {+ error = Some(e);+ break;+ }+ };+ if let Some(u) = reply.usage {+ saw_usage = true;+ prompt_tokens += u.prompt_tokens;+ completion_tokens += u.completion_tokens;+ }+ let not_stated = match parse_confirm_response(&reply.text, &ids) {+ Ok(x) => x,+ Err(e) => {+ error = Some(anyhow::anyhow!("errata second vote unreadable: {e}"));+ break;+ }+ };+ for v in verdicts.iter_mut() {+ if v.verdict != Verdict::Keep && ids.contains(&v.id) && !not_stated.contains(&v.id)+ {+ v.verdict = Verdict::Keep;+ v.reason = format!("second vote: stated ({})", v.reason);+ v.quote = None;+ }+ }+ }+ for v in &verdicts {let Some(c) = usize::try_from(v.id).ok().and_then(|i| batch.get(i)) else {continue;};@@ -259,6 +318,52 @@ pub async fn review_document(}}+/// 勘误一次请求带多少条属性(有向量时)+const GLOSSARY_NEAREST: i64 = 24;++/// 这份文档看得到的属性:向量最近的 [`GLOSSARY_NEAREST`] 条,加上清单里事实已经用的。+/// 没配嵌入模型、属性没向量、嵌入失败:全部+async fn shortlist_glossary<'a>(+ state: &AppState,+ settings: &utopia_core::models::LlmSettings,+ kb_id: Uuid,+ document: &str,+ all: &[ErrataProperty<'a>],+ chosen: &[Candidate],+) -> Vec<ErrataProperty<'a>> {+ let Some(client) = crate::llm_util::embed_client(settings) else {+ return all.to_vec();+ };+ let vector = {+ let _permit = crate::llm_util::acquire_embed(state, settings).await;+ match client.embed(&[document.to_string()]).await {+ Ok(mut v) if v.len() == 1 => v.remove(0),+ _ => return all.to_vec(),+ }+ };+ let near = match utopia_store::ontology::nearest_relation_types(+ &state.pool,+ kb_id,+ &vector,+ GLOSSARY_NEAREST,+ None,+ )+ .await+ {+ Ok(n) if !n.is_empty() => n,+ _ => return all.to_vec(),+ };+ let keep: std::collections::HashSet<&str> = near+ .iter()+ .map(|t| t.key.as_str())+ .chain(chosen.iter().map(|c| c.property.as_str()))+ .collect();+ all.iter()+ .filter(|p| keep.contains(p.key))+ .cloned()+ .collect()+}+/// keep 落地不算「动了图」;撤改加落地算fn count(o: &mut DocumentOutcome, status: &str, verdict: &Verdict) {match status {diff --git a/crates/utopia-server/src/errata_tests.rs b/crates/utopia-server/src/errata_tests.rsindex f8c78376..8cf598f4 100644--- a/crates/utopia-server/src/errata_tests.rs+++ b/crates/utopia-server/src/errata_tests.rs@@ -173,12 +173,16 @@ async fn the_agent_reviews_flagged_facts_first_and_each_verdict_is_a_recorded_ac[null,"add",{"subject":"Acme","property":"ceo","object":"Jane Roe"},"stated","Jane Roe runs Acme"],[null,"add",{"subject":"Acme","property":"ceo","object":"Jane Roe"},"made up","Jane Roe owns Acme"]]});- let Some(f) = Fx::new(vec![script]).await? else {+ // 第二票:Paris 那条结构报了,agent 要撤,再问一遍;答 not_stated 才撤+ let second = json!({"c":[[0,"not_stated"]]});+ let Some(f) = Fx::new(vec![script, second]).await? else {return Ok(());};let run = async {review(&f.state, f.kb).await?;let prompt = f.prompt_of(0);+ let confirm = f.prompt_of(1);+ assert!(confirm.contains("0: Acme —based_in→ Paris") && !confirm.contains("London (place)"), "{confirm}");assert!(prompt.contains("DOCUMENT:\nAcme is based in London. Jane Roe runs Acme."), "{prompt}");assert!(prompt.contains("0: Acme (organization) —based_in→ Paris (place) FLAG name_absent"), "{prompt}");assert!(prompt.contains("1: Acme (organization) —based_in→ London (place)"), "{prompt}");@@ -216,10 +220,10 @@ async fn the_agent_reviews_flagged_facts_first_and_each_verdict_is_a_recorded_ac.bind(f.kb).fetch_one(&f.pool).await?;- assert_eq!(run_row, (1, 1, 1, Some(123), Some(45), true));+ assert_eq!(run_row, (1, 1, 2, Some(246), Some(90), true), "two requests: the verdicts and the second vote");// 看完了:再跑不问模型(脚本空了,问了就 panic),也不排下一次review(&f.state, f.kb).await?;- assert_eq!(f.model.requests.lock().unwrap().len(), 1);+ assert_eq!(f.model.requests.lock().unwrap().len(), 2);let queued: i64 = sqlx::query_scalar("SELECT count(*) FROM jobs WHERE kind=$1 AND payload->>'kb_id'=$2",)@@ -271,3 +275,33 @@ async fn an_unreadable_reply_leaves_the_facts_unreviewed_and_the_job_retries() -f.cleanup().await?;run}++#[tokio::test]+async fn a_retraction_the_second_vote_calls_stated_becomes_a_keep() -> anyhow::Result<()> {+ let script = json!({"a":[+ [0,"retract","Paris is not in the document","Acme is based in London"],+ [1,"keep"]+ ]});+ let second = json!({"c":[[0,"stated"]]});+ let Some(f) = Fx::new(vec![script, second]).await? else {+ return Ok(());+ };+ let run = async {+ review(&f.state, f.kb).await?;+ assert!(f.live(f.absent).await?, "one vote does not retract");+ let actions: Vec<(String, String, String)> = sqlx::query_as(+ "SELECT action, status, reason FROM errata_actions WHERE kb_id=$1 ORDER BY created_at, id",+ )+ .bind(f.kb)+ .fetch_all(&f.pool)+ .await?;+ assert_eq!(actions[0].0, "keep");+ assert_eq!(actions[0].1, "applied");+ assert!(actions[0].2.starts_with("second vote: stated"), "{}", actions[0].2);+ assert_eq!(actions.len(), 2);+ anyhow::Ok(())+ }+ .await;+ f.cleanup().await?;+ run+}diff --git a/crates/utopia-server/src/implication.rs b/crates/utopia-server/src/implication.rsindex 7b676610..be3a536e 100644--- a/crates/utopia-server/src/implication.rs+++ b/crates/utopia-server/src/implication.rs@@ -41,6 +41,9 @@ pub async fn propose_rules(class_key: &HashMap<Uuid, &str>,by_key: &HashMap<&str, &RelationTypeView>,) -> anyhow::Result<(usize, usize)> {+ // 提规则按 low 想:它问的是「这种形状还蕴含什么」,默认强度一次答 4.6k 思考 token,+ // 是所有阶段里最贵的一种调用(bench README,2026-09-24),而答案多半是「无」+ let client = &client.clone().with_reasoning_effort(Some("low".into()));let pool = &state.pool;let keys_of = |ids: &[Uuid]| -> Vec<&str> {ids.iter()@@ -49,7 +52,14 @@ pub async fn propose_rules(};let (mut proposed, mut failed) = (0usize, 0usize);let asks: Vec<&RuleAsk<'_>> = asks.iter().filter(|a| !a.candidates.is_empty()).collect();- for batch in asks.chunks(BATCH) {+ // 批与批并行(与短语对齐同一条理由:串着等模型想 20 回就是十分钟)+ {+ use futures_util::StreamExt;+ let (keys_of, by_key) = (&keys_of, &by_key);+ let futures: Vec<_> = asks+ .chunks(BATCH)+ .map(|batch| async move {+ let mut proposed = 0usize;let items: Vec<RuleItem<'_>> = batch.iter().enumerate()@@ -101,16 +111,14 @@ pub async fn propose_rules(Ok(r) => r,Err(e) => {tracing::warn!(%kb_id, error = %e, "提规则调用失败,这一批留到下次");- failed += 1;- continue;+ return Ok::<_, anyhow::Error>((0usize, 1usize));}};let (choices, malformed) = match parse_rule_response(&reply.text, &items, READINGS) {Ok(x) => x,Err(e) => {tracing::warn!(%kb_id, error = %e, "提规则回复解析失败,这一批留到下次");- failed += 1;- continue;+ return Ok::<_, anyhow::Error>((0usize, 1usize));}};if malformed > 0 {@@ -207,6 +215,16 @@ pub async fn propose_rules(.await?;}}+ }++ Ok::<_, anyhow::Error>((proposed, 0usize))+ })+ .collect();+ let mut results = futures_util::stream::iter(futures).buffer_unordered(4);+ while let Some(r) = results.next().await {+ let (p, f) = r?;+ proposed += p;+ failed += f;}}Ok((proposed, failed))diff --git a/crates/utopia-server/src/llm_util.rs b/crates/utopia-server/src/llm_util.rsindex 9bb0bbe4..3e229ee7 100644--- a/crates/utopia-server/src/llm_util.rs+++ b/crates/utopia-server/src/llm_util.rs@@ -13,11 +13,14 @@ pub fn chat_client(s: &LlmSettings) -> Option<LlmClient> {if !s.chat_ready() {return None;}- Some(LlmClient::new(- s.chat_base_url.as_deref()?,- s.chat_api_key.as_deref(),- s.chat_model.as_deref()?,- ))+ Some(+ LlmClient::new(+ s.chat_base_url.as_deref()?,+ s.chat_api_key.as_deref(),+ s.chat_model.as_deref()?,+ )+ .with_reasoning_effort(s.chat_reasoning_effort.clone()),+ )}pub fn embed_client(s: &LlmSettings) -> Option<LlmClient> {@@ -78,6 +81,18 @@ pub async fn acquire(.ok()}+/// 要模型**想过再答**的那几处用这个:对齐与提规则是判断题,几十次调用,思考 token+/// 值得付;抽取、读数、勘误是照原文写 JSON 的活,按工作区设的推理强度(多半是 minimal)。+/// 第一次真跑里把对齐也压到 minimal,裁判判 misworded 的从 4% 涨到 31%(bench README,+/// 2026-09-24)——它挑了「相近」而不是「就是」的属性+pub fn chat_client_thinking(s: &LlmSettings) -> Option<LlmClient> {+ chat_client(s).map(|c| c.with_reasoning_effort(JUDGEMENT_EFFORT.map(String::from)))+}++/// 判断题(对齐两票)用的推理强度。`None` = 端点默认;`Some("low")` 是省一半思考 token 的+/// 折中,精度差多少由 bench 量:全关(minimal)时 misworded 31%,默认强度 12%+pub const JUDGEMENT_EFFORT: Option<&str> = Some("low");+/// `acquire` 的便捷形式:直接从工作区设置取 chat 模型的身份。pub async fn acquire_chat(state: &AppState, s: &LlmSettings) -> Option<OwnedSemaphorePermit> {let (base, model) = (s.chat_base_url.as_deref()?, s.chat_model.as_deref()?);diff --git a/crates/utopia-server/src/ontology_index.rs b/crates/utopia-server/src/ontology_index.rsindex 7b1ef762..52914162 100644--- a/crates/utopia-server/src/ontology_index.rs+++ b/crates/utopia-server/src/ontology_index.rs@@ -135,9 +135,11 @@ pub async fn refresh_scoped(// 日志照样写着"已补齐",看日志的人以为没事if failed > 0 {tracing::warn!(%kb_id, count = done, failed, "本体向量补了一部分,其余留给下一轮");- } else {- tracing::info!(%kb_id, count = done, "本体向量已补齐");+ // 「留给下一轮」得真有下一轮:从前这里照样报成功,没人再排它,缺向量的属性就一直缺+ // (对齐的短名单退回全部候选,台子等到超时)。报错让任务按预算重试+ anyhow::bail!("{failed} batches of ontology vectors failed; the job retries");}+ tracing::info!(%kb_id, count = done, "本体向量已补齐");Ok(done)}diff --git a/crates/utopia-server/src/phrase_alignment.rs b/crates/utopia-server/src/phrase_alignment.rsindex 09c56a42..0047b951 100644--- a/crates/utopia-server/src/phrase_alignment.rs+++ b/crates/utopia-server/src/phrase_alignment.rs@@ -128,14 +128,20 @@ fn consider<'a>(props: &'a [RelationTypeView],closure: &Closure,versions: &HashMap<Uuid, chrono::DateTime<chrono::Utc>>,+ shortlist: Option<&Shortlist>,) -> Considered<'a> {let empty: Vec<Uuid> = Vec::new();sigs.iter().map(|s| {- let fitting: Vec<&RelationTypeView> = props+ let mut fitting: Vec<&RelationTypeView> = props.iter().filter(|p| fits(p, s, closure).is_some()).collect();+ // 结构对得上的太多时只留最近的几条(见 `shortlist`),按相关度排:第一票先看最像的+ if let Some(keep) = shortlist.and_then(|m| m.get(&s.key())) {+ fitting.retain(|p| keep.contains(&p.id));+ fitting.sort_by_key(|p| keep.iter().position(|k| *k == p.id));+ }let cands: Vec<(Uuid, chrono::DateTime<chrono::Utc>)> = fitting.iter().filter_map(|p| versions.get(&p.id).map(|at| (p.id, *at)))@@ -168,6 +174,173 @@ fn snippet(text: &str) -> String {out}+/// 一条签名结构对得上的属性多过这个数,就按相关度只留这么多给模型看。第一次真跑里每条+/// 签名平均拖着几十条候选(六个粗类切不掉什么),一次请求 1.8 万 token,对齐占了一轮+/// 八成的用量(bench README,2026-09-24);十条里若没有对的,多半是本体里就没有+const SHORTLIST: usize = 10;+/// 同时在飞的对齐批次数;模型闸门(工作区的并发上限)在下面再限一次+const PARALLEL_BATCHES: usize = 4;+/// 一次嵌入多少条签名的文本+const SHORTLIST_EMBED_BATCH: usize = 32;++/// 签名 → 留给模型看的候选 id(按相关度)。没进表的签名照旧看全部结构候选+type Shortlist = HashMap<SignatureKey, Vec<Uuid>>;++/// 按相关度给候选多的签名开短名单:签名的文本(短语加一条例句)嵌入后,与属性的向量比+/// 近(`embed_ontology` 建的那份),留最近的 [`SHORTLIST`] 条;标签里的词出现在短语里的+/// 属性无论远近都留着("based in" 对 "based in")。没配嵌入模型、属性还没向量、或候选本来+/// 就不多的签名不进表——那时模型看的还是全部结构候选+async fn shortlist(+ state: &AppState,+ settings: &utopia_core::models::LlmSettings,+ kb_id: Uuid,+ sigs: &[PhraseSignature],+ full: &Considered<'_>,+) -> anyhow::Result<Shortlist> {+ let mut out = Shortlist::new();+ let Some(client) = llm_util::embed_client(settings) else {+ return Ok(out);+ };+ let wide: Vec<&PhraseSignature> = sigs+ .iter()+ .filter(|s| full.get(&s.key()).is_some_and(|(f, _)| f.len() > SHORTLIST))+ .collect();+ if wide.is_empty() {+ return Ok(out);+ }+ let pool = &state.pool;+ for batch in wide.chunks(SHORTLIST_EMBED_BATCH) {+ let texts: Vec<String> = batch+ .iter()+ .map(|s| match (s.examples.first(), s.quotes.first()) {+ (Some(e), Some(q)) => format!("{} · {e} · {q}", s.phrase),+ (Some(e), None) => format!("{} · {e}", s.phrase),+ _ => s.phrase.clone(),+ })+ .collect();+ let vectors = {+ let _permit = llm_util::acquire_embed(state, settings).await;+ match client.embed(&texts).await {+ Ok(v) if v.len() == batch.len() => v,+ Ok(v) => {+ tracing::warn!(%kb_id, sent = batch.len(), got = v.len(), "签名向量数量对不上,这一批不开短名单");+ continue;+ }+ Err(e) => {+ tracing::warn!(%kb_id, error = %e, "签名向量没算出来,这一批不开短名单");+ continue;+ }+ }+ };+ for (s, vector) in batch.iter().zip(vectors) {+ let (fitting, _) = &full[&s.key()];+ let kind = if s.object_is_value {+ "attribute"+ } else {+ "relation"+ };+ let near = utopia_store::ontology::nearest_relation_type_ids(+ pool,+ kb_id,+ &vector,+ (fitting.len() * 2) as i64,+ Some(kind),+ )+ .await?;+ if near.is_empty() {+ // 属性还没有向量:不开短名单,模型看全部+ continue;+ }+ let fitting_ids: Vec<Uuid> = fitting.iter().map(|p| p.id).collect();+ let must_keep: Vec<Uuid> = fitting+ .iter()+ .filter(|p| label_in_phrase(&p.label, &s.phrase))+ .map(|p| p.id)+ .collect();+ out.insert(+ s.key(),+ pick_shortlist(&near, &fitting_ids, &must_keep, SHORTLIST),+ );+ }+ }+ tracing::info!(%kb_id, wide = wide.len(), shortlisted = out.len(), "候选短名单开好");+ Ok(out)+}++/// 类别词 → 留给提规则看的属性 id(按相关度)。词的文本加几个例名嵌入,取最近的+/// [`SHORTLIST`] 条;没配嵌入模型、属性没向量的不进表+async fn shortlist_kind_words(+ state: &AppState,+ settings: &utopia_core::models::LlmSettings,+ kb_id: Uuid,+ words: &[&utopia_store::type_bindings::KindWordSignature],+) -> anyhow::Result<HashMap<String, Vec<Uuid>>> {+ let mut out = HashMap::new();+ let Some(client) = llm_util::embed_client(settings) else {+ return Ok(out);+ };+ if words.is_empty() {+ return Ok(out);+ }+ for batch in words.chunks(SHORTLIST_EMBED_BATCH) {+ let texts: Vec<String> = batch+ .iter()+ .map(|k| format!("{} · {}", k.kind_word, k.examples.join(", ")))+ .collect();+ let vectors = {+ let _permit = llm_util::acquire_embed(state, settings).await;+ match client.embed(&texts).await {+ Ok(v) if v.len() == batch.len() => v,+ Ok(_) | Err(_) => {+ tracing::warn!(%kb_id, "类别词向量没算出来,这一批看全部候选");+ continue;+ }+ }+ };+ for (k, vector) in batch.iter().zip(vectors) {+ let near = utopia_store::ontology::nearest_relation_type_ids(+ &state.pool,+ kb_id,+ &vector,+ SHORTLIST as i64,+ None,+ )+ .await?;+ if !near.is_empty() {+ out.insert(k.kind_word.clone(), near);+ }+ }+ }+ Ok(out)+}++/// 标签里有一个像样的词(四个字母以上)出现在短语里+fn label_in_phrase(label: &str, phrase: &str) -> bool {+ let phrase = phrase.to_lowercase();+ label+ .to_lowercase()+ .split(|c: char| !c.is_alphanumeric())+ .any(|w| w.len() >= 4 && phrase.contains(w))+}++/// 短名单:先是标签对上的(无论远近),再按向量距离补到上限;都是结构对得上的+fn pick_shortlist(near: &[Uuid], fitting: &[Uuid], must_keep: &[Uuid], limit: usize) -> Vec<Uuid> {+ let mut out: Vec<Uuid> = must_keep+ .iter()+ .copied()+ .filter(|id| fitting.contains(id))+ .collect();+ for id in near {+ if out.len() >= limit {+ break;+ }+ if fitting.contains(id) && !out.contains(id) {+ out.push(*id);+ }+ }+ out+}+/// 一轮里没判完的(调用失败、回复读不出、模型漏答)自己再排几次;超过这个数就等/// 下一篇文档或本体的改动再问。不设上限的话,温度为零下一段每次都读不出的回复会让/// 任务每隔几十秒把同一段提示词再送一遍,没有尽头(同类别词对齐)@@ -185,7 +358,8 @@ pub async fn align_phrases_reasking(let settings = utopia_store::settings::get(pool, kb.workspace_id).await?.ok_or_else(|| anyhow::anyhow!("Chat model not configured; cannot align phrases"))?;- let client = llm_util::chat_client(&settings)+ // 对齐是判断题:让模型按端点默认的强度想,不用工作区给抽取设的 minimal+ let client = llm_util::chat_client_thinking(&settings).ok_or_else(|| anyhow::anyhow!("Chat model not configured; cannot align phrases"))?;// 一个库同时只跑一份,理由同类别词对齐(并行跑会把端点打出 502)let mut guard = pool.acquire().await?;@@ -229,8 +403,11 @@ async fn align_phrases_locked(.into_iter().map(|b| (b.key(), b)).collect();- // 每条活着的签名此刻的候选与指纹。候选按继承命中;指纹是判定看到的全部输入(0053)- let considered = consider(&sigs, &props, &closure, &versions);+ // 每条活着的签名此刻的候选与指纹。候选按继承命中,多了再按相关度开短名单;指纹是判定+ // 看到的全部输入(0053),短名单也算在内——名单变了就再问+ let full = consider(&sigs, &props, &closure, &versions, None);+ let short = shortlist(state, settings, kb_id, &sigs, &full).await?;+ let considered = consider(&sigs, &props, &closure, &versions, Some(&short));// 过期 = 存下的指纹和此刻的不一样(没有指纹的是这一列出现前判的,各重判一次)。// 不再按时间戳:父边的增删、请求途中的编辑(#795)时间戳看不见。人的判定不重判let todo: Vec<&PhraseSignature> = sigs@@ -277,7 +454,21 @@ async fn align_phrases_locked(let mut failed = 0usize;// 问了、模型也答了、却没答到的签名:两票缺一票就不下结论let mut unanswered = 0usize;- for batch in todo.chunks(BATCH) {+ // 批与批并行([`PARALLEL_BATCHES`] 个在飞,模型闸门再限一次):一批两票串行要等模型+ // 想两回,串着跑 22 批就是半小时,其中一次卡住的调用能把整轮拖住 18 分钟(bench README,+ // 2026-09-24)。每批各记各的数,回来再加+ {+ use futures_util::StreamExt;+ // 只把引用搬进各批的 future+ let (considered, full, closure, class_key, by_key) =+ (&considered, &full, &closure, &class_key, &by_key);+ // 先把每批的 future 造出来再排队:直接在 map 里返回 async 块会让借用的生命周期+ // 满足不了 tokio::spawn 要的 Send+ let futures: Vec<_> = todo+ .chunks(BATCH)+ .map(|batch| async move {+ let (mut bound, mut none, mut undecided, mut skipped, mut failed, mut unanswered) =+ (0usize, 0usize, 0usize, 0usize, 0usize, 0usize);// 候选超过上限的不问模型:记成 undecided 交给人,指纹照记——属性少下去指纹就变,// 到时再问。从前超限和无候选一样静默跳过,签名永远排着又永远不可执行(#807)let cands: Vec<Vec<&RelationTypeView>> = batch@@ -321,7 +512,7 @@ async fn align_phrases_locked(kind: &p.kind,domains: keys_of(&p.domains),ranges: keys_of(&p.ranges),- via: fits(p, s, &closure)+ via: fits(p, s, closure).map(|f| {f.via.iter()@@ -337,6 +528,13 @@ async fn align_phrases_locked(.unwrap_or_default(),}).collect(),+ // 结构对得上却没进短名单的键:模型若从批里的属性表选了它,算票+ also_allowed: full[&s.key()]+ .0+ .iter()+ .filter(|p| !cands[i].iter().any(|c| c.id == p.id))+ .map(|p| p.key.as_str())+ .collect(),}}).collect();@@ -382,6 +580,10 @@ async fn align_phrases_locked(failed += 1;continue;}+ if malformed > 0 {+ // 坏票长什么样得看得见:第一次真跑里一半签名被判坏票,查了一天才知道模型答的是标签+ tracing::info!(%kb_id, malformed, reply = %snippet(&reply.text), "短语对齐的回复里有坏票");+ }for c in choices {let Ok(i) = usize::try_from(c.id) else {continue;@@ -511,6 +713,20 @@ async fn align_phrases_locked(}}}+ }++ Ok::<_, anyhow::Error>((bound, none, undecided, skipped, failed, unanswered))+ })+ .collect();+ let mut results = futures_util::stream::iter(futures).buffer_unordered(PARALLEL_BATCHES);+ while let Some(r) = results.next().await {+ let (b, n, u, sk, f, un) = r?;+ bound += b;+ none += n;+ undecided += u;+ skipped += sk;+ failed += f;+ unanswered += un;}}tracing::info!(%kb_id, bound, none, undecided, skipped, failed, unanswered, "短语对齐完成");@@ -538,7 +754,9 @@ async fn align_phrases_locked(let Some(b) = decided_now.get(&s.key()) else {continue;};- if b.status == "undecided" {+ // 只问绑上的签名:判「无」的形状一轮 1121 条问下来提了不到 1% 的规则,却占了+ // 提规则一半以上的调用(bench README,2026-09-24);拿不定的等人先定+ if b.status != "bound" {continue;}let (fitting, basis) = &considered[&s.key()];@@ -574,18 +792,29 @@ async fn align_phrases_locked(+ &k.kind_word}).collect();+ // 类别词的候选也开短名单:词加例名嵌入后取最近的属性;没有向量时看全部+ let fresh: Vec<&utopia_store::type_bindings::KindWordSignature> = kind_words+ .iter()+ .filter(|k| !asked_kind.contains(k.kind_word.as_str()))+ .collect();+ let kind_short = shortlist_kind_words(state, settings, kb_id, &fresh).await?;for (k, basis) in kind_words.iter().zip(kind_basis.iter()) {if asked_kind.contains(k.kind_word.as_str()) {continue;}+ let mut candidates: Vec<&RelationTypeView> = props+ .iter()+ .filter(|p| p.kind == "relation" || p.kind == "attribute")+ .collect();+ if let Some(keep) = kind_short.get(&k.kind_word) {+ candidates.retain(|p| keep.contains(&p.id));+ candidates.sort_by_key(|p| keep.iter().position(|id| *id == p.id));+ }asks.push(crate::implication::RuleAsk {phrase: None,kind_word: Some(k),bound_to: None,- candidates: props- .iter()- .filter(|p| p.kind == "relation" || p.kind == "attribute")- .collect(),+ candidates,basis,});}@@ -624,7 +853,8 @@ async fn align_phrases_locked(let closure = closures(classes.iter().map(|c| (c.id, c.parents.as_slice())));let versions = phrase_bindings::property_versions(pool, kb_id).await?;let sigs = phrase_bindings::signatures(pool, kb_id).await?;- let now_considered = consider(&sigs, &props, &closure, &versions);+ // 短名单沿用开跑时算的那份:向量没变,名单就没变;变了的签名本轮之后自然再问+ let now_considered = consider(&sigs, &props, &closure, &versions, Some(&short));let now: HashMap<_, _> = phrase_bindings::bindings(pool, kb_id).await?.into_iter()@@ -672,6 +902,25 @@ mod lifecycle_tests;#[cfg(test)]mod tests {+ #[test]+ fn a_shortlist_keeps_label_matches_and_fills_by_distance_within_the_fitting_set() {+ let ids: Vec<Uuid> = (0..6).map(|_| Uuid::now_v7()).collect();+ // near 按距离:ids[3] 最近,但不在结构候选里;ids[5] 标签对上,排在最后也留+ let near = vec![ids[3], ids[0], ids[1], ids[2], ids[4], ids[5]];+ let fitting = vec![ids[0], ids[1], ids[2], ids[4], ids[5]];+ let picked = pick_shortlist(&near, &fitting, &[ids[5]], 3);+ assert_eq!(picked, vec![ids[5], ids[0], ids[1]]);+ assert!(label_in_phrase(+ "headquarters location",+ "has its headquarters in"+ ));+ assert!(!label_in_phrase("country", "is based in"));+ assert!(+ !label_in_phrase("in", "is based in"),+ "short words do not count"+ );+ }+use super::*;fn view(kind: &str, domains: Vec<Uuid>, ranges: Vec<Uuid>) -> RelationTypeView {diff --git a/crates/utopia-server/src/phrase_alignment_tests.rs b/crates/utopia-server/src/phrase_alignment_tests.rsindex 874ed63f..5fc6626a 100644--- a/crates/utopia-server/src/phrase_alignment_tests.rs+++ b/crates/utopia-server/src/phrase_alignment_tests.rs@@ -436,7 +436,11 @@ async fn an_edit_during_the_model_request_leaves_the_decision_stale() -> anyhow:f.clear_jobs().await?;f.script(bound());f.run().await?;- assert_eq!(f.requests().len(), 5, "two votes, one rule question (nothing implied), then two votes again: the basis differs, not the clock");+ assert_eq!(+ f.requests().len(),+ 4,+ "two votes, then two votes again (a none is not asked for rules): the basis differs, not the clock"+ );assert_eq!(f.binding().await?.status, "bound");anyhow::Ok(())}diff --git a/crates/utopia-server/src/type_alignment.rs b/crates/utopia-server/src/type_alignment.rsindex 21d5761b..16539677 100644--- a/crates/utopia-server/src/type_alignment.rs+++ b/crates/utopia-server/src/type_alignment.rs@@ -96,7 +96,7 @@ pub async fn align_types_reasking(state: &AppState, kb_id: Uuid, reask: u32) ->let settings = utopia_store::settings::get(pool, kb.workspace_id).await?.ok_or_else(|| anyhow::anyhow!("Chat model not configured; cannot align kind words"))?;- let client = llm_util::chat_client(&settings)+ let client = llm_util::chat_client_thinking(&settings).ok_or_else(|| anyhow::anyhow!("Chat model not configured; cannot align kind words"))?;// 一个库同时只跑一份:抽完每篇、建每个类都会排一次,排队去重只挡「排队中」的,// 后一个开跑时前一个还在跑就并行了——实测种 14 个类跑出 14 份并行任务,把模型端点diff --git a/crates/utopia-store/src/errata.rs b/crates/utopia-store/src/errata.rsindex f211767b..8d8fd502 100644--- a/crates/utopia-store/src/errata.rs+++ b/crates/utopia-store/src/errata.rs@@ -137,12 +137,14 @@ pub async fn document_text(pool: &PgPool, document_id: Uuid) -> AppResult<StringOk(text.unwrap_or_default())}-/// 还有活着的类型化行没看过的文档,最早摄入的在前+/// 该看的文档:还有活着的类型化行没看过的,以及抽完了却一次都没看过的(它可能一条类型化行+/// 都没有——对齐没绑上——这时 agent 能做的只有加,而加正是第一次真跑里最值的那一半)。+/// 最早摄入的在前pub async fn documents_due(pool: &PgPool, kb_id: Uuid, limit: i64) -> AppResult<Vec<Uuid>> {Ok(sqlx::query_scalar("SELECT d.id FROM documents dWHERE d.kb_id = $1 AND d.deleted_at IS NULL- AND EXISTS (+ AND (EXISTS (SELECT 1 FROM fact_evidence feJOIN (SELECT fact_id, statement_id FROM typed_fact_sourcesUNION ALL@@ -151,6 +153,8 @@ pub async fn documents_due(pool: &PgPool, kb_id: Uuid, limit: i64) -> AppResult<JOIN facts t ON t.id = src.fact_idWHERE fe.document_id = d.id AND t.invalidated_at IS NULLAND NOT EXISTS (SELECT 1 FROM errata_actions ea WHERE ea.fact_id = t.id))+ OR (d.graph_status = 'done'+ AND NOT EXISTS (SELECT 1 FROM errata_runs r WHERE r.document_id = d.id)))ORDER BY d.created_at, d.idLIMIT $2",)@@ -160,6 +164,16 @@ pub async fn documents_due(pool: &PgPool, kb_id: Uuid, limit: i64) -> AppResult<.await?)}+/// 这份文档看过几次+pub async fn runs_of(pool: &PgPool, document_id: Uuid) -> AppResult<i64> {+ Ok(+ sqlx::query_scalar("SELECT count(*) FROM errata_runs WHERE document_id = $1")+ .bind(document_id)+ .fetch_one(pool)+ .await?,+ )+}+/// 一次复审开账pub async fn start_run(pool: &PgPool,@@ -316,22 +330,45 @@ async fn property_by_key()}-/// 宾语的文本按属性的种类解:关系要库里已有的名字(勘误不造东西),属性落成值+/// 一个名字解成库里的东西:已有的按名字找;没有的,只要这个名字是文档的原话,就按 0041 建一个+/// 带名字事实的实体——文档说了一个新东西,勘误加事实不该因为抽取没把它当实体而作罢。不在文档+/// 里的名字不建:那是 agent 编的+async fn thing_named(+ pool: &PgPool,+ kb_id: Uuid,+ name: &str,+ document_text: &str,+) -> AppResult<Result<Uuid, String>> {+ if let Some(id) = crate::resolution::existing_by_name(pool, kb_id, name).await? {+ return Ok(Ok(id));+ }+ if quote_in(document_text, name) {+ return Ok(Ok(crate::implication_rules::resolve_or_create_named(+ pool, kb_id, name,+ )+ .await?));+ }+ Ok(Err(format!(+ "no thing named \"{name}\" and the document does not name it"+ )))+}++/// 宾语的文本按属性的种类解:关系要一样东西(见 `thing_named`),属性落成值async fn object_of(pool: &PgPool,kb_id: Uuid,kind: &str,text: &str,+ document_text: &str,) -> AppResult<Result<(Option<Uuid>, Option<Value>), String>> {let text = text.trim();if text.is_empty() {return Ok(Err("empty object".into()));}if kind == "relation" {- match crate::resolution::existing_by_name(pool, kb_id, text).await? {- Some(id) => Ok(Ok((Some(id), None))),- None => Ok(Err(format!("no thing named \"{text}\""))),- }+ Ok(thing_named(pool, kb_id, text, document_text)+ .await?+ .map(|id| (Some(id), None)))} else {Ok(Ok((None, Some(json!({ "value": text })))))}@@ -394,7 +431,9 @@ pub async fn record(pool: &PgPool, kb_id: Uuid, input: ActionInput<'_>) -> AppRe.fetch_one(pool).await?;let obj = match object.as_deref() {- Some(text) => object_of(pool, kb_id, &kind, text).await?,+ Some(text) => {+ object_of(pool, kb_id, &kind, text, input.document_text).await?+ }None => Ok(old.clone()),};match obj {@@ -430,13 +469,12 @@ pub async fn record(pool: &PgPool, kb_id: Uuid, input: ActionInput<'_>) -> AppReproperty,object,} => {- let subject_id =- crate::resolution::existing_by_name(pool, kb_id, subject.trim()).await?;+ let subject_id = thing_named(pool, kb_id, subject.trim(), input.document_text).await?;match (subject_id, property_by_key(pool, kb_id, property).await?) {- (None, _) => Err(format!("no thing named \"{}\"", subject.trim())),+ (Err(e), _) => Err(e),(_, None) => Err(format!("no property with key \"{}\"", property.trim())),- (Some(subject_id), Some((predicate_id, kind))) => {- match object_of(pool, kb_id, &kind, object).await? {+ (Ok(subject_id), Some((predicate_id, kind))) => {+ match object_of(pool, kb_id, &kind, object, input.document_text).await? {Err(e) => Err(e),Ok((object_id, object_value)) => Ok(Some(Target {subject_id,@@ -496,9 +534,14 @@ pub async fn record(pool: &PgPool, kb_id: Uuid, input: ActionInput<'_>) -> AppRe}_ => None,};+ // 结构没报过的事实,agent 单方面要撤或改:留给人。第一次真跑里撤掉的行十之八九原文其实说了+ // (bench README),而结构报了的那几条才是它该动的;抽样看到的,人确认了再动+ let unflagged = c.is_some_and(|c| c.flag.is_none())+ && matches!(input.proposed, Proposed::Retract | Proposed::Revise { .. });let (status, detail): (&'static str, Option<String>) = match (&resolved, &hold) {(Err(e), _) => ("refused", Some(e.clone())),(Ok(_), Some(h)) => ("held", Some(h.to_string())),+ (Ok(_), None) if unflagged => ("held", Some("unflagged".into())),(Ok(_), None) => ("applied", None),};sqlx::query(diff --git a/crates/utopia-store/src/errata_tests.rs b/crates/utopia-store/src/errata_tests.rsindex 267c8dfc..17c75b9c 100644--- a/crates/utopia-store/src/errata_tests.rs+++ b/crates/utopia-store/src/errata_tests.rs@@ -26,7 +26,7 @@ struct Fx {text: &'static str,}-const TEXT: &str = "Acme is based in London. Jane Roe runs Acme. Acme was founded in 1999.";+const TEXT: &str = "Acme is based in London. Jane Roe runs Acme. Acme was founded in 1999. Zeta Corp is based in London.";/// 一个库:organization / place / person;based_in(organization → place)、ceo(organization →/// person,只许一个)、founded(日期属性);一份文档一块正文;Acme、London、Paris、Jane Roe、@@ -281,6 +281,18 @@ async fn structure_flags_facts_and_the_flagged_come_first() -> anyhow::Result<()assert_eq!(r.status, "applied");assert_eq!(candidates(&pool, f.kb, f.doc).await?.len(), 6);assert_eq!(documents_due(&pool, f.kb, 10).await?, vec![f.doc]);+ // 抽完了、一条类型化行都没有的文档也该看一次(agent 只能加);看过一次就不再排+ let empty_doc = Uuid::now_v7();+ sqlx::query("INSERT INTO documents(id,kb_id,filename,sha256,graph_status) VALUES ($1,$2,'empty.txt','y','done')")+ .bind(empty_doc)+ .bind(f.kb)+ .execute(&pool)+ .await?;+ assert_eq!(documents_due(&pool, f.kb, 10).await?, vec![f.doc, empty_doc]);+ let empty_run = start_run(&pool, f.kb, empty_doc, 0, 0).await?;+ assert_eq!(runs_of(&pool, empty_doc).await?, 1);+ finish_run(&pool, empty_run, 1, None, None).await?;+ assert_eq!(documents_due(&pool, f.kb, 10).await?, vec![f.doc]);finish_run(&pool, run, 1, Some(100), Some(20)).await?;let usage: (i32, Option<i64>) =sqlx::query_as("SELECT requests, prompt_tokens FROM errata_runs WHERE id=$1")@@ -408,6 +420,55 @@ async fn a_retraction_something_rests_on_is_held_until_a_person_decides() -> anyrun}+#[tokio::test]+async fn an_unflagged_fact_is_retracted_only_by_a_person() -> anyhow::Result<()> {+ let Some(url) = crate::test_db::url() else {+ return Ok(());+ };+ let pool = PgPool::connect(&url).await?;+ crate::db::migrate(&pool).await?;+ let f = seed(&pool).await?;+ let run = async {+ let (_, fine) = typed(+ &pool,+ &f,+ f.acme,+ "based in",+ f.based_in,+ Some(f.london),+ None,+ )+ .await?;+ let c = candidates(&pool, f.kb, f.doc).await?;+ assert_eq!(c[0].flag, None);+ let run = start_run(&pool, f.kb, f.doc, 0, 1).await?;+ let r = record(+ &pool,+ f.kb,+ input(+ &f,+ run,+ Some(&c[0]),+ Proposed::Retract,+ Some("Acme is based in London"),+ ),+ )+ .await?;+ assert_eq!((r.status, r.detail.as_deref()), ("held", Some("unflagged")));+ assert!(live(&pool, fine).await?);+ assert_eq!(+ held(&pool, f.kb, 10, 0).await?[0].detail.as_deref(),+ Some("unflagged")+ );+ assert!(decide_held(&pool, f.kb, r.id, true, f.user).await?);+ assert!(!live(&pool, fine).await?);+ anyhow::Ok(())+ }+ .await;+ cleanup(&pool, &f).await?;+ run+}+#[tokio::test]async fn a_revision_and_an_addition_write_typed_facts_with_the_documents_words() -> anyhow::Result<()> {@@ -467,7 +528,25 @@ async fn a_revision_and_an_addition_write_typed_facts_with_the_documents_words().await?;assert_eq!(r.status, "refused");- assert_eq!(r.detail.as_deref(), Some("no thing named \"Bob\""));+ assert_eq!(+ r.detail.as_deref(),+ Some("no thing named \"Bob\" and the document does not name it")+ );+ // 文档提到的新东西:建一个带名字的实体,事实落下+ let r = record(+ &pool,+ f.kb,+ input(&f, run, None, Proposed::Add { subject: "Zeta Corp".into(), property: "based_in".into(), object: "London".into() }, Some("Zeta Corp is based in London")),+ )+ .await?;+ assert_eq!((r.status, r.detail.clone()), ("applied", None));+ let zeta: (String, Option<Uuid>) = sqlx::query_as(+ "SELECT e.canonical_name, f.object_id FROM facts f JOIN entities e ON e.id = f.subject_id WHERE f.id = $1",+ )+ .bind(r.new_fact_id.unwrap())+ .fetch_one(&pool)+ .await?;+ assert_eq!(zeta, ("Zeta Corp".into(), Some(f.london)));// 只许一个值的谓词已经有 Jane:再加一个 London 会开出违规,留给人let r = record(&pool,diff --git a/crates/utopia-store/src/settings.rs b/crates/utopia-store/src/settings.rsindex 91e9b7c4..1d552d87 100644--- a/crates/utopia-store/src/settings.rs+++ b/crates/utopia-store/src/settings.rs@@ -81,6 +81,23 @@ pub async fn upsert(opened(row)}+/// 对话模型的推理强度,单独改:它跟着对话模型那张卡走,但 `upsert` 的整体替换不认识它,+/// 老调用方不传也不该把它清掉。`None` = 清空(回到端点默认)+pub async fn set_chat_reasoning_effort(+ pool: &PgPool,+ workspace_id: Uuid,+ effort: Option<&str>,+) -> AppResult<()> {+ sqlx::query(+ "UPDATE llm_settings SET chat_reasoning_effort = $2, updated_at = now() WHERE workspace_id = $1",+ )+ .bind(workspace_id)+ .bind(effort)+ .execute(pool)+ .await?;+ Ok(())+}+/// 版面识别服务的设置,单独存:它在管理页上是自己的一张卡片,存它不该碰对话和嵌入那几列/// (反过来也一样——`upsert` 不写这三列)。`api_key` 传 None 保留旧值;地址传 None = 关掉pub async fn upsert_ocr(diff --git a/docs/design/ontology.md b/docs/design/ontology.mdindex 0a9fe7c8..b7a07b15 100644--- a/docs/design/ontology.md+++ b/docs/design/ontology.md@@ -64,7 +64,12 @@ domain and range admit the two ends in either direction (an undeclared end admitmodel sees the signature with three of its statements and their quotes, and two votes with thecandidates in opposite orders must agree on the property and the direction (forward when thestatement's subject is the property's subject, reverse when its object is) for the signature to-bind. A signature the votes disagree on is `undecided` for the alignment queue of #725; one with no+bind. When the structure fits more than ten properties (a coarse class hierarchy fits most of them),+the aligner opens a **shortlist**: the signature's phrase and one example sentence are embedded and+the ten properties nearest by the ontology's own vectors (`embed_ontology`) are shown, plus any whose+label shares a word with the phrase; without an embedding model the model sees every structural+candidate. The shortlist is part of the decision's basis, so a changed list re-asks. The candidate+properties are described once per batch and each item names only its keys. A signature the votes disagree on is `undecided` for the alignment queue of #725; one with nofitting property is `none`, its statements stay in the open graph and it counts toward theworkbench's suggestions. Bindings live in `phrase_bindings`. Candidates are the properties whosedeclared domain and range admit the endpoint classes **or an ancestor of them**, and a candidate@@ -109,6 +114,17 @@ materialises. `errata_runs` keeps the per-document account (facts flagged and sathe endpoint's token usage) for the measure 0044 names: precision gained against correct factsremoved, at what cost.+The first measured runs (bench README, 2026-09-24) showed the agent retracting mostly what the+document did say and adding mostly what it did: so a retraction or revision now needs **two votes+and a flag**. A fact the structure did not doubt is never retracted by the agent alone; its retraction+is held for a person with the reason `unflagged`. A flagged fact the agent wants to retract is asked+about a second time, alone with the document and without the first prompt's reasons; only an explicit+"not stated" retracts, anything else becomes a keep recorded as `second vote: stated`. Additions were+opened the other way: a name the document contains but the base lacks becomes a new entity with its+name fact (a name the document does not contain is still refused), and a document that came out of+extraction with no typed facts at all is sent once with an empty list, so the agent can add what+alignment could not bind.+Even one edit can reopen all older automatic negative bindings on that side of thebase, requiring two votes per eligible item through batched model requests; debouncing reducesthe number of runs, not the items reconsidered. A burst of ontology edits debounces into one rundiff --git a/migrations/0075_a_chat_model_can_be_told_how_hard_to_think.sql b/migrations/0075_a_chat_model_can_be_told_how_hard_to_think.sqlnew file mode 100644index 00000000..1260a30e--- /dev/null+++ b/migrations/0075_a_chat_model_can_be_told_how_hard_to_think.sql@@ -0,0 +1,7 @@+-- 对话模型的推理强度。推理模型默认边想边答:第一次真跑(bench README,2026-09-24)里+-- 抽取每次调用平均 2.2k 进、7.2k 出,出的 94% 是思考 token,而我们要的只是几百 token 的+-- 照原文写的 JSON。OpenAI 兼容口的 `reasoning_effort` 能把它关小(minimal 时思考归零,+-- 答案不变);空 = 不带这个字段,端点按自己的默认来。按工作区存,和模型放一起:+-- 它是「这个模型怎么用」的一部分,不是某个任务的参数。+ALTER TABLE llm_settings ADD COLUMN chat_reasoning_effort TEXT+ CHECK (chat_reasoning_effort IN ('minimal', 'low', 'medium', 'high'));diff --git a/scripts/bench/README.md b/scripts/bench/README.mdindex 95f72bfc..f331364f 100644--- a/scripts/bench/README.md+++ b/scripts/bench/README.md@@ -545,3 +545,39 @@ bound / none / undecided。0044 的门槛:裁判精度不低于完整原型的(全量 96.7%),召回因此从 6.0% 到 11.9%。每篇 token 这一轮量不出:apexin 的流每一帧都带累计用量,服务端按帧记了日志;从这个 PR 起每次回复只记一行,下一轮能按阶段加总。+### 第二次真跑:成本与效果的几刀(2026-09-24,gemini-3.5-flash,20 篇小批量 `--corpus redocred-20`)++第一次真跑每篇 13.6 万 token,正文只有 300。按调用类型拆开(服务端从 #893 起每次回复记一行用量)+之后逐刀改,每刀用同一批 20 篇(735 条金标)验证,同一个裁判模型:++| 样本 | 配置 | 绑定 bound/none/undecided | 勘误前 召回(同句)/ 精度 | 勘误后 召回(同句) | 全量精度 | 每篇 token |+|---|---|---|---|---|---|---|+| smoke5 | 全 minimal,短名单,共享属性表 | 120/150/39 | 10.7%(20.8%)/ 69% | 13.2%(24.4%) | 74.4% | ~10 万* |+| smoke6 | 对齐按默认强度思考 | 77/163/16 | 11.0%(19.2%)/ 88% | 13.7%(24.0%) | — | ~5.3 万 |+| smoke8b | + 标签当键、批次并行 | 98/150/15 | 12.8%(22.7%)/ 83% | 15.2%(26.0%) | 82.1% | ~5.6 万 |+| smoke10 | 对齐按 low | 120/163/34 | 11.6%(23.1%)/ 70–75% | 17.1%(27.9%) | 76.3% | ~3.9 万 |++*smoke5 还带着提规则每项整张属性表的巨无霸请求(一次 5.7 万)。++刀与理由:+- **候选短名单**:结构对得上的候选超过十条时,签名的文本嵌入后取最近的十条(`embed_ontology` 的向量),+ 标签对上短语的一律保留;短名单进判定指纹。一次请求从 1.8 万降到 4 千。+- **属性表一批只写一遍**(短语对齐与提规则),每项只列键。提规则的类别词项从前每项整张表。+- **模型答标签也认**:这个本体的键是 `p569`,模型十有八九答 `dateOfBirth`;第一次真跑 1189 条签名里+ 586 条因此判成坏票。标签唯一对上就认它的键。+- **推理强度按任务分**:抽取、读数、勘误照原文写 JSON,用工作区设的 `minimal`(思考 token 归零、答案+ 不变);对齐是判断题,全关时 misworded 31%,默认强度 12%,low 折中在 76% 精度;提规则按 low。+- **批次并行**:对齐与提规则四批同飞,20 篇的对齐从 29 分钟到 5 分钟;台子的裁判也四篇并行。+- **只问绑上的签名提规则**、**基准库关掉治理 agent**(它在第三轮花了约 500 次调用)、**勘误只带文档+ 最近的 24 条属性**。+- **撤销要两票加一个结构报的理由**:第三轮 100 篇整轮零错撤(撤 2 改 8,全部第二票确认);加的放开+ (文档里出现的新名字可以建实体、没类型化行的文档也看一次)把召回从 9.3% 推到 18.4%,代价是加得多+ 之后全量精度从 96% 到 90%。++跳过的签名(第三轮 586、之后每轮 60 上下)里坏票修掉之后剩下的是**结构上一条属性都对不上**的:宾语是+值而本体只有 9 条属性型,或那对类没有任何属性声明。那是这份本体的覆盖,不是解析。++第三轮 100 篇(两票撤销,老成本)的完整数:勘误前 670 条、召回 9.3%(同句 13.1%)、精度 93.9%;+勘误后 973 条、15.9%(22.7%)、97.0%;全批 166 条规则隐含 149 行,再勘误累计加 790、留人 167,+1203 条、18.4%(26.5%),全量裁判 90.2%。+diff --git a/scripts/bench/corpora/redocred-20.json b/scripts/bench/corpora/redocred-20.jsonnew file mode 100644index 00000000..8dd8d2c5--- /dev/null+++ b/scripts/bench/corpora/redocred-20.json@@ -0,0 +1,106 @@+{+ "source": "Re-DocRED test_revised.json (MIT, tonytan48/Re-DocRED)",+ "seed": 1,+ "docs": [+ {+ "filename": "redocred-000.txt",+ "title": "Vladimir Mitrofanovich Orlov",+ "text": "Vladimir Mitrofanovich Orlov\n\nVladimir Mitrofanovich Orlov ( ) ( July 15 , 1895 - July 28 , 1938 ) was a Russian military leader and Commander - in - Chief of the Soviet Naval Forces from July 1931 to July 1937 . Orlov was born in Kherson and initially studied in the Legal faculty of St Petersburg University ( although he did not complete his studies ) . He joined the Baltic Fleet in 1916 and served as a navigating officer on the cruiser Bogatyr . In 1919 - 20 he was political officer of the Baltic Fleet and fought against the forces of the white General Nikolai Yudenich in the defence of Petrograd . In the 1920s he was commisar for water transport and in 1923 he became political commissar for all naval academies . Between 1926 and 1930 he commanded the Black Sea Fleet . In 1931 he was appointed commander of the Soviet Navy and in 1937 he was appointed deputy minister of defence . Orlov was arrested on 10 July 1937 and was sentenced to death on 28 July 1938 and executed . He was posthumously rehabilitated in 1956 ."+ },+ {+ "filename": "redocred-001.txt",+ "title": "Emiliano Esono Michá",+ "text": "Emiliano Esono Michá\n\nEmiliano Esono Michá is an Equatoguinean political activist currently imprisoned on weapons possession charges . His imprisonment drew protest from the US State Department and Amnesty International , the latter of which named him a prisoner of conscience . Michá was active with the Progress Party of Equatorial Guinea ( PPGE ) , a banned political party opposing the long - dominant Democratic Party of Equatorial Guinea . In late March 2008 , he was arrested without a warrant . Within a week , fellow PPGE activists Cruz Obiang Ebele , Gumersindo Ramírez Faustino , Juan Ecomo Ndong , Gerardo Angüe Mangue , and Bonifacio Nguema Ndong were also arrested . Michá was held for two months at the police station , turning which time he was allegedly tortured . In May 2008 , the six men were charged with knowledge of a weapons cache in the home of another PPGE activist , Saturnino Ncogo . Ncogo had died in prison on early March in suspicious circumstances . Authorities alleged he had thrown himself from the top bunk of his cell to commit suicide , but relatives received his body in an advanced state of decomposition , and no investigation was ever conducted . According to Amnesty International , the six men were given an unfair trial at which no evidence was presented save the weapons from Ncogo 's home and the statements the six had made under duress ; in addition , the six defendants alleged that police had altered their statements after the defendants had signed them . Despite being charged with unrelated crimes , the six were tried alongside Simon Mann , a UK national who had helped to organize a 2004 coup attempt . The six PPGE members were given sentences of one to five years apiece . The US State Department considers Michá a political prisoner , and has objected to his continued imprisonment . Amnesty International named him a prisoner of conscience , and has called for his immediate release ."+ },+ {+ "filename": "redocred-002.txt",+ "title": "Latourell Falls",+ "text": "Latourell Falls\n\nLatourell Falls is a waterfall along the Columbia River Gorge in the U.S. state of Oregon , within Guy W. Talbot State Park . The Historic Columbia River Highway passes nearby , and at certain locations the Lower falls are visible from the road . Near the base of the falls , a parking lot and path were erected to assist visitors to the site . Visitors must hike along the loop trail to see the upper falls . Latourell is unique among the best - known Columbia Gorge waterfalls , in the way that it drops straight down from an overhanging basalt cliff . Most of those falls ( even the famous Multnomah Falls ) tumble to some degree . Latourell Falls is an excellent example of columnar basalt formations ."+ },+ {+ "filename": "redocred-003.txt",+ "title": "Low Pass, Oregon",+ "text": "Low Pass, Oregon\n\nLow Pass is an unincorporated community in Lane County , Oregon , United States , on the Long Tom River , east of Blachly and west of Cheshire . The settlement is centered on a small pullout on Oregon Route 36 with a gas station / convenience store and a diner that serves as an unofficial community center for rural residents . The nearest recycling & waste facility is the Low Pass Transfer Station The settlement is named for its location on a slight rise approaching the foothills of the Coast Range mountains , in contrast to the nearby mountain pass High Pass . Much of the land west of Low Pass consists of old - growth forest owned by the Bureau of Land Management . The community has also been known as \" Long Tom Station \" after the nearby river ; the name Low Pass was made official by a United States Board on Geographic Names decision of 1985 ."+ },+ {+ "filename": "redocred-004.txt",+ "title": "List of Paraguayan women writers",+ "text": "List of Paraguayan women writers\n\nThis is a list of women writers who were born in Paraguay or whose writings are closely associated with that country . Dora Acuña ( 1903 – 1987 ) , poet , journalist , radio presenter Gladys Carmagnola ( born 1939 ) , acclaimed poet , works for adults and children Raquel Chaves ( born 1939 ) , poet , journalist , educator Susy Delgado ( born 1949 ) , poet , writes in Spanish and Guarani Renée Ferrer de Arréllaga ( born 1944 ) , poet , novelist Josefina Pla ( 1903 – 1999 ) , Spanish - born Paraguayan poet , playwright , critic , journalist Mercedes Sandoval de Hempel ( 1919 – 2005 ) , lawyer , feminist , legal writings Carmen Soler ( 1924 – 1985 ) , poet , educator , moved to Argentina Elsa Wiezell ( 1926 – 2014 ) , poet , teacher , artist Faith Wilding ( born 1943 ) , Paraguayan - American feminist artist , non - fiction writer , educator"+ },+ {+ "filename": "redocred-005.txt",+ "title": "Each Time You Break My Heart",+ "text": "Each Time You Break My Heart\n\n\" Each Time You Break My Heart \" is a song recorded by British singer Nick Kamen , for his eponymous debut studio album ( 1987 ) . It was released by Sire Records on 2 November 1986 as his debut single in 7-inch and 12-inch maxi formats . Kamen had gained popularity by starring in a 1985 Levi 's television commercial , later deciding to delve into music business and signed a record deal with Sire . \" Each Time You Break My Heart \" was the lead single from his album , written and produced by Madonna and Stephen Bray . It was originally set to be included on Madonna 's third studio album , True Blue ( 1986 ) , but failed to make the final track list . Madonna also provided background vocals on the track . A promotional video to accompany the single was directed by Jean - Baptiste Mondino . The synth - pop song was featured in Billboard magazine 's \" New and Noteworthy \" single list , receiving comparison to songs by the Bee Gees . It was a commercial success , reaching the top ten of the record charts in France , Germany , Ireland , Italy , Netherlands , Sweden , Switzerland and the United Kingdom . It attained Silver certification in France and the United Kingdom , and a remix of the track became a dance hit in the United States ."+ },+ {+ "filename": "redocred-006.txt",+ "title": "Walter Newman (screenwriter)",+ "text": "Walter Newman (screenwriter)\n\nWalter Newman ( 11 February 1916 – 14 October 1993 ) was an American radio writer and screenwriter active from the late 1940s to the early 1990s . He was nominated three times for Academy Awards ( Ace in the Hole , Cat Ballou , and Bloodbrothers ) , but he is best - known for a work that never made it to the screen : his unproduced original script Harrow Alley , which \" has achieved legendary status in Hollywood . \" Newman 's radio writing included scripts for Escape , Suspense , and The Halls of Ivy as well as the first broadcast episode of Gunsmoke . He is not officially credited for his screenplays for The Magnificent Seven and The Great Escape , having renounced credit after sharp disagreements with the director , John Sturges in both cases , over changes made during shooting . Newman was born in New York City . He died in Sherman Oaks , California , a suburb of Los Angeles , on 14 October 1993 ."+ },+ {+ "filename": "redocred-007.txt",+ "title": "Eclipse (Meyer novel)",+ "text": "Eclipse (Meyer novel)\n\nEclipse is the third novel in the Twilight Saga by Stephenie Meyer . It continues the story of Bella Swan and her vampire love , Edward Cullen . The novel explores Bella 's compromise between her love for Edward and her friendship with shape - shifter Jacob Black , along with her dilemma of leaving her mortality behind in a terrorized atmosphere , a result of mysterious vampire attacks in Seattle . Eclipse is preceded by New Moon and followed by Breaking Dawn . The book was released on August 7 , 2007 , with an initial print run of one million copies , and sold more than 150,000 copies in the first 24 hours alone . Eclipse was the fourth bestselling book of 2008 , only behind Twilight , New Moon , and Breaking Dawn . A was released on June 30 , 2010 . Eclipse received generally positive reviews . Critics noted its exploration of more mature themes than those of its predecessors , while praising the novel 's love triangle and plotting ."+ },+ {+ "filename": "redocred-008.txt",+ "title": "Jon A. Lund",+ "text": "Jon A. Lund\n\nJon A. Lund ( born November 6 , 1928 ) is an American attorney and politician from Maine . Lund , a Republican , served as Maine Attorney General from 1972 – 1975 . Prior to his time as the first full - time attorney general in Maine history , Lund was an assistant country attorney for Kennebec County , member of the Augusta City Council and two - time county attorney for Kennebec County . He was also elected to the Maine House of Representatives ( 1965 – 1966 ; 1969 – 1972 ) and Maine Senate ( 1967 – 1968 ) . During his time as attorney general , Lund took prominent stances on many controversial issues affecting Maine at the time , even though some were outside of the jurisdiction of his office . Among these stances included opposition to the proposed Dickey - Lincoln Dam in Northern Maine , which he opposed on environmental grounds . The project was eventually stopped in 1984 . Lund is a graduate of Bowdoin College and Harvard Law School ."+ },+ {+ "filename": "redocred-009.txt",+ "title": "Zamoyski Palace",+ "text": "Zamoyski Palace\n\nZamoyski Palace ( Polish : Pałac Zamoyskich ) - a historical building , located by Nowy Świat Street in Warsaw , Poland . From 1667 the owner of the plot was Jan Wielopolski . Between 1744 and 1745 the inheritors of Wielopolski 's possessions reconstructed the palace following designs of architect Piotr Hiż . The owner of the building soon became Franciszek Ksawery Branicki , who commissioned renovation work under Szymon Bogumił Zug . In 1802 the palace was bought by Anna Jadwiga Sapieżyna . Stanisław Staszic would live in the palace until he died there in 1826 . In 1839 the palace became property of Andrzej Artur Zamoyski . The new owner commissioned reconstruction works headed by architect Enrico Marconi which gave the building 's present nature . During the January Uprising of 1863 , the house was plundered by the Imperial Army . During the interwar period the building housed the Ministry of Interior and Administration ( Poland ) . The palace was damaged during the Warsaw Uprising and rebuilt between 1948 and 1950 without modifying its architectural design . Presently , the palace houses the Faculty of Journalism and Politics of the University of Warsaw , the Institute of Applied Social Sciences , \" Artes - Liberales \" Faculty , Institute for Scientific Information and Bibliographic Studies of the Historical Faculty of the University of Warsaw ."+ },+ {+ "filename": "redocred-010.txt",+ "title": "Auguste Dreyfus",+ "text": "Auguste Dreyfus\n\nAuguste Dreyfus ( 28 June 1827 – 25 May 1897 ) was a French businessman who made his fortune by financing the Peruvian trade in guano . Dreyfus joined a small textile trading firm set up by three of his elder brothers and moved to Lima , Peru to act as their local representative . He became involved in the guano trade , and in 1869 signed a major contract with the Peruvian government that gave him a monopoly over exports of Peruvian guano to Europe . With this he controlled the largest source of Peruvian national income . The Peruvian government let Dreyfus act as their agent in managing their existing debt and floating new loans used for railway construction . The government ran into increasing financial difficulties . These were compounded by a war with Chile between 1879 and 1883 in which they lost their key guano - producing province . A lengthy series of lawsuits followed between the creditors whose loans were secured by guano deposits and the governments of Peru and Chile . The Dreyfus trading enterprise came to an end . He retired to France , where he owned a chateau in the country and a mansion in Paris that he filled with a major collection of art ."+ },+ {+ "filename": "redocred-011.txt",+ "title": "Ernst-Ludwig Schwandner",+ "text": "Ernst-Ludwig Schwandner\n\nErnst - Ludwig Schwandner ( born 2 June 1938 in Berlin ) is a German architecture historian and classical archaeologist . Schwandner received his doctorate in 1975 from the Technischen Universität München ( Germany ) with a thesis on the older temple of Aphaia on Aegina ( German title : Der Ältere Tempel der Aphaia auf Aegina ) under the supervision of . Until his retirement in 2004 , Schwandner held the post of director of the architecture department of the German Archaeological Institute ( federal German archeological survey ) in Berlin . In 2002 he joined the faculty at the Winkelmann Institute of the Humboldt University Berlin as adjunct professor ( \" Honorarprofessor \" ) . The focus of Schwandner 's research is the architectural history of ancient Greek architecture ."+ },+ {+ "filename": "redocred-012.txt",+ "title": "John H. Furse",+ "text": "John H. Furse\n\nJohn Houseal Furse ( 20 April 1880 – 30 September 1907 ) was an officer in the United States Navy , whose active service lasted from 1901 until his death at sea in 1907 . Furse , born 20 April 1880 in South Carolina , was a member of the United States Naval Academy class of 1901 . His first service was on the Asiatic Station , where he served in Manila during a scientific expedition , as well as in other ships . Returning to the United States , he joined Illinois ( BB-7 ) 29 September 1904 , and in her served in Cuban waters . Lieutenant Furse died on board Illinois 30 September 1907 , of injuries received fighting a storm which threatened his ship ."+ },+ {+ "filename": "redocred-013.txt",+ "title": "Lombardia (wine)",+ "text": "Lombardia (wine)\n\nLombardia ( Lombardy ) wine is the Italian wine produced in the Lombardy region of north central Italy . The region is known particularly for its sparkling wines made in the Franciacorta and Oltrepò Pavese areas . Lombardy also produces still red , white and rosé wines made from a variety of local and international grapes including Nebbiolo wines in the Valtellina region , Trebbiano di Lugana white wines produced with the Chiaretto style rosé along the shores of Lake Garda . The wine region currently has 15 Denominazione di origine controllata ( DOC ) , 3 Denominazione di Origine Controllata e Garantita ( DOCG ) and 13 Indicazione Geografica Tipica ( IGT ) designations . The main cities of the region are Milan , Bergamo and Brescia . The region annually produces around 1.3 million hectolitres of wine , more than the regions of Friuli - Venezia Giulia , Marche , Trentino - Alto Adige / Südtirol and Umbria ."+ },+ {+ "filename": "redocred-014.txt",+ "title": "Paul Pfeifer",+ "text": "Paul Pfeifer\n\nPaul E. Pfeifer ( born October 15 , 1942 ) is an American jurist . He served in both houses of the Ohio General Assembly as a member of the Ohio Republican party and was most recently an Associate Justice of the Supreme Court of Ohio . Pfeifer was born in Bucyrus in 1942 . He grew up on his family 's dairy farm near Bucyrus . As a teenager , he raised purebred Yorkshire hogs to finance his college education . He earned a bachelor of arts degree in economics , political science , and history in 1963 from Ohio State University . In 1966 , he also earned a law degree from the College of Law . Pfeifer owns a cattle farm in Crawford County , near his childhood home . Pfeifer and his wife Julia have three children and four grandchildren ."+ },+ {+ "filename": "redocred-015.txt",+ "title": "Lavaca Bay",+ "text": "Lavaca Bay\n\nLavaca Bay ( ) is a northwestern extension of the Matagorda Bay system found mostly in Calhoun County , Texas , United States . The ports of Port Lavaca and Point Comfort have been established on the bay , and are the main areas of human habitation . Linnville was located on the bay until its abandonment after the Great Raid of 1840 , and the major port of Indianola was found near the confluence with the main Matagorda Bay , until the town 's final destruction following the massive hurricane of 1886 . Smaller communities include Olivia , Alamo Beach and Magnolia Beach . Lavaca Bay is approximately northeast of Corpus Christi , about southwest of Houston , and southeast of San Antonio . The bay is noted for its superfund site , caused by mercury pollution from the heavy industry in Point Comfort ( specifically Alcoa ) , across the bay from the largest settlement of Port Lavaca . Although fishing has declined in recent years due to fears of contamination , the bay supports a large finfish population , and the efforts of environmental organizations and the federal government have pressured Alcoa to reduce the polluted areas ."+ },+ {+ "filename": "redocred-016.txt",+ "title": "Cine-Allianz",+ "text": "Cine-Allianz\n\nCine - Allianz Tonfilm was a German film production company established in 1932 by Arnold Pressburger and Gregor Rabinovitch . The company specalised in co - productions targeted at international markets , and enjoyed immediate success during the final year of the Weimar Republic . During the Nazi era the company 's Jewish owners came under increasing pressure from the government and their property was expropriated . They were forced into exile , while Cine - Allianz continued to produce films under the Nazi regime until its merger with UFA in 1942 . Rabinovitch went into exile in France where he set up a fresh production company also named Cine - Allianz which produced films such as I Was an Adventuress ( 1938 ) . The 1951 film The Lost One was partly financed by money received as post - war compensation for the loss of Cine - Allianz ."+ },+ {+ "filename": "redocred-017.txt",+ "title": "Drum Boogie",+ "text": "Drum Boogie\n\nDrum Boogie is a 1941 jazz \" boogie - woogie \" standard , composed by Gene Krupa and trumpeter Roy Eldridge and originally sung by Irene Daye , soon replaced by Anita O'Day . It was first recorded on January 17 , 1941 in Chicago and was also featured in a film that year , Ball of Fire , performed by Krupa and his band in an extended version , when it was sung by Barbara Stanwyck , whose singing was dubbed by Martha Tilton . In 1942 , Ella Fitzgerald sang the song on tour with the Gene Krupa Orchestra . In 1953 , Gene Krupa played the song at the US - operated Ernie Pyle Theatre in Tokyo , which \" brought the house down \" according to The Pittsburgh Courier ."+ },+ {+ "filename": "redocred-018.txt",+ "title": "Chicualacuala District",+ "text": "Chicualacuala District\n\nChicualacuala District ( Portuguese : Distrito de Chicualacuala ) is a district of Gaza Province in south - western Mozambique . It has a population of 41,638 ( 2011 ) and covers . The population density of Chicualacuala District 2.1 residents per square kilometers , significantly lower than the average of 17.5 in Gaza Province . The district seat is the town of Chicualacuala . Chicuacuala District is bordered to the north by the Massangena District , to the east by Chigubo District , to the southwest by Mabalane District , to the south by Massingir District , to the southwest by South Africa , and to the northwest by Zimbabwe . It is home to several villages along the Limpopo River including Dumela , Mbuzi , Kunguma , Mawene , Xicumba , Xicumbane , Ngala , Panhame , Mabuzane , and Xitshutswini . Chicuacuala District has four health centers ; the single hospital in the province is located outside the district . The district also lacks a bank ."+ },+ {+ "filename": "redocred-019.txt",+ "title": "John Schofield (VC)",+ "text": "John Schofield (VC)\n\nJohn Schofield VC ( 4 March 1892 – 9 April 1918 ) was an English recipient of the Victoria Cross , the highest and most prestigious award for gallantry in the face of the enemy that can be awarded to British and Commonwealth forces . Before joining up , he attended Arnold School in Blackpool . Numerous memorials to his actions during the war can be found in the school 's foyer and a plaque commemorating his VC can be found outside the school 's memorial hall , inside of which the names of all the fallen old boys can be found . He was 26 years old , and a Temporary second lieutenant in the 2/5th Battalion , Lancashire Fusiliers , British Army during the First World War when the following deed took place for which he was awarded the VC . His Victoria Cross is displayed at the Fusilier Museum , Bury , England ."+ }+ ]+}\ No newline at end of filediff --git a/scripts/bench/truth/redocred-20.json b/scripts/bench/truth/redocred-20.jsonnew file mode 100644index 00000000..87a91367--- /dev/null+++ b/scripts/bench/truth/redocred-20.json@@ -0,0 +1,7025 @@+{+ "seed": 1,+ "docs": [+ {+ "filename": "redocred-000.txt",+ "entities": [+ {+ "names": [+ "Vladimir Mitrofanovich Orlov",+ "Orlov"+ ],+ "type": "PER"+ },+ {+ "names": [+ "July 15 , 1895"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "July 28 , 1938"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Russian"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Soviet Naval Forces"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "July 1931"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "July 1937"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Kherson"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Legal"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "St Petersburg University"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Baltic Fleet"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "1916"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Bogatyr"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "1919"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "20"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Nikolai Yudenich"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Petrograd"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "the 1920s"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "1923"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "1926"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "1930"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Black Sea Fleet"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "1931"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Soviet Navy"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "1937",+ "10 July 1937"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "28 July 1938"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "1956"+ ],+ "type": "TIME"+ }+ ],+ "facts": [+ {+ "h": 0,+ "r": "P69",+ "t": 9,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P570",+ "t": 25,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P19",+ "t": 7,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P569",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P570",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P241",+ "t": 23,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P241",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 21,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 9,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 12,+ "r": "P137",+ "t": 10,+ "same_sentence": true+ },+ {+ "h": 10,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 23,+ "r": "P361",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P241",+ "t": 10,+ "same_sentence": false+ },+ {+ "h": 4,+ "r": "P17",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P27",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 7,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 16,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 4,+ "r": "P527",+ "t": 23,+ "same_sentence": false+ },+ {+ "h": 3,+ "r": "P150",+ "t": 16,+ "same_sentence": false+ },+ {+ "h": 23,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 16,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 10,+ "r": "P361",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 21,+ "r": "P361",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 4,+ "r": "P527",+ "t": 10,+ "same_sentence": false+ },+ {+ "h": 4,+ "r": "P527",+ "t": 21,+ "same_sentence": false+ },+ {+ "h": 21,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 9,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 10,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 4,+ "r": "P131",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 7,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 23,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ }+ ]+ },+ {+ "filename": "redocred-001.txt",+ "entities": [+ {+ "names": [+ "Emiliano Esono Michá",+ "Michá"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Equatoguinean"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "US State Department"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Amnesty International"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Progress Party of Equatorial Guinea",+ "PPGE"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Democratic Party of Equatorial Guinea"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "March 2008"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Cruz Obiang Ebele"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Gumersindo Ramírez Faustino"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Juan Ecomo Ndong"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Gerardo Angüe Mangue"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Bonifacio Nguema Ndong"+ ],+ "type": "PER"+ },+ {+ "names": [+ "two months"+ ],+ "type": "NUM"+ },+ {+ "names": [+ "May 2008"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "six"+ ],+ "type": "NUM"+ },+ {+ "names": [+ "Saturnino Ncogo",+ "Ncogo"+ ],+ "type": "PER"+ },+ {+ "names": [+ "March"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Simon Mann"+ ],+ "type": "PER"+ },+ {+ "names": [+ "UK"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "2004"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "one"+ ],+ "type": "NUM"+ },+ {+ "names": [+ "five years"+ ],+ "type": "NUM"+ }+ ],+ "facts": [+ {+ "h": 0,+ "r": "P27",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P102",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 4,+ "r": "P17",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 5,+ "r": "P17",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P27",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P102",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 8,+ "r": "P27",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 8,+ "r": "P102",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 9,+ "r": "P27",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 9,+ "r": "P102",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 10,+ "r": "P102",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 11,+ "r": "P102",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 17,+ "r": "P27",+ "t": 18,+ "same_sentence": true+ },+ {+ "h": 15,+ "r": "P102",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 11,+ "r": "P27",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 15,+ "r": "P27",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 15,+ "r": "P570",+ "t": 6,+ "same_sentence": false+ },+ {+ "h": 10,+ "r": "P27",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 8,+ "r": "P463",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 10,+ "r": "P463",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 7,+ "r": "P463",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P463",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 9,+ "r": "P463",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 11,+ "r": "P463",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 15,+ "r": "P463",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 15,+ "r": "P570",+ "t": 16,+ "same_sentence": true+ },+ {+ "h": 4,+ "r": "P131",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 5,+ "r": "P131",+ "t": 1,+ "same_sentence": false+ }+ ]+ },+ {+ "filename": "redocred-002.txt",+ "entities": [+ {+ "names": [+ "Latourell Falls"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Columbia River Gorge"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "U.S."+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Oregon"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Guy W. Talbot State Park"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Historic Columbia River Highway"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Latourell"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Columbia Gorge waterfalls"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Multnomah Falls"+ ],+ "type": "LOC"+ }+ ],+ "facts": [+ {+ "h": 1,+ "r": "P17",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 1,+ "r": "P131",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 2,+ "r": "P150",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P131",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P17",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 4,+ "r": "P17",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 4,+ "r": "P131",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 5,+ "r": "P17",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P17",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 8,+ "r": "P17",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P17",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P131",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 6,+ "r": "P17",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 8,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 5,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 6,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P361",+ "t": 7,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P527",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 1,+ "r": "P131",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 4,+ "r": "P131",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 5,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 8,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P131",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 6,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ }+ ]+ },+ {+ "filename": "redocred-003.txt",+ "entities": [+ {+ "names": [+ "Low Pass"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Lane County"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Oregon"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "United States"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Long Tom River"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Blachly"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Cheshire"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Oregon Route 36"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Low Pass Transfer Station"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Coast Range"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "High Pass"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Bureau of Land Management"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Long Tom Station"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "United States Board on Geographic Names"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "1985"+ ],+ "type": "TIME"+ }+ ],+ "facts": [+ {+ "h": 1,+ "r": "P131",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 1,+ "r": "P17",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 2,+ "r": "P150",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P150",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 8,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P131",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P17",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 13,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P1001",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 2,+ "r": "P131",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 9,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 12,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 6,+ "r": "P131",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 4,+ "r": "P131",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 9,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 6,+ "r": "P17",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 10,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 4,+ "r": "P17",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 5,+ "r": "P131",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 5,+ "r": "P131",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 8,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 5,+ "r": "P17",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 2,+ "r": "P17",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 12,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 10,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 10,+ "r": "P361",+ "t": 9,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P131",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 10,+ "r": "P706",+ "t": 9,+ "same_sentence": true+ },+ {+ "h": 6,+ "r": "P131",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 9,+ "r": "P527",+ "t": 10,+ "same_sentence": true+ },+ {+ "h": 1,+ "r": "P131",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 8,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P131",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 13,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 9,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 6,+ "r": "P131",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 4,+ "r": "P131",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 5,+ "r": "P131",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 12,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 10,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ }+ ]+ },+ {+ "filename": "redocred-004.txt",+ "entities": [+ {+ "names": [+ "Paraguay",+ "Paraguayan"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Dora Acuña"+ ],+ "type": "PER"+ },+ {+ "names": [+ "1903"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "1987"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Gladys Carmagnola"+ ],+ "type": "PER"+ },+ {+ "names": [+ "1939"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Raquel Chaves"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Susy Delgado"+ ],+ "type": "PER"+ },+ {+ "names": [+ "1949"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Spanish"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Guarani"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Renée Ferrer de Arréllaga"+ ],+ "type": "PER"+ },+ {+ "names": [+ "1944"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Josefina Pla"+ ],+ "type": "PER"+ },+ {+ "names": [+ "1999"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Spanish"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Mercedes Sandoval de Hempel"+ ],+ "type": "PER"+ },+ {+ "names": [+ "1919"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "2005"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Carmen Soler"+ ],+ "type": "PER"+ },+ {+ "names": [+ "1924"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "1985"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Argentina"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Elsa Wiezell"+ ],+ "type": "PER"+ },+ {+ "names": [+ "1926"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "2014"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Faith Wilding"+ ],+ "type": "PER"+ },+ {+ "names": [+ "1943"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "American"+ ],+ "type": "LOC"+ }+ ],+ "facts": [+ {+ "h": 1,+ "r": "P27",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 1,+ "r": "P569",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 1,+ "r": "P570",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 4,+ "r": "P569",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 4,+ "r": "P27",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 6,+ "r": "P569",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 6,+ "r": "P27",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P569",+ "t": 8,+ "same_sentence": true+ },+ {+ "h": 7,+ "r": "P27",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P1412",+ "t": 9,+ "same_sentence": true+ },+ {+ "h": 7,+ "r": "P1412",+ "t": 10,+ "same_sentence": true+ },+ {+ "h": 11,+ "r": "P569",+ "t": 12,+ "same_sentence": true+ },+ {+ "h": 11,+ "r": "P27",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 13,+ "r": "P27",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 13,+ "r": "P569",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 13,+ "r": "P570",+ "t": 14,+ "same_sentence": true+ },+ {+ "h": 19,+ "r": "P27",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 19,+ "r": "P569",+ "t": 20,+ "same_sentence": true+ },+ {+ "h": 19,+ "r": "P570",+ "t": 21,+ "same_sentence": true+ },+ {+ "h": 23,+ "r": "P27",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 23,+ "r": "P569",+ "t": 24,+ "same_sentence": true+ },+ {+ "h": 23,+ "r": "P570",+ "t": 25,+ "same_sentence": true+ },+ {+ "h": 16,+ "r": "P27",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 16,+ "r": "P569",+ "t": 17,+ "same_sentence": true+ },+ {+ "h": 16,+ "r": "P570",+ "t": 18,+ "same_sentence": true+ },+ {+ "h": 26,+ "r": "P569",+ "t": 27,+ "same_sentence": true+ },+ {+ "h": 26,+ "r": "P27",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 13,+ "r": "P1412",+ "t": 9,+ "same_sentence": false+ }+ ]+ },+ {+ "filename": "redocred-005.txt",+ "entities": [+ {+ "names": [+ "Each Time You Break My Heart"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "United Kingdom",+ "British"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Nick Kamen",+ "Kamen"+ ],+ "type": "PER"+ },+ {+ "names": [+ "1987"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Sire Records"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "2 November 1986",+ "1986"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "7-inch"+ ],+ "type": "NUM"+ },+ {+ "names": [+ "12-inch"+ ],+ "type": "NUM"+ },+ {+ "names": [+ "1985"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Levi 's"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Sire"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Madonna"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Stephen Bray"+ ],+ "type": "PER"+ },+ {+ "names": [+ "True Blue"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Jean-Baptiste Mondino"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Billboard magazine"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "New and Noteworthy"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Bee Gees"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "France"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Germany"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Ireland"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Italy"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Netherlands"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Sweden"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Switzerland"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "the United Kingdom"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "United States"+ ],+ "type": "LOC"+ }+ ],+ "facts": [+ {+ "h": 0,+ "r": "P175",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P264",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P577",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P264",+ "t": 10,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P162",+ "t": 11,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P86",+ "t": 11,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P86",+ "t": 12,+ "same_sentence": true+ },+ {+ "h": 2,+ "r": "P264",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P264",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P264",+ "t": 10,+ "same_sentence": false+ },+ {+ "h": 13,+ "r": "P162",+ "t": 11,+ "same_sentence": true+ },+ {+ "h": 13,+ "r": "P175",+ "t": 11,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P577",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 13,+ "r": "P577",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 2,+ "r": "P27",+ "t": 25,+ "same_sentence": false+ },+ {+ "h": 2,+ "r": "P27",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 14,+ "r": "P27",+ "t": 18,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P162",+ "t": 12,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P175",+ "t": 11,+ "same_sentence": true+ },+ {+ "h": 2,+ "r": "P800",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 11,+ "r": "P800",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 12,+ "r": "P800",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 11,+ "r": "P800",+ "t": 13,+ "same_sentence": true+ }+ ]+ },+ {+ "filename": "redocred-006.txt",+ "entities": [+ {+ "names": [+ "Walter Newman",+ "Newman"+ ],+ "type": "PER"+ },+ {+ "names": [+ "11 February 1916"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "14 October 1993"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "American"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "the late 1940s"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "the early 1990s"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "three"+ ],+ "type": "NUM"+ },+ {+ "names": [+ "Academy Awards"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Ace in the Hole"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Cat Ballou"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Bloodbrothers"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Harrow Alley"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Hollywood"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Escape"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Suspense"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "The Halls of Ivy"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Gunsmoke"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "The Magnificent Seven"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "The Great Escape"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "John Sturges"+ ],+ "type": "PER"+ },+ {+ "names": [+ "New York City"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Sherman Oaks"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "California"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Los Angeles"+ ],+ "type": "LOC"+ }+ ],+ "facts": [+ {+ "h": 0,+ "r": "P569",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P20",+ "t": 21,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P570",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P27",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 20,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 21,+ "r": "P131",+ "t": 23,+ "same_sentence": true+ },+ {+ "h": 11,+ "r": "P495",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 13,+ "r": "P495",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 14,+ "r": "P495",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 15,+ "r": "P495",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 16,+ "r": "P495",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 17,+ "r": "P57",+ "t": 19,+ "same_sentence": true+ },+ {+ "h": 8,+ "r": "P58",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 13,+ "r": "P58",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P20",+ "t": 23,+ "same_sentence": false+ },+ {+ "h": 9,+ "r": "P58",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P20",+ "t": 22,+ "same_sentence": false+ },+ {+ "h": 17,+ "r": "P58",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 3,+ "r": "P150",+ "t": 22,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P19",+ "t": 20,+ "same_sentence": true+ },+ {+ "h": 18,+ "r": "P58",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P58",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 22,+ "r": "P150",+ "t": 23,+ "same_sentence": true+ },+ {+ "h": 11,+ "r": "P50",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 21,+ "r": "P131",+ "t": 22,+ "same_sentence": true+ },+ {+ "h": 18,+ "r": "P57",+ "t": 19,+ "same_sentence": true+ },+ {+ "h": 10,+ "r": "P58",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 13,+ "r": "P50",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 23,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 21,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 23,+ "r": "P131",+ "t": 22,+ "same_sentence": true+ },+ {+ "h": 22,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 14,+ "r": "P58",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 15,+ "r": "P58",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 15,+ "r": "P50",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 16,+ "r": "P58",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 10,+ "r": "P31",+ "t": 7,+ "same_sentence": true+ },+ {+ "h": 9,+ "r": "P31",+ "t": 7,+ "same_sentence": true+ },+ {+ "h": 22,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 8,+ "r": "P31",+ "t": 7,+ "same_sentence": true+ },+ {+ "h": 12,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 19,+ "r": "P800",+ "t": 17,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P800",+ "t": 11,+ "same_sentence": false+ },+ {+ "h": 19,+ "r": "P800",+ "t": 18,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P800",+ "t": 13,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P800",+ "t": 15,+ "same_sentence": true+ },+ {+ "h": 20,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 23,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 21,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 12,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ }+ ]+ },+ {+ "filename": "redocred-007.txt",+ "entities": [+ {+ "names": [+ "Eclipse"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Twilight Saga"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Stephenie Meyer"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Bella Swan",+ "Bella"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Edward Cullen",+ "Edward"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Jacob Black"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Seattle"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "New Moon"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Breaking Dawn"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "August 7, 2007"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "one million copies"+ ],+ "type": "NUM"+ },+ {+ "names": [+ "150,000"+ ],+ "type": "NUM"+ },+ {+ "names": [+ "24 hours"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "2008"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Twilight"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "June 30, 2010"+ ],+ "type": "TIME"+ }+ ],+ "facts": [+ {+ "h": 0,+ "r": "P179",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P50",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P674",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P674",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P577",+ "t": 9,+ "same_sentence": false+ },+ {+ "h": 1,+ "r": "P527",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 1,+ "r": "P50",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 1,+ "r": "P674",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 1,+ "r": "P674",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 1,+ "r": "P674",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 1,+ "r": "P527",+ "t": 7,+ "same_sentence": false+ },+ {+ "h": 1,+ "r": "P527",+ "t": 8,+ "same_sentence": false+ },+ {+ "h": 2,+ "r": "P800",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P1441",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 3,+ "r": "P170",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 3,+ "r": "P26",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 4,+ "r": "P1441",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 4,+ "r": "P170",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 4,+ "r": "P26",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 5,+ "r": "P1441",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 5,+ "r": "P170",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P179",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P50",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P674",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 14,+ "r": "P179",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 14,+ "r": "P50",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 8,+ "r": "P155",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 8,+ "r": "P179",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 8,+ "r": "P50",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 8,+ "r": "P674",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 8,+ "r": "P155",+ "t": 7,+ "same_sentence": true+ },+ {+ "h": 14,+ "r": "P674",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 14,+ "r": "P674",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 1,+ "r": "P527",+ "t": 14,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P156",+ "t": 8,+ "same_sentence": true+ },+ {+ "h": 1,+ "r": "P170",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 2,+ "r": "P800",+ "t": 14,+ "same_sentence": false+ },+ {+ "h": 8,+ "r": "P674",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 3,+ "r": "P1441",+ "t": 14,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P840",+ "t": 6,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P674",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 2,+ "r": "P800",+ "t": 7,+ "same_sentence": false+ },+ {+ "h": 4,+ "r": "P1441",+ "t": 14,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P155",+ "t": 7,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P156",+ "t": 8,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P1441",+ "t": 7,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P156",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 2,+ "r": "P800",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P1441",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 4,+ "r": "P1441",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P361",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 7,+ "r": "P361",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 8,+ "r": "P361",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 2,+ "r": "P800",+ "t": 8,+ "same_sentence": false+ },+ {+ "h": 3,+ "r": "P1441",+ "t": 8,+ "same_sentence": false+ },+ {+ "h": 14,+ "r": "P361",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 4,+ "r": "P1441",+ "t": 8,+ "same_sentence": false+ },+ {+ "h": 4,+ "r": "P1441",+ "t": 7,+ "same_sentence": false+ }+ ]+ },+ {+ "filename": "redocred-008.txt",+ "entities": [+ {+ "names": [+ "Jon A. Lund"+ ],+ "type": "PER"+ },+ {+ "names": [+ "November 6, 1928"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "American"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Maine"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Lund"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Republican"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "1972"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "1975"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Kennebec County"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Augusta City Council"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "two"+ ],+ "type": "NUM"+ },+ {+ "names": [+ "Maine House of Representatives"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "1965"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "1966"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "1969"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Maine Senate"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "1967"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "1968"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Dickey - Lincoln Dam"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Northern Maine"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "1984"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Bowdoin College"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Harvard Law School"+ ],+ "type": "ORG"+ }+ ],+ "facts": [+ {+ "h": 0,+ "r": "P569",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P102",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P69",+ "t": 21,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P69",+ "t": 22,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P27",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 5,+ "r": "P17",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 3,+ "r": "P194",+ "t": 11,+ "same_sentence": false+ },+ {+ "h": 3,+ "r": "P131",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P17",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 8,+ "r": "P131",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 8,+ "r": "P17",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 9,+ "r": "P17",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P1001",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P17",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 15,+ "r": "P1001",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 15,+ "r": "P17",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 2,+ "r": "P150",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 2,+ "r": "P150",+ "t": 19,+ "same_sentence": false+ },+ {+ "h": 4,+ "r": "P463",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 18,+ "r": "P17",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 19,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 18,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 4,+ "r": "P69",+ "t": 21,+ "same_sentence": true+ },+ {+ "h": 4,+ "r": "P27",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 21,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 9,+ "r": "P131",+ "t": 8,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P150",+ "t": 8,+ "same_sentence": true+ },+ {+ "h": 4,+ "r": "P569",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 18,+ "r": "P131",+ "t": 19,+ "same_sentence": true+ },+ {+ "h": 21,+ "r": "P17",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 3,+ "r": "P194",+ "t": 15,+ "same_sentence": false+ },+ {+ "h": 19,+ "r": "P17",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 4,+ "r": "P69",+ "t": 22,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P150",+ "t": 9,+ "same_sentence": true+ },+ {+ "h": 5,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 8,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 9,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 15,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 18,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 21,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 19,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 9,+ "r": "P131",+ "t": 3,+ "same_sentence": true+ }+ ]+ },+ {+ "filename": "redocred-009.txt",+ "entities": [+ {+ "names": [+ "Zamoyski Palace"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Polish"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Pałac Zamoyskich"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Nowy Świat Street"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Warsaw"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Poland"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "1667"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Jan Wielopolski",+ "Wielopolski"+ ],+ "type": "PER"+ },+ {+ "names": [+ "1744"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "1745"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Piotr Hiż"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Franciszek Ksawery Branicki"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Szymon Bogumił Zug"+ ],+ "type": "PER"+ },+ {+ "names": [+ "1802"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Anna Jadwiga Sapieżyna"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Stanisław Staszic"+ ],+ "type": "PER"+ },+ {+ "names": [+ "1826"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "1839"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Andrzej Artur Zamoyski"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Enrico Marconi"+ ],+ "type": "PER"+ },+ {+ "names": [+ "January Uprising"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "1863"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Imperial Army"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Ministry of Interior and Administration"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Warsaw Uprising"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "1948"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "1950"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Faculty of Journalism and Politics"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "University of Warsaw"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Institute of Applied Social Sciences"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "\" Artes - Liberales \" Faculty"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Institute for Scientific Information"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Bibliographic Studies"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Historical Faculty of the University of Warsaw"+ ],+ "type": "ORG"+ }+ ],+ "facts": [+ {+ "h": 0,+ "r": "P17",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 4,+ "r": "P17",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 23,+ "r": "P17",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 29,+ "r": "P131",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 29,+ "r": "P17",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 3,+ "r": "P131",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P17",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 15,+ "r": "P20",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 15,+ "r": "P570",+ "t": 16,+ "same_sentence": true+ },+ {+ "h": 28,+ "r": "P131",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 24,+ "r": "P17",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 20,+ "r": "P585",+ "t": 21,+ "same_sentence": true+ },+ {+ "h": 28,+ "r": "P17",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P131",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 24,+ "r": "P276",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 24,+ "r": "P276",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 2,+ "r": "P17",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 18,+ "r": "P27",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 27,+ "r": "P17",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 4,+ "r": "P17",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 5,+ "r": "P37",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 2,+ "r": "P131",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 20,+ "r": "P580",+ "t": 21,+ "same_sentence": true+ },+ {+ "h": 33,+ "r": "P17",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 1,+ "r": "P17",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 33,+ "r": "P361",+ "t": 28,+ "same_sentence": true+ },+ {+ "h": 4,+ "r": "P131",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 15,+ "r": "P1412",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 15,+ "r": "P27",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 33,+ "r": "P131",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 27,+ "r": "P131",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 23,+ "r": "P1001",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 20,+ "r": "P276",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P127",+ "t": 11,+ "same_sentence": false+ },+ {+ "h": 2,+ "r": "P127",+ "t": 18,+ "same_sentence": false+ },+ {+ "h": 31,+ "r": "P17",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 30,+ "r": "P17",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P127",+ "t": 18,+ "same_sentence": false+ },+ {+ "h": 28,+ "r": "P527",+ "t": 33,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P131",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 23,+ "r": "P131",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 29,+ "r": "P131",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 3,+ "r": "P131",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 28,+ "r": "P131",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 2,+ "r": "P131",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 27,+ "r": "P131",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 33,+ "r": "P131",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 31,+ "r": "P131",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 30,+ "r": "P131",+ "t": 5,+ "same_sentence": false+ }+ ]+ },+ {+ "filename": "redocred-010.txt",+ "entities": [+ {+ "names": [+ "Auguste Dreyfus",+ "Dreyfus"+ ],+ "type": "PER"+ },+ {+ "names": [+ "28 June 1827"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "25 May 1897"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "French"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Peruvian"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Lima"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Peru"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "1869"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Europe"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Chile"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "1879"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "1883"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "France"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Paris"+ ],+ "type": "LOC"+ }+ ],+ "facts": [+ {+ "h": 0,+ "r": "P27",+ "t": 12,+ "same_sentence": false+ },+ {+ "h": 5,+ "r": "P17",+ "t": 6,+ "same_sentence": true+ },+ {+ "h": 5,+ "r": "P17",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 13,+ "r": "P131",+ "t": 12,+ "same_sentence": true+ },+ {+ "h": 13,+ "r": "P17",+ "t": 12,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P570",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 5,+ "r": "P131",+ "t": 6,+ "same_sentence": true+ },+ {+ "h": 6,+ "r": "P150",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P569",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 5,+ "r": "P131",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 13,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P27",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 4,+ "r": "P150",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 13,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ }+ ]+ },+ {+ "filename": "redocred-011.txt",+ "entities": [+ {+ "names": [+ "Schwandner",+ "Ernst-Ludwig Schwandner"+ ],+ "type": "PER"+ },+ {+ "names": [+ "2 June 1938"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Berlin"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "German"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "1975"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Technischen Universität München"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Germany"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Aphaia",+ "Der Ältere Tempel der Aphaia auf Aegina"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Aegina"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "German"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "2004"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "German Archaeological Institute",+ "federal German archeological survey"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "2002"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Winkelmann Institute"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Humboldt University"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Greek"+ ],+ "type": "LOC"+ }+ ],+ "facts": [+ {+ "h": 2,+ "r": "P17",+ "t": 6,+ "same_sentence": false+ },+ {+ "h": 2,+ "r": "P131",+ "t": 6,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P569",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P19",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P27",+ "t": 6,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P463",+ "t": 11,+ "same_sentence": true+ },+ {+ "h": 6,+ "r": "P150",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P131",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 11,+ "r": "P17",+ "t": 6,+ "same_sentence": false+ },+ {+ "h": 5,+ "r": "P17",+ "t": 6,+ "same_sentence": true+ },+ {+ "h": 7,+ "r": "P17",+ "t": 6,+ "same_sentence": true+ },+ {+ "h": 14,+ "r": "P131",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 14,+ "r": "P17",+ "t": 6,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P108",+ "t": 14,+ "same_sentence": false+ },+ {+ "h": 13,+ "r": "P17",+ "t": 6,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P108",+ "t": 11,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P69",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 2,+ "r": "P131",+ "t": 9,+ "same_sentence": false+ },+ {+ "h": 2,+ "r": "P131",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P937",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P108",+ "t": 13,+ "same_sentence": false+ },+ {+ "h": 6,+ "r": "P37",+ "t": 9,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P1412",+ "t": 9,+ "same_sentence": true+ },+ {+ "h": 13,+ "r": "P131",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 5,+ "r": "P17",+ "t": 9,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P150",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 11,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P131",+ "t": 6,+ "same_sentence": false+ },+ {+ "h": 5,+ "r": "P131",+ "t": 6,+ "same_sentence": true+ },+ {+ "h": 7,+ "r": "P131",+ "t": 6,+ "same_sentence": true+ },+ {+ "h": 14,+ "r": "P131",+ "t": 6,+ "same_sentence": false+ },+ {+ "h": 13,+ "r": "P131",+ "t": 6,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 14,+ "r": "P131",+ "t": 9,+ "same_sentence": false+ },+ {+ "h": 13,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P131",+ "t": 9,+ "same_sentence": false+ },+ {+ "h": 14,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 13,+ "r": "P131",+ "t": 9,+ "same_sentence": false+ }+ ]+ },+ {+ "filename": "redocred-012.txt",+ "entities": [+ {+ "names": [+ "John Houseal Furse",+ "Furse"+ ],+ "type": "PER"+ },+ {+ "names": [+ "20 April 1880"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "30 September 1907"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "United States Navy"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "1901"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "1907"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "South Carolina"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "United States Naval Academy"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Asiatic Station"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Manila"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "the United States"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Illinois"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Illinois ( BB-7 )"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "29 September 1904"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Cuban"+ ],+ "type": "LOC"+ }+ ],+ "facts": [+ {+ "h": 0,+ "r": "P569",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P241",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P27",+ "t": 10,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P570",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P17",+ "t": 10,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P17",+ "t": 10,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P137",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P570",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 11,+ "r": "P17",+ "t": 10,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P69",+ "t": 7,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P19",+ "t": 6,+ "same_sentence": true+ },+ {+ "h": 10,+ "r": "P150",+ "t": 6,+ "same_sentence": false+ },+ {+ "h": 8,+ "r": "P137",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 6,+ "r": "P131",+ "t": 10,+ "same_sentence": false+ },+ {+ "h": 10,+ "r": "P150",+ "t": 11,+ "same_sentence": true+ },+ {+ "h": 8,+ "r": "P17",+ "t": 10,+ "same_sentence": false+ },+ {+ "h": 6,+ "r": "P17",+ "t": 10,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P131",+ "t": 10,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P131",+ "t": 10,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P131",+ "t": 10,+ "same_sentence": false+ },+ {+ "h": 8,+ "r": "P131",+ "t": 10,+ "same_sentence": false+ }+ ]+ },+ {+ "filename": "redocred-013.txt",+ "entities": [+ {+ "names": [+ "Lombardia",+ "Lombardy"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Italy",+ "Italian"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Lombardy"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Franciacorta"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Oltrepò Pavese"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Nebbiolo"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Valtellina"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Trebbiano di Lugana"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Chiaretto"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Lake Garda"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "15"+ ],+ "type": "NUM"+ },+ {+ "names": [+ "Denominazione di origine controllata",+ "DOC"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "3"+ ],+ "type": "NUM"+ },+ {+ "names": [+ "Denominazione di Origine Controllata e Garantita",+ "DOCG"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "13"+ ],+ "type": "NUM"+ },+ {+ "names": [+ "Indicazione Geografica Tipica",+ "IGT"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Milan"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Bergamo"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Brescia"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "1.3 million"+ ],+ "type": "NUM"+ },+ {+ "names": [+ "Friuli-Venezia Giulia"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Marche"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Trentino - Alto Adige / Südtirol"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Umbria"+ ],+ "type": "LOC"+ }+ ],+ "facts": [+ {+ "h": 2,+ "r": "P131",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 2,+ "r": "P17",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 1,+ "r": "P150",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 3,+ "r": "P17",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 16,+ "r": "P17",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P17",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 4,+ "r": "P17",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 17,+ "r": "P17",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 18,+ "r": "P17",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P17",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 20,+ "r": "P131",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 9,+ "r": "P17",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 1,+ "r": "P150",+ "t": 23,+ "same_sentence": false+ },+ {+ "h": 1,+ "r": "P150",+ "t": 21,+ "same_sentence": false+ },+ {+ "h": 1,+ "r": "P150",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 23,+ "r": "P131",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 6,+ "r": "P17",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 1,+ "r": "P150",+ "t": 20,+ "same_sentence": false+ },+ {+ "h": 23,+ "r": "P17",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P131",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 21,+ "r": "P17",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 21,+ "r": "P131",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 20,+ "r": "P17",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 5,+ "r": "P17",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 3,+ "r": "P131",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 9,+ "r": "P150",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 6,+ "r": "P131",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 9,+ "r": "P150",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 16,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 9,+ "r": "P131",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 6,+ "r": "P131",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 9,+ "r": "P131",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 8,+ "r": "P17",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 2,+ "r": "P150",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 4,+ "r": "P131",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 16,+ "r": "P131",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 1,+ "r": "P150",+ "t": 6,+ "same_sentence": false+ },+ {+ "h": 9,+ "r": "P205",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 4,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 1,+ "r": "P150",+ "t": 22,+ "same_sentence": false+ },+ {+ "h": 2,+ "r": "P150",+ "t": 16,+ "same_sentence": false+ },+ {+ "h": 3,+ "r": "P131",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 16,+ "r": "P131",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 4,+ "r": "P131",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 17,+ "r": "P131",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 18,+ "r": "P131",+ "t": 1,+ "same_sentence": false+ },+ {+ "h": 9,+ "r": "P131",+ "t": 1,+ "same_sentence": false+ }+ ]+ },+ {+ "filename": "redocred-014.txt",+ "entities": [+ {+ "names": [+ "Paul E. Pfeifer",+ "Pfeifer"+ ],+ "type": "PER"+ },+ {+ "names": [+ "October 15, 1942"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "American"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Ohio General Assembly"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Ohio Republican party"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Supreme Court of Ohio"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Bucyrus"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "1942"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Yorkshire"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "1963"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Ohio State University"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "1966"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "College of Law"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Crawford County"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Julia"+ ],+ "type": "PER"+ },+ {+ "names": [+ "three"+ ],+ "type": "NUM"+ },+ {+ "names": [+ "four"+ ],+ "type": "NUM"+ }+ ],+ "facts": [+ {+ "h": 0,+ "r": "P569",+ "t": 7,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P69",+ "t": 10,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P69",+ "t": 12,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P102",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P19",+ "t": 6,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P27",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P569",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 6,+ "r": "P17",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 12,+ "r": "P361",+ "t": 10,+ "same_sentence": false+ },+ {+ "h": 3,+ "r": "P17",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 12,+ "r": "P17",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 5,+ "r": "P17",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 10,+ "r": "P17",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 13,+ "r": "P17",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 4,+ "r": "P17",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 14,+ "r": "P26",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P26",+ "t": 14,+ "same_sentence": true+ },+ {+ "h": 10,+ "r": "P527",+ "t": 12,+ "same_sentence": false+ },+ {+ "h": 6,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 3,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 12,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 5,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 10,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 13,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 4,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ }+ ]+ },+ {+ "filename": "redocred-015.txt",+ "entities": [+ {+ "names": [+ "Lavaca Bay"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Matagorda Bay"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Calhoun County"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Texas"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "United States"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Port Lavaca"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Point Comfort"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Linnville"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Great Raid of 1840"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Indianola"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "1886"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Olivia"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Alamo Beach"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Magnolia Beach"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Corpus Christi"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Houston"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "San Antonio"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Alcoa"+ ],+ "type": "LOC"+ }+ ],+ "facts": [+ {+ "h": 1,+ "r": "P131",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 1,+ "r": "P17",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 2,+ "r": "P131",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 2,+ "r": "P17",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 2,+ "r": "P150",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 3,+ "r": "P150",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P131",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P17",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 4,+ "r": "P150",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 13,+ "r": "P17",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P17",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P131",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P17",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 12,+ "r": "P17",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 6,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 6,+ "r": "P17",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 5,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 5,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 5,+ "r": "P17",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 17,+ "r": "P17",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 12,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P131",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P403",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 16,+ "r": "P17",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 15,+ "r": "P17",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 13,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P17",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 14,+ "r": "P17",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 6,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 13,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 9,+ "r": "P17",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 12,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 9,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 1,+ "r": "P131",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 1,+ "r": "P131",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 2,+ "r": "P131",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 13,+ "r": "P131",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P131",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P131",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 12,+ "r": "P131",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 6,+ "r": "P131",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 5,+ "r": "P131",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 17,+ "r": "P131",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 16,+ "r": "P131",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 15,+ "r": "P131",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P131",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 14,+ "r": "P131",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 9,+ "r": "P131",+ "t": 4,+ "same_sentence": false+ },+ {+ "h": 9,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ }+ ]+ },+ {+ "filename": "redocred-016.txt",+ "entities": [+ {+ "names": [+ "Cine-Allianz Tonfilm",+ "Cine-Allianz",+ "Cine - Allianz"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "German"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "1932"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Arnold Pressburger"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Gregor Rabinovitch",+ "Rabinovitch"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Weimar Republic"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Nazi"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Jewish"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "UFA"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "1942"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "France"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "I Was an Adventuress"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "1938"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "1951"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "The Lost One"+ ],+ "type": "MISC"+ }+ ],+ "facts": [+ {+ "h": 5,+ "r": "P1366",+ "t": 6,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P495",+ "t": 10,+ "same_sentence": true+ },+ {+ "h": 11,+ "r": "P577",+ "t": 12,+ "same_sentence": true+ },+ {+ "h": 11,+ "r": "P272",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P571",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P112",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P112",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 14,+ "r": "P577",+ "t": 13,+ "same_sentence": true+ },+ {+ "h": 14,+ "r": "P272",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P576",+ "t": 9,+ "same_sentence": true+ },+ {+ "h": 11,+ "r": "P162",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P17",+ "t": 10,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P17",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P17",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 4,+ "r": "P27",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P27",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 6,+ "r": "P1365",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 4,+ "r": "P800",+ "t": 11,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P131",+ "t": 10,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P131",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P131",+ "t": 1,+ "same_sentence": true+ }+ ]+ },+ {+ "filename": "redocred-017.txt",+ "entities": [+ {+ "names": [+ "Drum Boogie"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "1941",+ "January 17, 1941"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "boogie - woogie"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Gene Krupa",+ "Krupa"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Roy Eldridge"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Irene Daye"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Anita O'Day"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Chicago"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Ball of Fire"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Barbara Stanwyck"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Martha Tilton"+ ],+ "type": "PER"+ },+ {+ "names": [+ "1942"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "Ella Fitzgerald"+ ],+ "type": "PER"+ },+ {+ "names": [+ "Gene Krupa Orchestra"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "1953"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "US"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Ernie Pyle Theatre"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Tokyo"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "The Pittsburgh Courier"+ ],+ "type": "ORG"+ }+ ],+ "facts": [+ {+ "h": 0,+ "r": "P577",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 8,+ "r": "P577",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 8,+ "r": "P161",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 8,+ "r": "P161",+ "t": 9,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P86",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 4,+ "r": "P136",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 6,+ "r": "P136",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P86",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 13,+ "r": "P136",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P136",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P27",+ "t": 15,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P175",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P136",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 18,+ "r": "P17",+ "t": 15,+ "same_sentence": true+ },+ {+ "h": 5,+ "r": "P136",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 16,+ "r": "P131",+ "t": 17,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P175",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P800",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 4,+ "r": "P800",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 5,+ "r": "P800",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 18,+ "r": "P131",+ "t": 15,+ "same_sentence": true+ }+ ]+ },+ {+ "filename": "redocred-018.txt",+ "entities": [+ {+ "names": [+ "Chicualacuala District",+ "Distrito de Chicualacuala",+ "Chicuacuala District",+ "Chicualacuala"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Portuguese"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Gaza Province"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Mozambique"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "41,638"+ ],+ "type": "NUM"+ },+ {+ "names": [+ "2011"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "2.1"+ ],+ "type": "NUM"+ },+ {+ "names": [+ "17.5"+ ],+ "type": "NUM"+ },+ {+ "names": [+ "Massangena District"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Chigubo District"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Mabalane District"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Massingir District"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "South Africa"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Zimbabwe"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Limpopo River"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Dumela"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Mbuzi"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Kunguma"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Mawene"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Xicumba"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Xicumbane"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Ngala"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Panhame"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Mabuzane"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Xitshutswini"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "four"+ ],+ "type": "NUM"+ }+ ],+ "facts": [+ {+ "h": 0,+ "r": "P131",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P17",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 2,+ "r": "P131",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 2,+ "r": "P17",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P150",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 8,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 8,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 9,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 9,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 14,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 15,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 21,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 10,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 10,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 16,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 19,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 20,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 22,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 23,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 24,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 17,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 18,+ "r": "P17",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 3,+ "r": "P150",+ "t": 10,+ "same_sentence": false+ },+ {+ "h": 3,+ "r": "P150",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P150",+ "t": 9,+ "same_sentence": false+ },+ {+ "h": 19,+ "r": "P131",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 15,+ "r": "P131",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 2,+ "r": "P150",+ "t": 9,+ "same_sentence": false+ },+ {+ "h": 2,+ "r": "P150",+ "t": 0,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P150",+ "t": 11,+ "same_sentence": false+ },+ {+ "h": 16,+ "r": "P131",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 2,+ "r": "P150",+ "t": 11,+ "same_sentence": false+ },+ {+ "h": 3,+ "r": "P150",+ "t": 8,+ "same_sentence": false+ },+ {+ "h": 2,+ "r": "P150",+ "t": 10,+ "same_sentence": false+ },+ {+ "h": 2,+ "r": "P150",+ "t": 8,+ "same_sentence": false+ },+ {+ "h": 20,+ "r": "P131",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 15,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 23,+ "r": "P131",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 19,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 20,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 21,+ "r": "P131",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 24,+ "r": "P131",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 18,+ "r": "P131",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 21,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 22,+ "r": "P131",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 2,+ "r": "P37",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 14,+ "r": "P17",+ "t": 13,+ "same_sentence": false+ },+ {+ "h": 23,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 18,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 22,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 24,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 17,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 17,+ "r": "P131",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 3,+ "r": "P37",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 16,+ "r": "P131",+ "t": 2,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P131",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 8,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 9,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 14,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 15,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 21,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 10,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 16,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 19,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 20,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 22,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 23,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 24,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 17,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 18,+ "r": "P131",+ "t": 3,+ "same_sentence": false+ },+ {+ "h": 14,+ "r": "P131",+ "t": 13,+ "same_sentence": false+ }+ ]+ },+ {+ "filename": "redocred-019.txt",+ "entities": [+ {+ "names": [+ "John Schofield VC"+ ],+ "type": "PER"+ },+ {+ "names": [+ "4 March 1892"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "9 April 1918"+ ],+ "type": "TIME"+ },+ {+ "names": [+ "England",+ "English"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "VC",+ "Victoria Cross"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "British"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Commonwealth"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Arnold School"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Blackpool"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "26"+ ],+ "type": "NUM"+ },+ {+ "names": [+ "2/5th Battalion"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "Lancashire Fusiliers"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "British Army"+ ],+ "type": "ORG"+ },+ {+ "names": [+ "First World War"+ ],+ "type": "MISC"+ },+ {+ "names": [+ "Fusilier Museum"+ ],+ "type": "LOC"+ },+ {+ "names": [+ "Bury"+ ],+ "type": "LOC"+ }+ ],+ "facts": [+ {+ "h": 8,+ "r": "P17",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 12,+ "r": "P17",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P166",+ "t": 4,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P569",+ "t": 1,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P570",+ "t": 2,+ "same_sentence": true+ },+ {+ "h": 4,+ "r": "P17",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 14,+ "r": "P17",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 14,+ "r": "P131",+ "t": 15,+ "same_sentence": true+ },+ {+ "h": 15,+ "r": "P17",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P241",+ "t": 12,+ "same_sentence": true+ },+ {+ "h": 11,+ "r": "P607",+ "t": 13,+ "same_sentence": true+ },+ {+ "h": 12,+ "r": "P607",+ "t": 13,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P607",+ "t": 13,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P131",+ "t": 8,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P27",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 3,+ "r": "P131",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 5,+ "r": "P463",+ "t": 6,+ "same_sentence": true+ },+ {+ "h": 5,+ "r": "P150",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P241",+ "t": 11,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P17",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 0,+ "r": "P69",+ "t": 7,+ "same_sentence": false+ },+ {+ "h": 3,+ "r": "P17",+ "t": 5,+ "same_sentence": true+ },+ {+ "h": 11,+ "r": "P17",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 15,+ "r": "P17",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 13,+ "r": "P710",+ "t": 11,+ "same_sentence": true+ },+ {+ "h": 13,+ "r": "P710",+ "t": 12,+ "same_sentence": true+ },+ {+ "h": 13,+ "r": "P710",+ "t": 0,+ "same_sentence": false+ },+ {+ "h": 8,+ "r": "P131",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 12,+ "r": "P131",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 14,+ "r": "P131",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 15,+ "r": "P131",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P1344",+ "t": 13,+ "same_sentence": true+ },+ {+ "h": 12,+ "r": "P1344",+ "t": 13,+ "same_sentence": true+ },+ {+ "h": 0,+ "r": "P1344",+ "t": 13,+ "same_sentence": false+ },+ {+ "h": 7,+ "r": "P131",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 11,+ "r": "P131",+ "t": 5,+ "same_sentence": false+ },+ {+ "h": 15,+ "r": "P131",+ "t": 3,+ "same_sentence": true+ },+ {+ "h": 14,+ "r": "P131",+ "t": 3,+ "same_sentence": true+ }+ ]+ }+ ]+}\ No newline at end of filediff --git a/scripts/bench/typed.mjs b/scripts/bench/typed.mjsindex b794cd0a..25934526 100644--- a/scripts/bench/typed.mjs+++ b/scripts/bench/typed.mjs@@ -89,7 +89,8 @@ async function setup() {const KB = kb.id;log(`新库 ${KB}(工作区 ${ws.id})`);// 本体固定:不让抽取长本体、不跑老的类型消解、不做公理派生;治理按产品默认- psql(`UPDATE knowledge_bases SET auto_extend_ontology=FALSE, auto_type_resolution=FALSE, materialize_inferences=FALSE WHERE id='${KB}'`);+ // 治理 agent(0025 的裁决)也关掉:它在第三轮里花了约 500 次调用,量的不是类型图+ psql(`UPDATE knowledge_bases SET auto_extend_ontology=FALSE, auto_type_resolution=FALSE, materialize_inferences=FALSE, governance=FALSE WHERE id='${KB}'`);const classId = {};for (const [t, [key, label, description]] of Object.entries(CLASSES)) {const r = await api("POST", `/api/v1/kbs/${KB}/ontology/entity-types`, { key, label, description, parents: [] });@@ -113,6 +114,16 @@ async function setup() {log(`本体:${Object.keys(CLASSES).length} 类,${ontology.properties.length} 属性(${attributes} 条是 attribute)`);// 建本体排下的对齐任务在语料到之前没意义,清掉,抽完再排psql(`DELETE FROM jobs WHERE kind IN ('align_types','align_phrases') AND payload->>'kb_id'='${KB}' AND status='queued'`);+ // 配了嵌入模型就先把属性的向量建好:对齐按它给候选开短名单,没向量就退回全部结构候选+ const embedModel = psql(`SELECT s.embed_model FROM llm_settings s JOIN knowledge_bases k ON k.workspace_id=s.workspace_id WHERE k.id='${KB}'`);+ if (embedModel) {+ psql(`INSERT INTO jobs (kind, payload) VALUES ('embed_ontology', '{"kb_id":"${KB}"}')`);+ await until(() => {+ const missing = num(`SELECT count(*) FROM relation_types WHERE kb_id='${KB}' AND NOT builtin AND embedding IS NULL`);+ log(`属性向量:还差 ${missing}`);+ return missing === 0 ? true : missing;+ }, 5000, 10 * 60000);+ }return KB;}@@ -234,7 +245,8 @@ async function judgeRetracted(KB) {const byFile = new Map();for (const r of all) (byFile.get(r[1]) || byFile.set(r[1], []).get(r[1])).push(r);const counts = { stated: 0, misworded: 0, not_stated: 0, unjudged: 0 };- for (const [file, items] of byFile) {+ // 一篇一次裁判调用,四篇并行:串着跑 100 篇要等模型想 100 回+ await parallel([...byFile], 4, async ([file, items]) => {const list = items.map((r, i) => `${i}. ${r[2]} — ${r[3]} — ${r[4]}`).join("\n");let verdicts = {};try {@@ -243,11 +255,20 @@ async function judgeRetracted(KB) {for (const r of (m ? JSON.parse(m[0]).results : [])) verdicts[r.i] = r.verdict;} catch (e) { log(`裁判失败 ${file}: ${String(e).slice(0, 120)}`); }items.forEach((_, i) => { counts[["stated", "misworded", "not_stated"].includes(verdicts[i]) ? verdicts[i] : "unjudged"] += 1; });- }+ });console.log(`撤改掉的 ${all.length} 条里裁判判 stated ${counts.stated}(撤错的),misworded ${counts.misworded},not_stated ${counts.not_stated}(原型撤了 278 条,约四分之一是对的)`);return { removed: all.length, ...counts };}+/** 有限并行:最多 n 个在飞 */+async function parallel(items, n, fn) {+ let next = 0;+ const workers = Array.from({ length: Math.min(n, items.length) }, async () => {+ while (next < items.length) { const i = next++; await fn(items[i]); }+ });+ await Promise.all(workers);+}+// ---- 打分 ----const norm = (s) => String(s).toLowerCase().replace(/[\s ]+/g, " ").replace(/[.,;:!?"'()\[\]]/g, "").trim();const years = (s) => new Set(String(s).match(/\b1\d{3}\b|\b20\d{2}\b/g) || []);@@ -380,7 +401,8 @@ async function judge(KB, n, seed) {const byFile = new Map();for (const r of sample) (byFile.get(r[1]) || byFile.set(r[1], []).get(r[1])).push(r);const counts = { stated: 0, misworded: 0, not_stated: 0, unjudged: 0 };- for (const [file, items] of byFile) {+ // 一篇一次裁判调用,四篇并行:串着跑 100 篇要等模型想 100 回+ await parallel([...byFile], 4, async ([file, items]) => {const list = items.map((r, i) => `${i}. ${r[2]} — ${r[3]} — ${r[4]}`).join("\n");let verdicts = {};try {@@ -389,7 +411,7 @@ async function judge(KB, n, seed) {for (const r of (m ? JSON.parse(m[0]).results : [])) verdicts[r.i] = r.verdict;} catch (e) { log(`裁判失败 ${file}: ${String(e).slice(0, 120)}`); }items.forEach((_, i) => { counts[["stated", "misworded", "not_stated"].includes(verdicts[i]) ? verdicts[i] : "unjudged"] += 1; });- }+ });const judged = counts.stated + counts.misworded + counts.not_stated;console.log(`裁判 ${sample.length} 条(判了 ${judged}):stated ${counts.stated},misworded ${counts.misworded},not_stated ${counts.not_stated} → judged precision ${judged ? (100 * counts.stated / judged).toFixed(1) + "%" : "-"}(原型勘误前 75.3% 是门槛)`);return { sampled: sample.length, ...counts, judged_precision: judged ? counts.stated / judged : null };diff --git a/web/src/api.ts b/web/src/api.tsindex e007b08c..7b633841 100644--- a/web/src/api.ts+++ b/web/src/api.ts@@ -258,6 +258,8 @@ export interface Readiness {export interface LlmSettingsView {chat_base_url?: string | null;chat_model?: string | null;+ /** 推理强度:minimal | low | medium | high;空 = 端点默认 */+ chat_reasoning_effort?: string | null;has_chat_key?: boolean;embed_base_url?: string | null;embed_model?: string | null;diff --git a/web/src/i18n/en.ts b/web/src/i18n/en.tsindex 28ea9ce5..156ea3bd 100644--- a/web/src/i18n/en.ts+++ b/web/src/i18n/en.ts@@ -1199,6 +1199,10 @@ export const en = {modelsIntro:"OpenAI-compatible protocol — DeepSeek, Qwen, GLM, Ollama, vLLM all work. Fully on-prem friendly.",chatModel: "Chat model",+ reasoningEffort: "Reasoning effort",+ reasoningDefault: "endpoint default",+ reasoningHint:+ "Reasoning models think before they answer; for extraction nine tenths of the output was thinking. minimal turns it off without changing the answer.",embedModel: "Embedding model (optional, enables semantic search)",baseUrl: "Base URL",model: "Model",@@ -2004,6 +2008,7 @@ export const en = {if (kind === "derived") return `Held: ${value} derived fact(s) rest on it`;if (kind === "answered") return `Held: it was named in ${value} answer(s)`;if (kind === "contradiction") return `Held: "${value}" allows one value and would get two`;+ if (kind === "unflagged") return "Held: the structure did not doubt this fact; a person confirms the change";return `Held: ${detail}`;},errataQuote: "Document says:",diff --git a/web/src/i18n/zh.ts b/web/src/i18n/zh.tsindex 210bbcc1..3f22a885 100644--- a/web/src/i18n/zh.ts+++ b/web/src/i18n/zh.ts@@ -1078,6 +1078,9 @@ export const zh: Strings = {modelsIntro:"OpenAI 兼容协议——DeepSeek、Qwen、GLM、Ollama、vLLM 都可用。完全内网友好。",chatModel: "对话模型",+ reasoningEffort: "推理强度",+ reasoningDefault: "端点默认",+ reasoningHint: "推理模型先想再答,抽取一次调用九成的输出是思考;minimal 关掉它,答案不变。",embedModel: "向量模型(可选,启用语义检索)",baseUrl: "接口地址",model: "模型",@@ -1762,6 +1765,7 @@ export const zh: Strings = {if (kind === "derived") return `留下的原因:有 ${value} 条派生靠着它`;if (kind === "answered") return `留下的原因:它在 ${value} 次回答里被提到`;if (kind === "contradiction") return `留下的原因:「${value}」只许一个值,这样会有两个`;+ if (kind === "unflagged") return "留下的原因:结构没报过这条,撤或改要人确认";return `留下的原因:${detail}`;},errataQuote: "文档原话:",diff --git a/web/src/pages/Settings.tsx b/web/src/pages/Settings.tsxindex fbe573b0..350bb1db 100644--- a/web/src/pages/Settings.tsx+++ b/web/src/pages/Settings.tsx@@ -887,6 +887,7 @@ export function Settings() {chat_base_url: "",chat_api_key: "",chat_model: "",+ chat_reasoning_effort: "",embed_base_url: "",embed_api_key: "",embed_model: "",@@ -904,6 +905,7 @@ export function Settings() {...f,chat_base_url: settings.data.chat_base_url ?? "",chat_model: settings.data.chat_model ?? "",+ chat_reasoning_effort: settings.data.chat_reasoning_effort ?? "",embed_base_url: settings.data.embed_base_url ?? "",embed_model: settings.data.embed_model ?? "",ocr_base_url: settings.data.ocr_base_url ?? "",@@ -1162,6 +1164,7 @@ export function Settings() {chat_base_url: form.chat_base_url,chat_model: form.chat_model,chat_api_key: form.chat_api_key,+ chat_reasoning_effort: form.chat_reasoning_effort,}),{ onSuccess: () => setDirty((d) => ({ ...d, chat: false })) },);@@ -1193,6 +1196,27 @@ export function Settings() {onChange={set("chat_model")}/></div>+ <div>+ <label className={label}>{S.settings.reasoningEffort}</label>+ {/* 推理模型默认边想边答,抽取一次调用九成的输出是思考;照原文写 JSON 的活用 minimal。+ 小而有界的枚举:Dropdown(web/DESIGN.md 规矩 5,页面上没有原生 select) */}+ <Dropdown+ className="w-full"+ value={form.chat_reasoning_effort}+ onChange={(v) => {+ setForm((f) => ({ ...f, chat_reasoning_effort: v }));+ setDirty((d) => ({ ...d, chat: true }));+ }}+ options={[+ { value: "", label: S.settings.reasoningDefault },+ { value: "minimal", label: "minimal" },+ { value: "low", label: "low" },+ { value: "medium", label: "medium" },+ { value: "high", label: "high" },+ ]}+ />+ <div className="mt-1 text-small text-ink-2">{S.settings.reasoningHint}</div>+ </div><div><label className={label}>{S.settings.apiKey}{" "}