Number range tagging
See original GitHub issueNumber ranges seem to be tagged strangely resulting in things this not working:
nlp('1-2').numbers().out('array'); // => []
nlp('1-2').contractions().expand().numbers().out('array') // => []
nlp('1-2').contractions().expand().numbers().out('array') // => []
Using the debug i can see that the numbers in a number range aren’t tagged with #Value
, they are tagged with #Number
, but that is not used on ‘single’ numbers?
nlp('1').debug()
// '1' - Cardinal, Value, NumericValue
nlp('1-2').debug();
/*
"1-2"
compromise.mjs:7687 '[1]' - Number, Cardinal, NumberRange, Contraction
compromise.mjs:7687 '[to]' - Conjunction, NumberRange, Contraction
compromise.mjs:7687 '[2]' - Number, Cardinal, NumberRange, Contraction
*/
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Which specific tag is used for describing the range of numbers ...
The HTML input tag is used for describing the range of numbers in HTML form. The <input> tag is used to define an...
Read more >HTML input type="range" - W3Schools
The <input type="range"> defines a control for entering a number whose exact value is not important (like a slider control). Default range is...
Read more >Tags, Ranges and Masks
One generic way to represent tagged animations is using ranges - essentially start and stop frames for each tagged section that appears in...
Read more >Number range expires - SAP Community
Hi all Can anybody tell me what happens when my number range expires. I have defined the object using SNRO and set the...
Read more >2-4: Select a range of cells and understand Smart Tags
In this video lesson you'll learn how to select a range of cells using both the mouse and the keyboard. You'll then go...
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
whaaaaaa! ahh, what a good catch. Fixed on dev. WIll release in a few days. cheers
empty results are now removed from
.out('array')
in13.8.0
If you have any ideas for how this syntax could be improved, let me know. There’s some tech-debt in there that shouldn’t be exposed in the api like that - thanks for your patience with this. cheers