Skip to content

Commit f502f77

Browse files
committed
axtract symbol key dict
1 parent 3a18c82 commit f502f77

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/axiomatic/axtract/interactive_table.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ def _create_variable_dict(equation_response: EquationExtractionResponse) -> dict
408408
for equation in equation_response.equations:
409409
for symbol in equation.latex_symbols:
410410
# Only add if not already present (avoid duplicates)
411-
if symbol.key not in variable_dict:
412-
variable_dict[symbol.key] = {"name": symbol.value}
411+
if symbol['key'] not in variable_dict:
412+
variable_dict[symbol['key']] = {"name": symbol['value']}
413413

414414
return variable_dict

src/axiomatic/axtract/relation_graph.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def generate_relation_graph(equations: List[EquationExtraction]) -> str:
5858
# Add variable nodes and edges
5959
for symbol in eq.latex_symbols:
6060
# Normalize the variable name
61-
var_name = normalize_latex_symbol(symbol.key)
61+
var_name = normalize_latex_symbol(symbol["key"])
6262
if var_name not in all_variables:
6363
net.add_node(
6464
var_name,
@@ -67,7 +67,7 @@ def generate_relation_graph(equations: List[EquationExtraction]) -> str:
6767
shape="dot",
6868
size=20,
6969
font=dict(size=16, color="#000000"),
70-
title=f"{var_name}: {symbol.value}",
70+
title=f"{var_name}: {symbol['value']}",
7171
)
7272
all_variables.add(var_name)
7373

0 commit comments

Comments
 (0)