Hypergraph is more powerful. Transform unstructured text into structured knowledge with LLMs. Graphs, hypergraphs, and spatio-temporal extractions — with one command.
fix: restore relations-section check for time_field/location_field lost in #185 merge
yifanfeng9778c5481a7647
diff --git a/hyperextract/utils/template_engine/parsers/identifiers.py b/hyperextract/utils/template_engine/parsers/identifiers.pyindex f3016e1..cfd9038 100644--- a/hyperextract/utils/template_engine/parsers/identifiers.py+++ b/hyperextract/utils/template_engine/parsers/identifiers.py@@ -154,17 +154,16 @@ def validate_identifiers_fields(f"relation_members references '{{{field}}}' but "f"relations.fields does not declare '{field}'")- for attr, section in (- ("time_field", "entities"),- ("location_field", "entities"),+ for attr, field in (+ ("time_field", identifiers.time_field),+ ("location_field", identifiers.location_field),):- value = getattr(identifiers, attr, None)- if value:- for field in _placeholders(value):- if field not in entity_fields:+ if field:+ for placeholder in _placeholders(field):+ if placeholder not in relation_fields:problems.append(- f"{attr} references '{{{field}}}' but "- f"entities.fields does not declare '{field}'"+ f"{attr} references '{{{placeholder}}}' but "+ f"relations.fields does not declare '{placeholder}'")if problems: