File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments