Skip to content

Comments

include / in word separator#7

Open
the-octagon wants to merge 1 commit intojoelwkall:masterfrom
the-octagon:master
Open

include / in word separator#7
the-octagon wants to merge 1 commit intojoelwkall:masterfrom
the-octagon:master

Conversation

@the-octagon
Copy link

#2

@joelwkall
Copy link
Owner

Thank you so much for this PR. It's the first one I've gotten since I created this bot many years ago.

Unfortunately going to have to refuse this PR as adding / as a word separator would make the converter start treating fractions as separate numbers. For instance, a sentence like "This is a 3/8 inch screw" will be get converted as "8 inch ≈ 20 centimetres". I think this case is much more common than the one cited in this PR. Also, I want to err on the side of avoiding erroneous conversions, so it's better to not offer a conversion than to increase the risk of wrong ones.

What could be done is to add a system that recognizes fractions (by a regex that sees that there are only numbers on each side of the forward slash maybe?) and then this could be introduced for cases where there are no fractions. Sadly I think this is a lot of work to get working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants