ChanceNCounter
ChanceNCounter
> Passing more than two or three arguments to a method or function is a code smell. It usually indicates the function/method is doing too much. I agree, but we've...
"`extract_number()` does what it sounds like, and can be instructed to do some very useful things," is easier to explain to a brand new coder than, "Here is a list...
Most of this was handled in 120b94abae081625d803e11407a888877e75b018, but it appears that nl and sv were missed.
That's a relief!
It would be important to avoid removing *leading* hyphens, as this would mess with negative numerals (-2.5)
I think we should assume that hyphens will become syntactically important to other parsers. I don't think they'll ever be meaningful for the number extractors, but I suspect their grammatical...
Yes, but what if some other parser cares about the hyphen? For instance, many French place names have a hyphen in them, which we wouldn't want the normalizer to lose....
Indeed, words to digits will almost certainly break extract_numbers, as it would turn "twenty two" into [20, 2]
I've been thinking about this, and I'm now thinking subnormalizers might *reduce* each parser's individual complexity, and actually make it easier to track things. For instance, normalizing a string for...
Re: hyphens, here's another edge case. When parsing text, `"47-48"` should not be normalized to `"47 48"`. It should be normalized to `"47 to 48"`.