Fractions miss-behaving when next to other numbers
See original GitHub issueThis works as expected (I think):
nlp('10 1/2').numbers().json()
or nlp('10 1/2').fractions().json()
[{
"text": "1 1/2",
"normal": "1 1/2",
...
"prefix": "",
"number": 1.5,
"suffix": "",
"cardinal": "1.5",
"ordinal": "1.5th",
}]
But this doesn’t
nlp('1/2 10').numbers().json()
or nlp('1/2 10').fractions().json()
[
{
"text": "1/2 10",
"normal": "1/2 10",
...
"prefix": "",
"number": 10.5,
"suffix": "",
"cardinal": "10.5",
"ordinal": "10.5th"
}
]
or this weirdness:
nlp('2 1/2 30').numbers().json()
[
{
"text": "10 1/2 10",
"normal": "10 1/2 10",
...
"prefix": "",
"number": 10.5,
"suffix": "",
"cardinal": "10.5",
"ordinal": "10.5th",
}
]
A real world example where I’m trying to use this is for something like 2 1/2 30 gram packets of food
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Cross-cancellation and How To Do It - Bubbly Primes
It's a way to make multiplying and dividing fractions easier. ... we usually cross out numbers across a diagonal and write replacement numbers...
Read more >Negative signs in fractions (video) - Khan Academy
Yes, in multiplying/dividing positive and negative numbers, count number of - signs. ... the negative number may end up in different spots.
Read more >Fraction facts.pdf
Definition: A fraction is a numerical representation for part of a whole. ... number to a fraction with the same denominator as the...
Read more >Overview of Fractions - NumberNut.com: Fractions and Decimals
Let's look at the basics of fractions. A fraction is made of two numbers (integers), one on top of the other and separated...
Read more >Fractions and the Number Line
We can use a number line model to illustrate fraction order for values between 0 and 1.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
will ping you when this is released - hopefully this week. thanks
released as
13.8.0
thanks for your help!