#ifndef INC_UNI_NLU_CONTENT_H_
#define INC_UNI_NLU_CONTENT_H_

typedef struct {
  uni_u32 key_word_hash_code; /* 存放识别词汇对应的hashcode */
  uni_u8  nlu_content_str_index; /* 存放nlu映射表中的索引，实现多个识别词汇可对应同一个nlu，暂支持256条，如果不够换u16 */
  char    *hash_collision_orginal_str /* 类似Java String equal，当hash发生碰撞时，赋值为识别词汇，否则设置为NULL */;
} uni_nlu_content_mapping_t;

enum {
  eCMD_exitUni,
  eCMD_volumeUpUni,
  eCMD_volumeDownUni,
  eCMD_wakeup_uni,
  eCMD_ac_power_on,
  eCMD_ac_power_off,
  eCMD_ac_speed_1,
  eCMD_ac_speed_2,
  eCMD_ac_speed_3,
  eCMD_ac_mode_nor,
  eCMD_ac_mode_nat,
  eCMD_ac_mode_sleep,
  eCMD_ac_speed_inc,
  eCMD_ac_speed_dec,
  eCMD_ac_timing_1hr,
  eCMD_ac_timing_2hr,
  eCMD_ac_timing_4hr,
  eCMD_ac_timing_8hr,
  eCMD_ac_shake_on,
  eCMD_ac_shake_off,
  eCMD_ac_timing_cancel,
  eCMD_ac_timing_inc,
  eCMD_ac_timing_dec,
};

const char* const g_nlu_content_str[] = {
[eCMD_exitUni] = "{\"asr\":\"退下\",\"cmd\":\"exitUni\",\"pcm\":\"[101]\"}",
[eCMD_volumeUpUni] = "{\"asr\":\"增大音量\",\"cmd\":\"volumeUpUni\",\"pcm\":\"[]\"}",
[eCMD_volumeDownUni] = "{\"asr\":\"减小音量\",\"cmd\":\"volumeDownUni\",\"pcm\":\"[]\"}",
[eCMD_wakeup_uni] = "{\"asr\":\"你好魔方\",\"cmd\":\"wakeup_uni\",\"pcm\":\"[102, 103]\"}",
[eCMD_ac_power_on] = "{\"asr\":\"开机\",\"cmd\":\"ac_power_on\",\"pcm\":\"[104, 105, 106]\"}",
[eCMD_ac_power_off] = "{\"asr\":\"关闭风扇\",\"cmd\":\"ac_power_off\",\"pcm\":\"[107]\"}",
[eCMD_ac_speed_1] = "{\"asr\":\"1档风\",\"cmd\":\"ac_speed_1\",\"pcm\":\"[108]\"}",
[eCMD_ac_speed_2] = "{\"asr\":\"2档风\",\"cmd\":\"ac_speed_2\",\"pcm\":\"[109]\"}",
[eCMD_ac_speed_3] = "{\"asr\":\"3档风\",\"cmd\":\"ac_speed_3\",\"pcm\":\"[110]\"}",
[eCMD_ac_mode_nor] = "{\"asr\":\"正常风\",\"cmd\":\"ac_mode_nor\",\"pcm\":\"[111]\"}",
[eCMD_ac_mode_nat] = "{\"asr\":\"自然风\",\"cmd\":\"ac_mode_nat\",\"pcm\":\"[112]\"}",
[eCMD_ac_mode_sleep] = "{\"asr\":\"睡眠风\",\"cmd\":\"ac_mode_sleep\",\"pcm\":\"[113]\"}",
[eCMD_ac_speed_inc] = "{\"asr\":\"调大风量\",\"cmd\":\"ac_speed_inc\",\"pcm\":\"[114, 115]\"}",
[eCMD_ac_speed_dec] = "{\"asr\":\"调小风量\",\"cmd\":\"ac_speed_dec\",\"pcm\":\"[116, 117]\"}",
[eCMD_ac_timing_1hr] = "{\"asr\":\"风扇定时一小时关机\",\"cmd\":\"ac_timing_1hr\",\"pcm\":\"[118]\"}",
[eCMD_ac_timing_2hr] = "{\"asr\":\"风扇定时两小时关机\",\"cmd\":\"ac_timing_2hr\",\"pcm\":\"[119]\"}",
[eCMD_ac_timing_4hr] = "{\"asr\":\"风扇定时四小时关机\",\"cmd\":\"ac_timing_4hr\",\"pcm\":\"[120]\"}",
[eCMD_ac_timing_8hr] = "{\"asr\":\"风扇定时八小时关机\",\"cmd\":\"ac_timing_8hr\",\"pcm\":\"[121]\"}",
[eCMD_ac_shake_on] = "{\"asr\":\"开始摇头\",\"cmd\":\"ac_shake_on\",\"pcm\":\"[122]\"}",
[eCMD_ac_shake_off] = "{\"asr\":\"停止摇头\",\"cmd\":\"ac_shake_off\",\"pcm\":\"[123]\"}",
[eCMD_ac_timing_cancel] = "{\"asr\":\"取消定时\",\"cmd\":\"ac_timing_cancel\",\"pcm\":\"[124]\"}",
[eCMD_ac_timing_inc] = "{\"asr\":\"增加定时\",\"cmd\":\"ac_timing_inc\",\"pcm\":\"[125, 126, 127, 128]\"}",
[eCMD_ac_timing_dec] = "{\"asr\":\"减少定时\",\"cmd\":\"ac_timing_dec\",\"pcm\":\"[125, 126, 127, 128]\"}",
};

/*TODO perf sort by hashcode O(logN), now version O(N)*/
const uni_nlu_content_mapping_t g_nlu_content_mapping[] = {
  {2497873774U/*退下*/, eCMD_exitUni, NULL},
  {2389288886U/*再见*/, eCMD_exitUni, NULL},
  {642591547U/*增大音量*/, eCMD_volumeUpUni, NULL},
  {426724193U/*加大音量*/, eCMD_volumeUpUni, NULL},
  {548623739U/*音量增大*/, eCMD_volumeUpUni, NULL},
  {3552434659U/*提高音量*/, eCMD_volumeUpUni, NULL},
  {182008939U/*减小音量*/, eCMD_volumeDownUni, NULL},
  {523242155U/*音量减小*/, eCMD_volumeDownUni, NULL},
  {912662092U/*降低音量*/, eCMD_volumeDownUni, NULL},
  {2947460911U/*你好魔方*/, eCMD_wakeup_uni, NULL},
  {2438769531U/*开机*/, eCMD_ac_power_on, NULL},
  {3534892713U/*打开风扇*/, eCMD_ac_power_on, NULL},
  {2593819740U/*关闭风扇*/, eCMD_ac_power_off, NULL},
  {2389495217U/*关机*/, eCMD_ac_power_off, NULL},
  {2981516765U/*1档风*/, eCMD_ac_speed_1, NULL},
  {4081111357U/*风速调到1档*/, eCMD_ac_speed_1, NULL},
  {1460527232U/*风速调到最小*/, eCMD_ac_speed_1, NULL},
  {3869020446U/*2档风*/, eCMD_ac_speed_2, NULL},
  {4081141148U/*风速调到2档*/, eCMD_ac_speed_2, NULL},
  {461556831U/*3档风*/, eCMD_ac_speed_3, NULL},
  {4081170939U/*风速调到3档*/, eCMD_ac_speed_3, NULL},
  {1460526884U/*风速调到最大*/, eCMD_ac_speed_3, NULL},
  {2826737195U/*正常风*/, eCMD_ac_mode_nor, NULL},
  {2535485938U/*打开正常风*/, eCMD_ac_mode_nor, NULL},
  {3631246374U/*自然风*/, eCMD_ac_mode_nat, NULL},
  {3339995117U/*打开自然风*/, eCMD_ac_mode_nat, NULL},
  {1454765812U/*睡眠风*/, eCMD_ac_mode_sleep, NULL},
  {1163514555U/*打开睡眠风*/, eCMD_ac_mode_sleep, NULL},
  {2655813610U/*调大风量*/, eCMD_ac_speed_inc, NULL},
  {773838435U/*风太小了*/, eCMD_ac_speed_inc, NULL},
  {4269386346U/*风大点*/, eCMD_ac_speed_inc, NULL},
  {2269449286U/*调小风量*/, eCMD_ac_speed_dec, NULL},
  {763471167U/*风太大了*/, eCMD_ac_speed_dec, NULL},
  {4279753614U/*风小点*/, eCMD_ac_speed_dec, NULL},
  {2912654074U/*风扇定时一小时关机*/, eCMD_ac_timing_1hr, NULL},
  {940080414U/*风扇定时两小时关机*/, eCMD_ac_timing_2hr, NULL},
  {2569590227U/*风扇定时四小时关机*/, eCMD_ac_timing_4hr, NULL},
  {407497273U/*风扇定时八小时关机*/, eCMD_ac_timing_8hr, NULL},
  {225000985U/*开始摇头*/, eCMD_ac_shake_on, NULL},
  {3432173266U/*打开摇头*/, eCMD_ac_shake_on, NULL},
  {955726356U/*停止摇头*/, eCMD_ac_shake_off, NULL},
  {2491100293U/*关闭摇头*/, eCMD_ac_shake_off, NULL},
  {3946143584U/*取消定时*/, eCMD_ac_timing_cancel, NULL},
  {555193710U/*增加定时*/, eCMD_ac_timing_inc, NULL},
  {1855605389U/*减少定时*/, eCMD_ac_timing_dec, NULL},
};

#endif
