AI Zone Admin Forum Add your forum

Chatbot Conference in the Netherlands on Tue 24, 2018, with international line-up! Check it out

Don’t work when start word from uppercase

Please help me with situation below.
I have next code:

concept: ~business [farm work office business earn]
: ~pleasure [pleasure fun vacation trip weekend "after work"]

: ^determine_type ($_param)
= ^substitute(character $_param " " "_"
else if($_param?~business)

#! pleasure
#! for vacation
#! only for work
#! business
u: (< {[just only]} {for} _[~pleasure ~business]>) 
$_inputType = ^determine_type('_0)
Output: $_inputType 

In case: “pleasure” or “work”. All work fine
But in case “Pleasure” or “Work” don’t work :(
I thought CS should all translate to lowercase



  [ # 1 ]

I add next fix:
Add to function “determine type”.
Switch words to lowercase
$_param = ^pos(lowercase $_param)


  login or register to react