Skip to main content
. 2022 Nov 22;19(23):15493. doi: 10.3390/ijerph192315493
Algorithm 1: The processing step of extracting assistant actions for the weather information retrieval scenario.
  • S a set of key-value pairs in <slots> ▹ weather_attribute = blizzard, date = Friday, ⋯

  • Skeys all keys in S

  • S[key] the value of key in S

  • Ki the i-th item in KB

  • Kkeys all keys in KB                   ▹ monday, tuesday, location,⋯

  • Ki[key] the value of key in i-th item in KB     ▹ "snow, low of 60F, high of 80F", ⋯

  • a the answer of assistant      ▹ On Friday it’s gonna rain in Brentwood, ⋯

  • actions the actions of assistant

  • if  locationSkeys then

  •     actions a question about location

  • else

  •     get Ki where S[key] in Ki

  •     if dateSkeys then

  •         actionslocation = Ki[location],date = Ki[date]

  •     else

  •         split Ki[key] into three parts

  •         if anypartsa then

  •            actionslocation = Ki[location],key = Ki[key]

  •         end if

  •     end if

  • end if