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
The package currently supports expressions with half measures in them, including mixed fractions:
doseminer::replace_numbers(c('half a spoonful', 'three and a half tablets'))
## [1] "0.5 a spoonful" "3.5 tablets"
But more unusual fractions like thirds, fifths and quarters don't really work because it just kind of adds the denominator:
doseminer::replace_numbers(c('thirty three and a third', 'four fifths'))
## [1] "37" "9"
The problem is with fixing this (assuming such cases appear often enough in prescriptions to be worth worrying about) without unintentionally breaking the parsing of ordinal words, which look a lot like fractions:
However with enough ambition, 'every 1/3 day' could be interpreted as '(every day) / 3' and end up giving the right result, with an appropriate redesign of how intervals are calculated.
The text was updated successfully, but these errors were encountered:
The package currently supports expressions with half measures in them, including mixed fractions:
But more unusual fractions like thirds, fifths and quarters don't really work because it just kind of adds the denominator:
The problem is with fixing this (assuming such cases appear often enough in prescriptions to be worth worrying about) without unintentionally breaking the parsing of ordinal words, which look a lot like fractions:
However with enough ambition, 'every 1/3 day' could be interpreted as '(every day) / 3' and end up giving the right result, with an appropriate redesign of how intervals are calculated.
The text was updated successfully, but these errors were encountered: