You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
Recognizers.recognizeNumber
identifies K as thousand (english)
can this behaviour be toggled on/off?
Reproduce
` var Recognizers = require('@microsoft/recognizers-text-suite');
var myCulture = Recognizers.Culture.English;
let input = '1 a two B 3 0 k 9' // if '4 k' or '4k' then recognizes as 4000
console.log('INPUT: ', input)
_.forEach(Recognizers.recognizeNumber(input, myCulture), r => {
input = input.replace(r.text, r.resolution.value)
})
console.log('OUTPUT: ', input)`
Output will show k removed (4k = 4000)
my main usage is to parse a string and find non abbriviated numbers: eg: one eleven twentytwo etc.
relevant identification:
{
start: 12,
end: 14,
resolution: { value: '0' },
text: '0 k', <------------------
typeName: 'number'
},
Thank you.
K.
Beta Was this translation helpful? Give feedback.
All reactions