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
It would be cool if we could match a #Value or #TextValue with logical arithmetic conditions applied
Example
nlp('I will see him in 12 months').match('#Value>=12').tag('YearsDuration')nlp('I will see him in 48 hours').match('#Value>=24').tag('DaysDuration')
Even cooler if we can do string conditions / lookups too:
nlp('I prescribed him 1000mg of cyanide').match('#Value>=100 #Unit:in:[mg,g,kg] of? (cyanide|arsenic)').tag('LethalDosage')
The text was updated successfully, but these errors were encountered:
thegoatherder
changed the title
Feature request: Logical arithmetic operations on #Value, #TextValue in match
Feature request: Logical operations in match
Feb 9, 2024
ok, .numbers().isUnit(unit) has been added in compromise@14.12.0
and dates().isBefore(iso) and dates().isAfter(iso) methods have been added in compromise-dates@3.5.0
😅
let me know if something weird appears.
It would be cool if we could match a #Value or #TextValue with logical arithmetic conditions applied
Example
Even cooler if we can do string conditions / lookups too:
The text was updated successfully, but these errors were encountered: