AI Zone Admin Forum Add your forum

NEWS: survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

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