MCPcopy Create free account
hub / github.com/google-deepmind/alphageometry / natural_language_statement

Function natural_language_statement

alphageometry.py:83–94  ·  view source on GitHub ↗

Convert logical_statement to natural language. Args: logical_statement: pr.Dependency with .name and .args Returns: a string of (pseudo) natural language of the predicate for human reader.

(logical_statement: pr.Dependency)

Source from the content-addressed store, hash-verified

81
82
83def natural_language_statement(logical_statement: pr.Dependency) -> str:
84 """Convert logical_statement to natural language.
85
86 Args:
87 logical_statement: pr.Dependency with .name and .args
88
89 Returns:
90 a string of (pseudo) natural language of the predicate for human reader.
91 """
92 names = [a.name.upper() for a in logical_statement.args]
93 names = [(n[0] + '_' + n[1:]) if len(n) > 1 else n for n in names]
94 return pt.pretty_nl(logical_statement.name, names)
95
96
97def proof_step_string(

Callers 2

proof_step_stringFunction · 0.85
write_solutionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected