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
// ecolect 0.6.0constecolect=require('ecolect')consten=require('ecolect/language/en')const{ any, dateTime }=require('ecolect/values')constintents=ecolect.intentsBuilder(en).intent('schedule:when').value('when',dateTime()).value('remainder',any()).add('{when} {remainder}').add('{remainder} {when}').done().build()// "1s test" matches but only contains "remainder"// "test 1s" matches with both "remainder" and "when"
// ecolect 0.7.0-beta.6const{ newPhrases, timeValue, anyTextValue }=require('ecolect')const{ en }=require('ecolect/language/en')constmatcher=newPhrases().value('when',timeValue()).value('remainder',anyTextValue()).phrase('{when} {remainder}').phrase('{remainder} {when}').toMatcher(en)// same as in 0.6.0// "1s test" matches but only contains "remainder"// "test 1s" matches with both "remainder" and "when"
Not just dateTime but number, enumeration, and possibly others seem to be effected when followed by an any value.
The text was updated successfully, but these errors were encountered:
// ecolect 0.6.0constecolect=require('ecolect')consten=require('ecolect/language/en')const{ any, enumeration }=require('ecolect/values')constgreetings="hey,hi,hello".split(",")constintents=ecolect.intentsBuilder(en).intent('pleasantry:greeting').value('greeting',enumeration(greetings)).value('remainder',any()).add('{greeting}').add('{greeting} {remainder}').done().build()// "hello test" matches but only includes "remainder"// "hello" matches and includes "greeting"
Consider the following examples
Not just
dateTime
butnumber
,enumeration
, and possibly others seem to be effected when followed by anany
value.The text was updated successfully, but these errors were encountered: