File "<stdin>", line 1, in <module>
File "pregex/pregex.py", line 106, in match
for remainderMatch in continuation.consume(remainder, state):
File "pregex/pregex.py", line 238, in consume
extraScore = math.log(p)
Also, v = pre.create("T|\d").sample()
causes the error:
File "<stdin>", line 1, in <module>
File "pregex/pregex.py", line 228, in sample
value = np.random.choice(values, p=self.ps)
File "mtrand.pyx", line 1146, in mtrand.RandomState.choice
ValueError: probabilities do not sum to 1
pre.Alt([pre.create("T"), pre.create("\d")]).match("4")
causes the error:
Also,
v = pre.create("T|\d").sample()
causes the error: