MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / is_number

Function is_number

test/gsm8k/eval.py:10–22  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

8INVALID_ANS = "[invalid]"
9
10def is_number(s):
11 try:
12 float(s)
13 return True
14 except ValueError:
15 pass
16 try:
17 import unicodedata
18 unicodedata.numeric(s)
19 return True
20 except (TypeError, ValueError):
21 pass
22 return False
23
24def extract_answer_wizard(completion):
25 text = completion.split('The answer is: ')

Callers 1

extract_answer_wizardFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected