想象一下,我有一些从 SQL 查询返回的这样的数据:
ContactId Transcript
60b0e926-2f3a-458d-91f7-fe4a21f1c0f1 [Options-13] : Give me options ,Give me options ,Give me options ,Give me options ,Give me options ,Give me options ,Give me options ,I can do this that and the other ,Awesome! ,Awesome! ,Awesome! ,Awesome! ,Awesome!
d463d996-78cc-428e-8a76-e4875e1c8ff4 [ConfirmApt-2] : Confirm my appointment ,ok your appointment has been confirmed [RescheudleApt-4] : Reschuedle Appointment ,Ok, what date?t ,Ok, what date?t ,Ok, what date?t
re80e926-2f3a-458d-91f7-fe4a54f1c0f1 [ConfirmAppt-1] : This is another thing
然后我将这些数据放入一个List<Tuple<string, string>>()所以每个条目看起来像:
Item1: 60b0e926-2f3a-458d-91f7-fe4a21f1c0f1
Item2: [Options-13] : Give me options ,Give me options ,Give me options ,Give me options ,Give me options ,Give me options ,Give me options ,I can do this that and the other ,Awesome! ,Awesome! ,Awesome! ,Awesome! ,Awesome!
Item1:d463d996-78cc-428e-8a76-e4875e1c8ff4
Item2: [ConfirmApt-2] : Confirm my appointment ,ok your appointment has been confirmed$ [RescheudleApt-4] : Reschuedle Appointment ,Ok, what date?t ,Ok, what date?t ,Ok, what date?t
..等等
我正在尝试创建一个对象,以正确的格式保存所有这些数据。我要采用的格式本质上是链接我的意图
选项、ConfirmAppt、RescheduleAppt
带有各自的成绩单,位于两个标签之间。例如,列表中的第二项是:
d463d996-78cc-428e-8a76-e4875e1c8ff4 [ConfirmApt-2] : Confirm my appointment ,ok your appointment has been confirmed [RescheudleApt-4] : Reschuedle Appointment ,Ok, what date?t ,Ok, what date?t ,Ok, what date?t
我想看到的是:
Key: d463d996-78cc-428e-8a76-e4875e1c8ff4
Intent: ConfirmApt
Count: 2
Transcript:
[0] Confirm my appointment
[1]ok your appointment has been confirmed
Intent: RescheudleApt
Count: 4
Transcript:
[0]Reschuedle Appointment
[1]Ok, what date?t
[2]k, what date?t
[3]Ok, what date?t
依此类推我列表中的其他项目。
我试图开始这样做,但是当我开始尝试将意图与抄本联系起来时却碰壁了。
有人可以向我解释如何做到这一点吗?
素胚勾勒不出你
相关分类