Extract verbatim in ExtractClaims not in TypeClaim
This commit is contained in:
@@ -1285,22 +1285,24 @@ class KnowledgeExpert:
|
||||
extracted = 0
|
||||
for chunk in capped:
|
||||
if self.cfg.extract_mode == "two_pass":
|
||||
# two-pass (26/10): Pass 1 claims (short strings, coref
|
||||
# resolved), Pass 2 one typed Fact per claim — every
|
||||
# output short; the giant typed array is gone from prose.
|
||||
# two-pass (26/10; verbatim moved 1/11): Pass 1 claims WITH
|
||||
# their VERBATIM quotes (extracted while the text is in
|
||||
# front of the model), Pass 2 one typed Fact per claim —
|
||||
# TYPING only, the verbatim enters as an input and the TYPE
|
||||
# call no longer carries the chunk.
|
||||
claims = claims_from(self, entities=ent_str,
|
||||
heading=chunk.heading_path,
|
||||
text=chunk.text, charge_llm=charge_llm)
|
||||
self._rec("claims.done", page=page.title,
|
||||
heading=chunk.heading_path,
|
||||
out_={"n_claims": len(claims),
|
||||
"claims": list(claims)})
|
||||
"claims": [c.__dict__ for c in claims]})
|
||||
# owner ruling 26/10: completeness beats budget — every
|
||||
# unique claim gets its TYPE call (no cap, dedup only)
|
||||
for claim in claims:
|
||||
fact = fact_from_claim(self, claim, text=chunk.text,
|
||||
for c in claims:
|
||||
fact = fact_from_claim(self, c.claim, verbatim=c.verbatim,
|
||||
charge_llm=charge_llm)
|
||||
self._rec("type.done", page=page.title, claim=claim[:200],
|
||||
self._rec("type.done", page=page.title, claim=c.claim[:200],
|
||||
out_={"fact": getattr(fact, "__dict__", None)}
|
||||
if fact is not None else {"fact": None})
|
||||
if fact is None:
|
||||
|
||||
Reference in New Issue
Block a user