system HF staff commited on
Commit
38533a7
0 Parent(s):

Update files from the datasets library (from 1.16.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.16.0

.gitattributes ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.model filter=lfs diff=lfs merge=lfs -text
12
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
13
+ *.onnx filter=lfs diff=lfs merge=lfs -text
14
+ *.ot filter=lfs diff=lfs merge=lfs -text
15
+ *.parquet filter=lfs diff=lfs merge=lfs -text
16
+ *.pb filter=lfs diff=lfs merge=lfs -text
17
+ *.pt filter=lfs diff=lfs merge=lfs -text
18
+ *.pth filter=lfs diff=lfs merge=lfs -text
19
+ *.rar filter=lfs diff=lfs merge=lfs -text
20
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
22
+ *.tflite filter=lfs diff=lfs merge=lfs -text
23
+ *.tgz filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,348 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - crowdsourced
4
+ language_creators:
5
+ - crowdsourced
6
+ - expert-generated
7
+ languages:
8
+ - en
9
+ licenses:
10
+ - apache-2-0
11
+ multilinguality:
12
+ - monolingual
13
+ pretty_name: MultiDoc2Dial
14
+ size_categories:
15
+ dialogue_domain:
16
+ - 1K<n<10K
17
+ document_domain:
18
+ - n<1K
19
+ multidoc2dial:
20
+ - 10K<n<100K
21
+ source_datasets:
22
+ - extended|doc2dial
23
+ task_categories:
24
+ - question-answering
25
+ task_ids:
26
+ - open-domain-qa
27
+ paperswithcode_id: multidoc2dial
28
+ ---
29
+
30
+ # Dataset Card for MultiDoc2Dial
31
+
32
+ ## Table of Contents
33
+ - [Dataset Description](#dataset-description)
34
+ - [Dataset Summary](#dataset-summary)
35
+ - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
36
+ - [Languages](#languages)
37
+ - [Dataset Structure](#dataset-structure)
38
+ - [Data Instances](#data-instances)
39
+ - [Data Fields](#data-fields)
40
+ - [Data Splits](#data-splits)
41
+ - [Dataset Creation](#dataset-creation)
42
+ - [Curation Rationale](#curation-rationale)
43
+ - [Source Data](#source-data)
44
+ - [Annotations](#annotations)
45
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
46
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
47
+ - [Social Impact of Dataset](#social-impact-of-dataset)
48
+ - [Discussion of Biases](#discussion-of-biases)
49
+ - [Other Known Limitations](#other-known-limitations)
50
+ - [Additional Information](#additional-information)
51
+ - [Dataset Curators](#dataset-curators)
52
+ - [Licensing Information](#licensing-information)
53
+ - [Citation Information](#citation-information)
54
+ - [Contributions](#contributions)
55
+
56
+ ## Dataset Description
57
+
58
+ - **Homepage:** https://doc2dial.github.io/multidoc2dial/
59
+ - **Repository:** https://github.com/IBM/multidoc2dial
60
+ - **Paper:** https://arxiv.org/pdf/2109.12595.pdf
61
+ - **Leaderboard:**
62
+ - **Point of Contact:** sngfng@gmail.com
63
+
64
+ ### Dataset Summary
65
+
66
+ MultiDoc2Dial is a new task and dataset on modeling goal-oriented dialogues grounded in multiple documents.
67
+ Most previous works treat document-grounded dialogue modeling as a machine reading comprehension task based on a
68
+ single given document or passage. We aim to address more realistic scenarios where a goal-oriented information-seeking
69
+ conversation involves multiple topics, and hence is grounded on different documents.
70
+
71
+ ### Supported Tasks and Leaderboards
72
+
73
+ > Supported Task: Open domain question answering, document-grounded dialogue, passage retrieval
74
+
75
+ > Leaderboard:
76
+
77
+ ### Languages
78
+
79
+ English
80
+
81
+ ## Dataset Structure
82
+
83
+ ### Data Instances
84
+
85
+ Sample data instance for `multidoc2dial` :
86
+ ```
87
+ {
88
+ "id": "8df07b7a98990db27c395cb1f68a962e_1",
89
+ "title": "Top 5 DMV Mistakes and How to Avoid Them#3_0",
90
+ "context": "Many DMV customers make easily avoidable mistakes that cause them significant problems, including encounters with law enforcement and impounded vehicles. Because we see customers make these mistakes over and over again , we are issuing this list of the top five DMV mistakes and how to avoid them. \n\n1. Forgetting to Update Address \nBy statute , you must report a change of address to DMV within ten days of moving. That is the case for the address associated with your license, as well as all the addresses associated with each registered vehicle, which may differ. It is not sufficient to only: write your new address on the back of your old license; tell the United States Postal Service; or inform the police officer writing you a ticket. If you fail to keep your address current , you will miss a suspension order and may be charged with operating an unregistered vehicle and/or aggravated unlicensed operation, both misdemeanors. This really happens , but the good news is this is a problem that is easily avoidable. Learn more about how to change the address on your license and registrations [1 ] \n\n2. Leaving the State Without Notifying DMV \nStates communicate with each other , so when you move to another state, be sure to tie up any loose ends regarding your New York State license or registration. That means resolving any unanswered tickets, suspensions or revocations, and surrendering your license plates to NYS when you get to your new home state. A license suspension or revocation here could mean that your new home state will not issue you a license there. Remember , it is important to notify DMV of your new address so that any possible mail correspondence can reach you. Also , turning in your plates is important to avoid an insurance lapse. \n\n3. Letting Insurance Lapse \nBecause we all pay indirectly for crashes involving uninsured motorists , New York State requires every motorist to maintain auto insurance every single day a vehicle is registered. DMV works with insurance companies to electronically monitor your insurance coverage , and we know when coverage is dropped for any reason. When that happens , we mail you an insurance inquiry letter to allow you to clear up the problem. We send 500,000 inquiry letters a year. If the inquiry letter does not resolve the problem , we must suspend the vehicle registration and , if it persists, your driver license!We suspend 300,000 registrations a year for failure to maintain insurance. If you fail to maintain an updated address with us , you won t learn that you have an insurance problem , and we will suspend your registration and license. Make sure you turn in your vehicle s license plates at DMV before you cancel your insurance policy. Insurance policies must be from a company licensed in New York State. Learn more about Insurances Lapes [2] and How to Surrender your Plates [3 ] \n\n4. Understanding how Much Traffic Points Cost \nDMV maintains a point system to track dangerous drivers. Often , motorists convicted of a traffic ticket feel they have resolved all their motoring issues with the local court, but later learn that the Driver Responsibility Assessment DRA is a separate DMV charge based on the total points they accumulate. The $300 DRA fee can be paid in $100 annual installments over three years. Motorists who fail to maintain an updated address with DMV may resolve their tickets with the court, but never receive their DRA assessment because we do not have their new address on record. Failure to pay the DRA will result in a suspended license. Learn more about About the NYS Driver Point System [4] and how to Pay Driver Responsibility Assessment [5 ] \n\n5. Not Bringing Proper Documentation to DMV Office \nAbout ten percent of customers visiting a DMV office do not bring what they need to complete their transaction, and have to come back a second time to finish their business. This can be as simple as not bringing sufficient funds to pay for a license renewal or not having the proof of auto insurance required to register a car. Better yet , don t visit a DMV office at all, and see if your transaction can be performed online, like an address change, registration renewal, license renewal, replacing a lost title, paying a DRA or scheduling a road test. Our award - winning website is recognized as one of the best in the nation. It has all the answers you need to efficiently perform any DMV transaction. Consider signing up for our MyDMV service, which offers even more benefits. Sign up or log into MyDMV [6 ] ",
91
+ "question": "Hello, I forgot o update my address, can you help me with that?[SEP]",
92
+ "da": "query_condition",
93
+ "answers":
94
+ {
95
+ "text": ['you must report a change of address to DMV within ten days of moving. That is the case for the address associated with your license, as well as all the addresses associated with each registered vehicle, which may differ. "],
96
+ "answer_start": [346]
97
+ },
98
+ "utterance": "hi, you have to report any change of address to DMV within 10 days after moving. You should do this both for the address associated with your license and all the addresses associated with all your vehicles.",
99
+ "domain": "dmv"
100
+ }
101
+ ```
102
+
103
+ Sample data instance for `document_domain` :
104
+
105
+ ```
106
+ {
107
+ "domain": "ssa",
108
+ "doc_id": "Benefits Planner: Survivors | Planning For Your Survivors | Social Security Administration#1_0",
109
+ "title": "Benefits Planner: Survivors | Planning For Your Survivors | Social Security Administration#1",
110
+ "doc_text": "\n\nBenefits Planner: Survivors | Planning For Your Survivors \nAs you plan for the future , you'll want to think about what your family would need if you should die now. Social Security can help your family if you have earned enough Social Security credits through your work. You can earn up to four credits each year. In 2019 , for example , you earn one credit for each $1,360 of wages or self - employment income. When you have earned $5,440 , you have earned your four credits for the year. The number of credits needed to provide benefits for your survivors depends on your age when you die. No one needs more than 40 credits 10 years of work to be eligible for any Social Security benefit. But , the younger a person is , the fewer credits they must have for family members to receive survivors benefits. Benefits can be paid to your children and your spouse who is caring for the children even if you don't have the required number of credits. They can get benefits if you have credit for one and one - half years of work 6 credits in the three years just before your death. \n\nFor Your Widow Or Widower \nThere are about five million widows and widowers receiving monthly Social Security benefits based on their deceased spouse's earnings record. And , for many of those survivors, particularly aged women, those benefits are keeping them out of poverty. Widows and widowers can receive : reduced benefits as early as age 60 or full benefits at full retirement age or older. benefits as early as age 50 if they're disabled AND their disability started before or within seven years of your death. benefits at any age , if they have not remarried , and if they take care of your child who is under age 16 or disabled and receives benefits on your record. If applying for disability benefits on a deceased worker s record , they can speed up the application process if they complete an Adult Disability Report and have it available at the time of their appointment. We use the same definition of disability for widows and widowers as we do for workers. \n\nFor Your Surviving Divorced Spouse \nIf you have a surviving divorced spouse , they could get the same benefits as your widow or widower provided that your marriage lasted 10 years or more. Benefits paid to a surviving divorced spouse won't affect the benefit amounts your other survivors will receive based on your earnings record. If your former spouse is caring for your child who is under age 16 or disabled and gets benefits on your record , they will not have to meet the length - of - marriage rule. The child must be your natural or legally adopted child. \n\nFor Your Children \nYour unmarried children who are under 18 up to age 19 if attending elementary or secondary school full time can be eligible to receive Social Security benefits when you die. And your child can get benefits at any age if they were disabled before age 22 and remain disabled. Besides your natural children , your stepchildren, grandchildren, step grandchildren or adopted children may receive benefits under certain circumstances. For further information , view our publication. \n\nFor Your Parents \nYou must have been providing at least half of your parent s support and your parent must not be eligible to receive a retirement benefit that is higher than the benefit we could pay on your record. Generally, your parent also must not have married after your death ; however, there are some exceptions. In addition to your natural parent , your stepparent or adoptive parent may receive benefits if they became your parent before you were age 16. \n\nHow Much Would Your Survivors Receive \nHow much your family could receive in benefits depends on your average lifetime earnings. The higher your earnings were , the higher their benefits would be. We calculate a basic amount as if you had reached full retirement age at the time you die. These are examples of monthly benefit payments : Widow or widower, full retirement age or older 100 percent of your benefit amount ; Widow or widower , age 60 to full retirement age 71 to 99 percent of your basic amount ; Disabled widow or widower , age 50 through 59 71 percent ; Widow or widower , any age, caring for a child under age 16 75 percent ; A child under age 18 19 if still in elementary or secondary school or disabled 75 percent ; and Your dependent parent , age 62 or older : One surviving parent 82 percent. Two surviving parents 75 percent to each parent. Percentages for a surviving divorced spouse would be the same as above. There may also be a special lump - sum death payment. \n\nMaximum Family Amount \nThere's a limit to the amount that family members can receive each month. The limit varies , but it is generally equal to between 150 and 180 percent of the basic benefit rate. If the sum of the benefits payable to family members is greater than this limit , the benefits will be reduced proportionately. Any benefits paid to a surviving divorced spouse based on disability or age won't count toward this maximum amount. Get your online or check our Benefit Calculators for an estimate of the benefits your family could receive if you died right now. \n\nOther Things You Need To Know \nThere are limits on how much survivors may earn while they receive benefits. Benefits for a widow, widower, or surviving divorced spouse may be affected by several additional factors : If your widow, widower, or surviving divorced spouse remarries before they reach age 60 age 50 if disabled , they cannot receive benefits as a surviving spouse while they're married. If your widow, widower, or surviving divorced spouse remarries after they reach age 60 age 50 if disabled , they will continue to qualify for benefits on your Social Security record. However , if their current spouse is a Social Security beneficiary , they may want to apply for spouse's benefits on their record. If that amount is more than the widow's or widower's benefit on your record , they will receive a combination of benefits that equals the higher amount. If your widow, widower, or surviving divorced spouse receives benefits on your record , they can switch to their own retirement benefit as early as age 62. This assumes they're eligible for retirement benefits and their retirement rate is higher than their rate as a widow, widower, or surviving divorced spouse. In many cases , a widow or widower can begin receiving one benefit at a reduced rate and then, at full retirement age, switch to the other benefit at an unreduced rate. If your widow, widower, or surviving divorced spouse will also receive a pension based on work not covered by Social Security, such as government or foreign work , their Social Security benefits as a survivor may be affected. ",
111
+ "spans": [
112
+ {
113
+ "id_sp": "1",
114
+ "tag": "h2",
115
+ "start_sp": 0,
116
+ "end_sp": 61,
117
+ "text_sp": "\n\nBenefits Planner: Survivors | Planning For Your Survivors \n",
118
+ "title": "Benefits Planner: Survivors | Planning For Your Survivors",
119
+ "parent_titles": {
120
+ "id_sp": [],
121
+ "text": [],
122
+ "level": []
123
+ },
124
+ "id_sec": "t_0",
125
+ "start_sec": 0,
126
+ "text_sec": "\n\nBenefits Planner: Survivors | Planning For Your Survivors \n",
127
+ "end_sec": 61
128
+ },
129
+ {
130
+ "id_sp": "2",
131
+ "tag": "u",
132
+ "start_sp": 61,
133
+ "end_sp": 90,
134
+ "text_sp": "As you plan for the future , ",
135
+ "title": "Benefits Planner: Survivors | Planning For Your Survivors",
136
+ "parent_titles": {
137
+ "id_sp": [],
138
+ "text": [],
139
+ "level": []
140
+ },
141
+ "id_sec": "1",
142
+ "start_sec": 61,
143
+ "text_sec": "As you plan for the future , you'll want to think about what your family would need if you should die now. Social Security can help your family if you have earned enough Social Security credits through your work. ",
144
+ "end_sec": 274
145
+ },
146
+ {
147
+ "id_sp": "3",
148
+ "tag": "u",
149
+ "start_sp": 90,
150
+ "end_sp": 168,
151
+ "text_sp": "you'll want to think about what your family would need if you should die now. ",
152
+ "title": "Benefits Planner: Survivors | Planning For Your Survivors",
153
+ "parent_titles": {
154
+ "id_sp": [],
155
+ "text": [],
156
+ "level": []
157
+ },
158
+ "id_sec": "1",
159
+ "start_sec": 61,
160
+ "text_sec": "As you plan for the future , you'll want to think about what your family would need if you should die now. Social Security can help your family if you have earned enough Social Security credits through your work. ",
161
+ "end_sec": 274
162
+ }
163
+ ],
164
+ "doc_html_ts": "<main><section><div><h2 sent_id=\"1\" text_id=\"1\">Benefits Planner: Survivors | Planning For Your Survivors</h2></div></section><section><div><article><section><div tag_id=\"1\"><u sent_id=\"2\" tag_id=\"1\"><u sent_id=\"2\" tag_id=\"1\" text_id=\"2\">As you plan for the future ,</u><u sent_id=\"2\" tag_id=\"1\" text_id=\"3\">you 'll want to think about what your family would need if you should die now .</u></u><u sent_id=\"3\" tag_id=\"1\"><u sent_id=\"3\" tag_id=\"1\" text_id=\"4\">Social Security can help your family if you have earned enough Social Security credits through your work .</u></u></div><div tag_id=\"2\"><u sent_id=\"4\" tag_id=\"2\"><u sent_id=\"4\" tag_id=\"2\" text_id=\"5\">You can earn up to four credits each year .</u></u><u sent_id=\"5\" tag_id=\"2\"><u sent_id=\"5\" tag_id=\"2\" text_id=\"6\">In 2019 ,</u><u sent_id=\"5\" tag_id=\"2\" text_id=\"7\">for example ,</u><u sent_id=\"5\" tag_id=\"2\" text_id=\"8\">you earn one credit for each $ 1,360 of wages or self - employment income .</u></u><u sent_id=\"6\" tag_id=\"2\"><u sent_id=\"6\" tag_id=\"2\" text_id=\"9\">When you have earned $ 5,440 ,</u><u sent_id=\"6\" tag_id=\"2\" text_id=\"10\">you have earned your four credits for the year .</u></u></div><div tag_id=\"3\"><u sent_id=\"7\" tag_id=\"3\"><u sent_id=\"7\" tag_id=\"3\" text_id=\"11\">The number of credits needed to provide benefits for your survivors depends on your age when you die .</u></u><u sent_id=\"8\" tag_id=\"3\"><u sent_id=\"8\" tag_id=\"3\" text_id=\"12\">No one needs more than 40 credits 10 years of work to be eligible for any Social Security benefit .</u></u><u sent_id=\"9\" tag_id=\"3\"><u sent_id=\"9\" tag_id=\"3\" text_id=\"13\">But ,</u><u sent_id=\"9\" tag_id=\"3\" text_id=\"14\">the younger a person is ,</u><u sent_id=\"9\" tag_id=\"3\" text_id=\"15\">the fewer credits they must have for family members to receive survivors benefits .</u></u></div><div tag_id=\"4\"><u sent_id=\"10\" tag_id=\"4\"><u sent_id=\"10\" tag_id=\"4\" text_id=\"16\">Benefits can be paid to your children and your spouse who is caring for the children even if you do n't have the required number of credits .</u></u><u sent_id=\"11\" tag_id=\"4\"><u sent_id=\"11\" tag_id=\"4\" text_id=\"17\">They can get benefits if you have credit for one and one - half years of work 6 credits in the three years just before your death .</u></u></div></section><section><h3 sent_id=\"12\" text_id=\"18\">For Your Widow Or Widower</h3><div tag_id=\"5\"><u sent_id=\"13\" tag_id=\"5\"><u sent_id=\"13\" tag_id=\"5\" text_id=\"19\">There are about five million widows and widowers receiving monthly Social Security benefits based on their deceased spouse 's earnings record .</u></u><u sent_id=\"14\" tag_id=\"5\"><u sent_id=\"14\" tag_id=\"5\" text_id=\"20\">And ,</u><u sent_id=\"14\" tag_id=\"5\" text_id=\"21\">for many of those survivors , particularly aged women , those benefits are keeping them out of poverty .</u></u></div><div tag_id=\"6\"><u sent_id=\"15\" tag_id=\"6\"><u sent_id=\"15\" tag_id=\"6\" text_id=\"22\">Widows and widowers can receive :</u></u></div><ul class=\"browser-default\" tag_id=\"6\"><li tag_id=\"6\"><u sent_id=\"16\" tag_id=\"6\"><u sent_id=\"16\" tag_id=\"6\" text_id=\"23\">reduced benefits as early as age 60 or full benefits at full retirement age or older .</u></u></li><div>If widows or widowers qualify for retirement benefits on their own record, they can switch to their own retirement benefit as early as age 62.</div><li tag_id=\"6\"><u sent_id=\"17\" tag_id=\"6\"><u sent_id=\"17\" tag_id=\"6\" text_id=\"24\">benefits as early as age 50 if they 're disabled AND their disability started before or within seven years of your death .</u></u></li><div>If a widow or widower who is caring for your children receives Social Security benefits, they're still eligible if their disability starts before those payments end or within seven years after they end.</div><li tag_id=\"6\"><u sent_id=\"18\" tag_id=\"6\"><u sent_id=\"18\" tag_id=\"6\" text_id=\"25\">benefits at any age ,</u><u sent_id=\"18\" tag_id=\"6\" text_id=\"26\">if they have not remarried ,</u><u sent_id=\"18\" tag_id=\"6\" text_id=\"27\">and if they take care of your child who is under age 16 or disabled and receives benefits on your record .</u></u></li><div>If a widow or widower remarries <strong>after they reach age 60</strong> (age 50 if disabled), the remarriage will not affect their eligibility for survivors benefits.</div></ul><div>Widows, widowers, and surviving divorced spouses cannot apply online for survivors benefits. They should <a>contact Social Security</a> at <nobr><strong>1-800-772-1213</strong></nobr> (TTY <nobr><strong>1-800-325-0778</strong>) to request an appointment.</nobr></div><div tag_id=\"7\"><u sent_id=\"19\" tag_id=\"7\"><u sent_id=\"19\" tag_id=\"7\" text_id=\"28\">If applying for disability benefits on a deceased worker s record ,</u><u sent_id=\"19\" tag_id=\"7\" text_id=\"29\">they can speed up the application process if they complete an Adult Disability Report and have it available at the time of their appointment .</u></u></div><div tag_id=\"8\"><u sent_id=\"20\" tag_id=\"8\"><u sent_id=\"20\" tag_id=\"8\" text_id=\"30\">We use the same definition of disability for widows and widowers as we do for workers .</u></u></div></section><section><h3 sent_id=\"21\" text_id=\"31\">For Your Surviving Divorced Spouse</h3><div tag_id=\"9\"><u sent_id=\"22\" tag_id=\"9\"><u sent_id=\"22\" tag_id=\"9\" text_id=\"32\">If you have a surviving divorced spouse ,</u><u sent_id=\"22\" tag_id=\"9\" text_id=\"33\">they could get the same benefits as your widow or widower provided that your marriage lasted 10 years or more .</u></u></div><div>If your surviving divorced spouse qualifies for retirement benefits on their own record they can switch to their own retirement benefit as early as age 62.</div><div tag_id=\"10\"><u sent_id=\"23\" tag_id=\"10\"><u sent_id=\"23\" tag_id=\"10\" text_id=\"34\">Benefits paid to a surviving divorced spouse wo n't affect the benefit amounts your other survivors will receive based on your earnings record .</u></u></div><div>If your surviving divorced spouse remarries <strong>after they reach age 60</strong> (age 50 if disabled), the remarriage will not affect their eligibility for survivors benefits.</div><div tag_id=\"11\"><u sent_id=\"24\" tag_id=\"11\"><u sent_id=\"24\" tag_id=\"11\" text_id=\"35\">If your former spouse is caring for your child who is under age 16 or disabled and gets benefits on your record ,</u><u sent_id=\"24\" tag_id=\"11\" text_id=\"36\">they will not have to meet the length - of - marriage rule .</u></u><u sent_id=\"25\" tag_id=\"11\"><u sent_id=\"25\" tag_id=\"11\" text_id=\"37\">The child must be your natural or legally adopted child .</u></u></div><div>However, if they qualify for benefits as a surviving divorced mother or father who is caring for your child, their benefits may affect the amount of benefits your other survivors will receive based on your earnings record.</div></section><section><h3 sent_id=\"26\" text_id=\"38\">For Your Children</h3><div tag_id=\"12\"><u sent_id=\"27\" tag_id=\"12\"><u sent_id=\"27\" tag_id=\"12\" text_id=\"39\">Your unmarried children who are under 18 up to age 19 if attending elementary or secondary school full time can be eligible to receive Social Security benefits when you die .</u></u></div><div tag_id=\"13\"><u sent_id=\"28\" tag_id=\"13\"><u sent_id=\"28\" tag_id=\"13\" text_id=\"40\">And your child can get benefits at any age if they were disabled before age 22 and remain disabled .</u></u></div><div tag_id=\"14\"><u sent_id=\"29\" tag_id=\"14\"><u sent_id=\"29\" tag_id=\"14\" text_id=\"41\">Besides your natural children ,</u><u sent_id=\"29\" tag_id=\"14\" text_id=\"42\">your stepchildren , grandchildren , step grandchildren or adopted children may receive benefits under certain circumstances .</u></u><u sent_id=\"30\" tag_id=\"14\"><u sent_id=\"30\" tag_id=\"14\" text_id=\"43\">For further information ,</u><u sent_id=\"30\" tag_id=\"14\" text_id=\"44\">view our publication .</u></u></div></section><section><h3 sent_id=\"31\" text_id=\"45\">For Your Parents</h3><div tag_id=\"15\"><u sent_id=\"32\" tag_id=\"15\"><u sent_id=\"32\" tag_id=\"15\" text_id=\"46\">You must have been providing at least half of your parent s support and your parent must not be eligible to receive a retirement benefit that is higher than the benefit we could pay on your record .</u></u><u sent_id=\"33\" tag_id=\"15\"><u sent_id=\"33\" tag_id=\"15\" text_id=\"47\">Generally , your parent also must not have married after your death ;</u><u sent_id=\"33\" tag_id=\"15\" text_id=\"48\">however , there are some exceptions .</u></u></div><div tag_id=\"16\"><u sent_id=\"34\" tag_id=\"16\"><u sent_id=\"34\" tag_id=\"16\" text_id=\"49\">In addition to your natural parent ,</u><u sent_id=\"34\" tag_id=\"16\" text_id=\"50\">your stepparent or adoptive parent may receive benefits if they became your parent before you were age 16 .</u></u></div></section><section><h3 sent_id=\"35\" text_id=\"51\">How Much Would Your Survivors Receive</h3><div tag_id=\"17\"><u sent_id=\"36\" tag_id=\"17\"><u sent_id=\"36\" tag_id=\"17\" text_id=\"52\">How much your family could receive in benefits</u><u sent_id=\"36\" tag_id=\"17\" text_id=\"53\">depends on your average lifetime earnings .</u></u><u sent_id=\"37\" tag_id=\"17\"><u sent_id=\"37\" tag_id=\"17\" text_id=\"54\">The higher your earnings were ,</u><u sent_id=\"37\" tag_id=\"17\" text_id=\"55\">the higher their benefits would be .</u></u><u sent_id=\"38\" tag_id=\"17\"><u sent_id=\"38\" tag_id=\"17\" text_id=\"56\">We calculate a basic amount as if you had reached full retirement age at the time you die .</u></u></div><div>If you are already receiving reduced benefits when you die, survivors benefits are based on that amount.</div><div tag_id=\"18\"><u sent_id=\"39\" tag_id=\"18\"><u sent_id=\"39\" tag_id=\"18\" text_id=\"57\">These are examples of monthly benefit payments :</u></u></div><ul class=\"browser-default\" tag_id=\"18\"><li tag_id=\"18\"><u sent_id=\"40\" tag_id=\"18\"><u sent_id=\"40\" tag_id=\"18\" text_id=\"58\">Widow or widower , full retirement age or older 100 percent of your benefit amount ;</u></u></li><li tag_id=\"18\"><u sent_id=\"41\" tag_id=\"18\"><u sent_id=\"41\" tag_id=\"18\" text_id=\"59\">Widow or widower ,</u><u sent_id=\"41\" tag_id=\"18\" text_id=\"60\">age 60 to full retirement age 71 to 99 percent of your basic amount ;</u></u></li><li tag_id=\"18\"><u sent_id=\"42\" tag_id=\"18\"><u sent_id=\"42\" tag_id=\"18\" text_id=\"61\">Disabled widow or widower ,</u><u sent_id=\"42\" tag_id=\"18\" text_id=\"62\">age 50 through 59 71 percent ;</u></u></li><li tag_id=\"18\"><u sent_id=\"43\" tag_id=\"18\"><u sent_id=\"43\" tag_id=\"18\" text_id=\"63\">Widow or widower ,</u><u sent_id=\"43\" tag_id=\"18\" text_id=\"64\">any age , caring for a child under age 16 75 percent ;</u></u></li><li tag_id=\"18\"><u sent_id=\"44\" tag_id=\"18\"><u sent_id=\"44\" tag_id=\"18\" text_id=\"65\">A child under age 18 19 if still in elementary or secondary school or disabled 75 percent ;</u><u sent_id=\"44\" tag_id=\"18\" text_id=\"66\">and</u></u></li><li tag_id=\"18\"><div tag_id=\"18\"><u sent_id=\"48\" tag_id=\"18\"><u sent_id=\"48\" tag_id=\"18\" text_id=\"67\">Your dependent parent ,</u><u sent_id=\"48\" tag_id=\"18\" text_id=\"68\">age 62 or older :</u></u></div><ul class=\"browser-default\" tag_id=\"18\"><li tag_id=\"18\"><u sent_id=\"49\" tag_id=\"18\"><u sent_id=\"49\" tag_id=\"18\" text_id=\"69\">One surviving parent 82 percent .</u></u></li><li tag_id=\"18\"><u sent_id=\"50\" tag_id=\"18\"><u sent_id=\"50\" tag_id=\"18\" text_id=\"70\">Two surviving parents 75 percent to each parent .</u></u></li></ul></li></ul><div tag_id=\"19\"><u sent_id=\"51\" tag_id=\"19\"><u sent_id=\"51\" tag_id=\"19\" text_id=\"71\">Percentages for a surviving divorced spouse would be the same as above .</u></u></div><div tag_id=\"20\"><u sent_id=\"52\" tag_id=\"20\"><u sent_id=\"52\" tag_id=\"20\" text_id=\"72\">There may also be a special lump - sum death payment .</u></u></div><h3 sent_id=\"53\" text_id=\"73\">Maximum Family Amount</h3><div tag_id=\"21\"><u sent_id=\"54\" tag_id=\"21\"><u sent_id=\"54\" tag_id=\"21\" text_id=\"74\">There 's a limit to the amount that family members can receive each month .</u></u><u sent_id=\"55\" tag_id=\"21\"><u sent_id=\"55\" tag_id=\"21\" text_id=\"75\">The limit varies ,</u><u sent_id=\"55\" tag_id=\"21\" text_id=\"76\">but it is generally equal to between 150 and 180 percent of the basic benefit rate .</u></u></div><div tag_id=\"22\"><u sent_id=\"56\" tag_id=\"22\"><u sent_id=\"56\" tag_id=\"22\" text_id=\"77\">If the sum of the benefits payable to family members is greater than this limit ,</u><u sent_id=\"56\" tag_id=\"22\" text_id=\"78\">the benefits will be reduced proportionately .</u></u><u sent_id=\"57\" tag_id=\"22\"><u sent_id=\"57\" tag_id=\"22\" text_id=\"79\">Any benefits paid to a surviving divorced spouse based on disability or age wo n't count toward this maximum amount .</u></u></div><div tag_id=\"23\"><u sent_id=\"58\" tag_id=\"23\"><u sent_id=\"58\" tag_id=\"23\" text_id=\"80\">Get your online or check our Benefit Calculators for an estimate of the benefits your family could receive if you died right now .</u></u></div><h3 sent_id=\"59\" text_id=\"81\">Other Things You Need To Know</h3><div tag_id=\"24\"><u sent_id=\"60\" tag_id=\"24\"><u sent_id=\"60\" tag_id=\"24\" text_id=\"82\">There are limits on how much survivors may earn while they receive benefits .</u></u></div><div tag_id=\"25\"><u sent_id=\"61\" tag_id=\"25\"><u sent_id=\"61\" tag_id=\"25\" text_id=\"83\">Benefits for a widow , widower , or surviving divorced spouse may be affected by several additional factors :</u></u></div><div><a>If they remarry</a><section><div tag_id=\"26\"><u sent_id=\"62\" tag_id=\"26\"><u sent_id=\"62\" tag_id=\"26\" text_id=\"84\">If your widow , widower , or surviving divorced spouse remarries before they reach age 60 age 50 if disabled ,</u><u sent_id=\"62\" tag_id=\"26\" text_id=\"85\">they can not receive benefits as a surviving spouse while they 're married .</u></u></div><div tag_id=\"27\"><u sent_id=\"63\" tag_id=\"27\"><u sent_id=\"63\" tag_id=\"27\" text_id=\"86\">If your widow , widower , or surviving divorced spouse remarries after they reach age 60 age 50 if disabled ,</u><u sent_id=\"63\" tag_id=\"27\" text_id=\"87\">they will continue to qualify for benefits on your Social Security record .</u></u></div><div tag_id=\"28\"><u sent_id=\"64\" tag_id=\"28\"><u sent_id=\"64\" tag_id=\"28\" text_id=\"88\">However ,</u><u sent_id=\"64\" tag_id=\"28\" text_id=\"89\">if their current spouse is a Social Security beneficiary ,</u><u sent_id=\"64\" tag_id=\"28\" text_id=\"90\">they may want to apply for spouse 's benefits on their record .</u></u><u sent_id=\"65\" tag_id=\"28\"><u sent_id=\"65\" tag_id=\"28\" text_id=\"91\">If that amount is more than the widow 's or widower 's benefit on your record ,</u><u sent_id=\"65\" tag_id=\"28\" text_id=\"92\">they will receive a combination of benefits that equals the higher amount .</u></u></div></section></div><div><a>If they're eligible for retirement benefits on their own record</a><section><div tag_id=\"29\"><u sent_id=\"66\" tag_id=\"29\"><u sent_id=\"66\" tag_id=\"29\" text_id=\"93\">If your widow , widower , or surviving divorced spouse receives benefits on your record ,</u><u sent_id=\"66\" tag_id=\"29\" text_id=\"94\">they can switch to their own retirement benefit as early as age 62 .</u></u><u sent_id=\"67\" tag_id=\"29\"><u sent_id=\"67\" tag_id=\"29\" text_id=\"95\">This assumes they 're eligible for retirement benefits and their retirement rate is higher than their rate as a widow , widower , or surviving divorced spouse .</u></u></div><div tag_id=\"30\"><u sent_id=\"68\" tag_id=\"30\"><u sent_id=\"68\" tag_id=\"30\" text_id=\"96\">In many cases ,</u><u sent_id=\"68\" tag_id=\"30\" text_id=\"97\">a widow or widower can begin receiving one benefit at a reduced rate and then , at full retirement age , switch to the other benefit at an unreduced rate .</u></u></div><div><a>Full retirement age for retirement benefits</a> may not match full retirement age for survivors benefits.</div></section></div><div><a>If they will also receive a pension based on work not covered by Social Security</a><section><div tag_id=\"31\"><u sent_id=\"69\" tag_id=\"31\"><u sent_id=\"69\" tag_id=\"31\" text_id=\"98\">If your widow , widower , or surviving divorced spouse will also receive a pension based on work not covered by Social Security , such as government or foreign work ,</u><u sent_id=\"69\" tag_id=\"31\" text_id=\"99\">their Social Security benefits as a survivor may be affected .</u></u></div></section></div></section></article></div></section></main>",
165
+ "doc_html_raw": "<main class=\"content\" id=\"content\" role=\"main\">\n\n<section>\n\n<div>\n<h2>Benefits Planner: Survivors | Planning For Your Survivors</h2>\n</div>\n</section>\n\n<section>\n\n<div>\n\n<div>\n\n\n</div>\n\n\n\n<article>\n<section>\n<p>As you plan for the future, you'll want to think about what your family would need if you should die now. Social Security can help your family if you have earned enough Social Security credits through your work.</p>\n<p><a>You can earn up to four credits each year</a>. In 2019, for example, you earn one credit for each $1,360 of wages or <a>self-employment</a> income. When you have earned $5,440, you have earned your four credits for the year.</p>\n<p>The number of credits needed to provide benefits for your survivors depends on your age when you die. No one needs more than 40 credits (10 years of work) to be eligible for any Social Security benefit. But, the younger a person is, the fewer credits they must have for family members to receive survivors benefits.</p>\n<p>Benefits can be paid to your children and your spouse who is caring for the children even if you don't have the required number of credits. They can get benefits if you have credit for one and one-half years of work (6 credits) in the three years just before your death.</p>\n</section>\n<section>\n<h3>For Your Widow Or Widower</h3>\n<p>There are about five million widows and widowers receiving monthly Social Security benefits based on their deceased spouse's earnings record. And, for many of those survivors, particularly aged women, those benefits are keeping them out of poverty. </p>\n<p>Widows and widowers can receive:</p>\n<ul class=\"browser-default\">\n<li>reduced benefits as early as age 60 or full benefits at <a>full retirement age</a> or older.</li>\n<div>\n If widows or widowers qualify for retirement benefits on their own record, they can switch to their own retirement benefit as early as age 62.\n </div>\n<li>benefits as early as age 50 if they're disabled AND their disability started before or within seven years of your death.</li>\n<div>\n If a widow or widower who is caring for your children receives Social Security benefits, they're still eligible if their disability starts before those payments end or within seven years after they end.\n </div>\n<li>benefits at any age, if they have not remarried, and if they take care of your child who is under age 16 or disabled and receives benefits on your record.</li>\n<div>\n If a widow or widower remarries <strong>after they reach age 60</strong> (age 50 if disabled), the remarriage will not affect their eligibility for survivors benefits.\n </div>\n</ul>\n<div>\n Widows, widowers, and surviving divorced spouses cannot apply online for survivors benefits. They should <a>contact Social Security</a> at <nobr><strong>1-800-772-1213</strong></nobr> (TTY <nobr><strong>1-800-325-0778</strong>) to request an appointment.</nobr>\n</div>\n<p>If applying for disability benefits on a deceased worker s record, they can speed up the application process if they complete an <a>Adult Disability Report</a> and have it available at the time of their appointment.</p>\n<p>We use the same <a>definition of disability</a> for widows and widowers as we do for workers.</p>\n</section>\n<section>\n<h3>For Your Surviving Divorced Spouse</h3>\n<p>If you have a surviving divorced spouse, they could get the same benefits as your widow or widower provided that your marriage lasted 10 years or more.</p>\n<div>\n If your surviving divorced spouse qualifies for retirement benefits on their own record they can switch to their own retirement benefit as early as age 62.\n </div>\n<p>Benefits paid to a surviving divorced spouse won't affect the benefit amounts your other survivors will receive based on your earnings record.</p>\n<div>\n If your surviving divorced spouse remarries <strong>after they reach age 60</strong> (age 50 if disabled), the remarriage will not affect their eligibility for survivors benefits.\n </div>\n<p>If your former spouse is caring for your child who is under age 16 or disabled and gets benefits on your record, they will not have to meet the length-of-marriage rule. The child must be your natural or legally adopted child.</p>\n<div>\n However, if they qualify for benefits as a surviving divorced mother or father who is caring for your child, their benefits may affect the amount of benefits your other survivors will receive based on your earnings record.\n </div>\n</section>\n<section>\n<h3>For Your Children</h3>\n<p>Your unmarried children who are under 18 (up to age 19 if attending elementary or secondary school full time) can be eligible to receive Social Security benefits when you die.</p>\n<p>And your child can get benefits at any age if they were disabled before age 22 and remain disabled.</p>\n<p>Besides your natural children, your stepchildren, grandchildren, step grandchildren or adopted children may receive benefits under certain circumstances. For further information, view our <a>publication</a>.</p>\n</section>\n<section>\n<h3>For Your Parents</h3>\n<p>You must have been providing at least half of your parent s support and your parent must not be eligible to receive a retirement benefit that is higher than the benefit we could pay on your record. Generally, your parent also must not have married after your death; however, there are some exceptions.</p>\n<p>In addition to your natural parent, your stepparent or adoptive parent may receive benefits if they became your parent before you were age 16.</p>\n</section>\n<section>\n<h3>How Much Would Your Survivors Receive</h3>\n<p>How much your family could receive in benefits depends on your average lifetime earnings. The higher your earnings were, the higher their benefits would be. We calculate a basic amount as if you had reached full retirement age at the time you die.</p>\n<div>\n If you are already receiving reduced benefits when you die, survivors benefits are based on that amount.\n </div>\n<p>These are examples of monthly benefit payments:</p>\n<ul class=\"browser-default\">\n<li>Widow or widower, <a>full retirement age</a> or older 100 percent of your benefit amount;</li>\n<li>Widow or widower, age 60 to <a>full retirement age</a> 71 to 99 percent of your basic amount;</li>\n<li>Disabled widow or widower, age 50 through 59 71 percent;</li>\n<li>Widow or widower, any age, caring for a child under age 16 75 percent;</li>\n<li>A child under age 18 (19 if still in elementary or secondary school) or disabled 75 percent; and</li>\n<li>Your dependent parent(s), age 62 or older:\n <ul class=\"browser-default\">\n<li>One surviving parent 82 percent.</li>\n<li>Two surviving parents 75 percent to each parent.</li>\n</ul>\n</li>\n</ul>\n<p>Percentages for a surviving divorced spouse would be the same as above.</p>\n<p>There may also be a <a>special lump-sum death payment</a>.</p>\n<h3>Maximum Family Amount</h3>\n<p>There's a limit to the amount that family members can receive each month. <a>The limit varies</a>, but it is generally equal to between 150 and 180 percent of the basic benefit rate.</p>\n<p>If the sum of the benefits payable to family members is greater than this limit, the benefits will be reduced proportionately. (Any benefits paid to a surviving divorced spouse based on disability or age won't count toward this maximum amount.)</p>\n<p>Get your <a></a> online or check our <a>Benefit Calculators</a> for an estimate of the benefits your family could receive if you died right now.</p>\n<h3>Other Things You Need To Know</h3>\n<p>There are <a>limits on how much survivors may earn</a> while they receive benefits.</p>\n<p>Benefits for a widow, widower, or surviving divorced spouse may be affected by several additional factors:</p>\n<div>\n<a>If they remarry</a>\n<section>\n<p>If your widow, widower, or surviving divorced spouse remarries before they reach age 60 (age 50 if disabled), they cannot receive benefits as a surviving spouse while they're married.</p>\n<p>If your widow, widower, or surviving divorced spouse remarries after they reach age 60 (age 50 if disabled), they will continue to qualify for benefits on your Social Security record.</p>\n<p>However, if their current spouse is a Social Security beneficiary, they may want to apply for spouse's benefits on their record. If that amount is more than the widow's or widower's benefit on your record, they will receive a combination of benefits that equals the higher amount.</p>\n</section>\n</div>\n<div>\n<a>If they're eligible for retirement benefits on their own record</a>\n<section>\n<p>If your widow, widower, or surviving divorced spouse receives benefits on your record, they can switch to their own retirement benefit as early as age 62. This assumes they're eligible for retirement benefits and their retirement rate is higher than their rate as a widow, widower, or surviving divorced spouse.</p>\n<p>In many cases, a widow or widower can begin receiving one benefit at a reduced rate and then, at full retirement age, switch to the other benefit at an unreduced rate.</p>\n<div>\n<a>Full retirement age for retirement benefits</a> may not match full retirement age for survivors benefits.\n </div>\n</section>\n</div>\n<div>\n<a>If they will also receive a pension based on work not covered by Social Security</a>\n<section>\n<p>If your widow, widower, or surviving divorced spouse will also receive a pension based on work not covered by Social Security, such as government or foreign work, <a>their Social Security benefits as a survivor may be affected</a>.</p>\n</section>\n</div>\n</section>\n</article>\n</div>\n</section>\n</main>"
166
+ }
167
+ ```
168
+
169
+ Sample data instance for `dialogue_domain` :
170
+
171
+ ```
172
+ {
173
+ "dial_id": "8df07b7a98990db27c395cb1f68a962e",
174
+ "domain": "dmv",
175
+ "turns": [
176
+ {
177
+ "turn_id": 1,
178
+ "role": "user",
179
+ "da": "query_condition",
180
+ "references": [
181
+ {
182
+ "id_sp": "4",
183
+ "label": "precondition",
184
+ "doc_id": "Top 5 DMV Mistakes and How to Avoid Them#3_0"
185
+ }
186
+ ],
187
+ "utterance": "Hello, I forgot o update my address, can you help me with that?"
188
+ },
189
+ {
190
+ "turn_id": 2,
191
+ "role": "agent",
192
+ "da": "respond_solution",
193
+ "references": [
194
+ {
195
+ "id_sp": "6",
196
+ "label": "solution",
197
+ "doc_id": "Top 5 DMV Mistakes and How to Avoid Them#3_0"
198
+ },
199
+ {
200
+ "id_sp": "7",
201
+ "label": "solution",
202
+ "doc_id": "Top 5 DMV Mistakes and How to Avoid Them#3_0"
203
+ }
204
+ ],
205
+ "utterance": "hi, you have to report any change of address to DMV within 10 days after moving. You should do this both for the address associated with your license and all the addresses associated with all your vehicles."
206
+ },
207
+ {
208
+ "turn_id": 3,
209
+ "role": "user",
210
+ "da": "query_solution",
211
+ "references": [
212
+ {
213
+ "id_sp": "56",
214
+ "label": "solution",
215
+ "doc_id": "Top 5 DMV Mistakes and How to Avoid Them#3_0"
216
+ }
217
+ ],
218
+ "utterance": "Can I do my DMV transactions online?"
219
+ }
220
+ ]
221
+ }
222
+ ```
223
+
224
+
225
+ ### Data Fields
226
+
227
+ - `document_domain` contains the documents that are indexed by key `domain` and `doc_id` . Each document instance includes the following,
228
+
229
+ - `domain`: the domain of the document;
230
+ - `doc_id`: the ID of a document;
231
+ - `title`: the title of the document;
232
+ - `doc_text`: the text content of the document (without HTML markups);
233
+ - `spans`: key-value pairs of all spans in the document, with `id_sp` as key. Each span includes the following,
234
+ - `id_sp`: the id of a span as noted by `text_id` in `doc_html_ts`;
235
+ - `start_sp`/ `end_sp`: the start/end position of the text span in `doc_text`;
236
+ - `text_sp`: the text content of the span.
237
+ - `id_sec`: the id of the (sub)section (e.g. `<p>`) or title (`<h2>`) that contains the span.
238
+ - `start_sec` / `end_sec`: the start/end position of the (sub)section in `doc_text`.
239
+ - `text_sec`: the text of the (sub)section.
240
+ - `title`: the title of the (sub)section.
241
+ - `parent_titles`: the parent titles of the `title`.
242
+ - `doc_html_ts`: the document content with HTML markups and the annotated spans that are indicated by `text_id` attribute, which corresponds to `id_sp`.
243
+ - `doc_html_raw`: the document content with HTML markups and without span annotations.
244
+
245
+
246
+ - `dialogue_domain`
247
+
248
+ Each dialogue instance includes the following,
249
+
250
+ - `dial_id`: the ID of a dialogue;
251
+ - `domain`: the domain of the document;
252
+ - `turns`: a list of dialogue turns. Each turn includes,
253
+ - `turn_id`: the time order of the turn;
254
+ - `role`: either "agent" or "user";
255
+ - `da`: dialogue act;
256
+ - `references`: a list of spans with `id_sp` , `label` and `doc_id`. `references` is empty if a turn is for indicating previous user query not answerable or irrelevant to the document. **Note** that labels "*precondition*"/"*solution*" are fuzzy annotations that indicate whether a span is for describing a conditional context or a solution.
257
+ - `utterance`: the human-generated utterance based on the dialogue scene.
258
+
259
+
260
+ - `multidoc2dial`
261
+
262
+ Each dialogue instance includes the following,
263
+
264
+ - `id`: the ID of a QA instance
265
+ - `title`: the title of the relevant document;
266
+ - `context`: the text content of the relevant document (without HTML markups).
267
+ - `question`: user query;
268
+ - `da`: dialogue act;
269
+ - `answers`: the answers that are grounded in the associated document;
270
+ - `text`: the text content of the grounding span;
271
+ - `answer_start`: the start position of the grounding span in the associated document (context);
272
+ - `utterance`: the human-generated utterance based on the dialogue scene.
273
+ - `domain`: domain of the relevant document;
274
+
275
+ ### Data Splits
276
+
277
+ Training, dev and test split for default configuration `multidoc2dial`, with respectively 21451, 4201 and 5 examples,
278
+ - Training & dev split for dialogue domain, with 3474 and 661 examples,
279
+ - Training split only for document domain, with 488 examples.
280
+
281
+ ## Dataset Creation
282
+
283
+ ### Curation Rationale
284
+
285
+ [More Information Needed]
286
+
287
+ ### Source Data
288
+
289
+ #### Initial Data Collection and Normalization
290
+
291
+ [More Information Needed]
292
+
293
+ #### Who are the source language producers?
294
+
295
+ [More Information Needed]
296
+
297
+ ### Annotations
298
+
299
+ #### Annotation process
300
+
301
+ [More Information Needed]
302
+
303
+ #### Who are the annotators?
304
+
305
+ [More Information Needed]
306
+
307
+ ### Personal and Sensitive Information
308
+
309
+ [More Information Needed]
310
+
311
+ ## Considerations for Using the Data
312
+
313
+ ### Social Impact of Dataset
314
+
315
+ [More Information Needed]
316
+
317
+ ### Discussion of Biases
318
+
319
+ [More Information Needed]
320
+
321
+ ### Other Known Limitations
322
+
323
+ [More Information Needed]
324
+
325
+ ## Additional Information
326
+
327
+ ### Dataset Curators
328
+
329
+ Song Feng, Siva Sankalp Patel, Hui Wan, Sachindra Joshi
330
+
331
+ ### Licensing Information
332
+
333
+ Creative Commons Attribution 3.0 Unported
334
+
335
+ ### Citation Information
336
+
337
+ ```bibtex
338
+ @inproceedings{feng2021multidoc2dial,
339
+ title={MultiDoc2Dial: Modeling Dialogues Grounded in Multiple Documents},
340
+ author={Feng, Song and Patel, Siva Sankalp and Wan, Hui and Joshi, Sachindra},
341
+ booktitle={EMNLP},
342
+ year={2021}
343
+ }
344
+ ```
345
+
346
+ ### Contributions
347
+
348
+ Thanks to [@songfeng](https://github.com/songfeng) and [@sivasankalpp](https://github.com/sivasankalpp) for adding this dataset.
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"dialogue_domain": {"description": "MultiDoc2Dial is a new task and dataset on modeling goal-oriented dialogues grounded in multiple documents. Most previous works treat document-grounded dialogue modeling as a machine reading comprehension task based on a single given document or passage. We aim to address more realistic scenarios where a goal-oriented information-seeking conversation involves multiple topics, and hence is grounded on different documents. \n", "citation": "@inproceedings{feng2021multidoc2dial,\n title={MultiDoc2Dial: Modeling Dialogues Grounded in Multiple Documents},\n author={Feng, Song and Patel, Siva Sankalp and Wan, Hui and Joshi, Sachindra},\n booktitle={EMNLP},\n year={2021}\n}\n", "homepage": "https://doc2dial.github.io/multidoc2dial/", "license": "", "features": {"dial_id": {"dtype": "string", "id": null, "_type": "Value"}, "domain": {"dtype": "string", "id": null, "_type": "Value"}, "turns": [{"turn_id": {"dtype": "int32", "id": null, "_type": "Value"}, "role": {"dtype": "string", "id": null, "_type": "Value"}, "da": {"dtype": "string", "id": null, "_type": "Value"}, "references": [{"id_sp": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"dtype": "string", "id": null, "_type": "Value"}, "doc_id": {"dtype": "string", "id": null, "_type": "Value"}}], "utterance": {"dtype": "string", "id": null, "_type": "Value"}}]}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "multi_doc2dial", "config_name": "dialogue_domain", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 11700598, "num_examples": 3474, "dataset_name": "multi_doc2dial"}, "validation": {"name": "validation", "num_bytes": 2210378, "num_examples": 661, "dataset_name": "multi_doc2dial"}}, "download_checksums": {"https://doc2dial.github.io/multidoc2dial/file/multidoc2dial.zip": {"num_bytes": 6451144, "checksum": "a8051237dd3be50d81c06aca82ed5171716922e35f44bfa5b9c024f090903419"}}, "download_size": 6451144, "post_processing_size": null, "dataset_size": 13910976, "size_in_bytes": 20362120}, "document_domain": {"description": "MultiDoc2Dial is a new task and dataset on modeling goal-oriented dialogues grounded in multiple documents. Most previous works treat document-grounded dialogue modeling as a machine reading comprehension task based on a single given document or passage. We aim to address more realistic scenarios where a goal-oriented information-seeking conversation involves multiple topics, and hence is grounded on different documents. \n", "citation": "@inproceedings{feng2021multidoc2dial,\n title={MultiDoc2Dial: Modeling Dialogues Grounded in Multiple Documents},\n author={Feng, Song and Patel, Siva Sankalp and Wan, Hui and Joshi, Sachindra},\n booktitle={EMNLP},\n year={2021}\n}\n", "homepage": "https://doc2dial.github.io/multidoc2dial/", "license": "", "features": {"domain": {"dtype": "string", "id": null, "_type": "Value"}, "doc_id": {"dtype": "string", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "doc_text": {"dtype": "string", "id": null, "_type": "Value"}, "spans": [{"id_sp": {"dtype": "string", "id": null, "_type": "Value"}, "tag": {"dtype": "string", "id": null, "_type": "Value"}, "start_sp": {"dtype": "int32", "id": null, "_type": "Value"}, "end_sp": {"dtype": "int32", "id": null, "_type": "Value"}, "text_sp": {"dtype": "string", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "parent_titles": {"feature": {"id_sp": {"dtype": "string", "id": null, "_type": "Value"}, "text": {"dtype": "string", "id": null, "_type": "Value"}, "level": {"dtype": "string", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}, "id_sec": {"dtype": "string", "id": null, "_type": "Value"}, "start_sec": {"dtype": "int32", "id": null, "_type": "Value"}, "text_sec": {"dtype": "string", "id": null, "_type": "Value"}, "end_sec": {"dtype": "int32", "id": null, "_type": "Value"}}], "doc_html_ts": {"dtype": "string", "id": null, "_type": "Value"}, "doc_html_raw": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "multi_doc2dial", "config_name": "document_domain", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 29378955, "num_examples": 488, "dataset_name": "multi_doc2dial"}}, "download_checksums": {"https://doc2dial.github.io/multidoc2dial/file/multidoc2dial.zip": {"num_bytes": 6451144, "checksum": "a8051237dd3be50d81c06aca82ed5171716922e35f44bfa5b9c024f090903419"}}, "download_size": 6451144, "post_processing_size": null, "dataset_size": 29378955, "size_in_bytes": 35830099}, "multidoc2dial": {"description": "MultiDoc2Dial is a new task and dataset on modeling goal-oriented dialogues grounded in multiple documents. Most previous works treat document-grounded dialogue modeling as a machine reading comprehension task based on a single given document or passage. We aim to address more realistic scenarios where a goal-oriented information-seeking conversation involves multiple topics, and hence is grounded on different documents. \n", "citation": "@inproceedings{feng2021multidoc2dial,\n title={MultiDoc2Dial: Modeling Dialogues Grounded in Multiple Documents},\n author={Feng, Song and Patel, Siva Sankalp and Wan, Hui and Joshi, Sachindra},\n booktitle={EMNLP},\n year={2021}\n}\n", "homepage": "https://doc2dial.github.io/multidoc2dial/", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "context": {"dtype": "string", "id": null, "_type": "Value"}, "question": {"dtype": "string", "id": null, "_type": "Value"}, "da": {"dtype": "string", "id": null, "_type": "Value"}, "answers": {"feature": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "answer_start": {"dtype": "int32", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}, "utterance": {"dtype": "string", "id": null, "_type": "Value"}, "domain": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "multi_doc2dial", "config_name": "multidoc2dial", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"validation": {"name": "validation", "num_bytes": 24331976, "num_examples": 4201, "dataset_name": "multi_doc2dial"}, "train": {"name": "train", "num_bytes": 126589982, "num_examples": 21451, "dataset_name": "multi_doc2dial"}, "test": {"name": "test", "num_bytes": 33032, "num_examples": 5, "dataset_name": "multi_doc2dial"}}, "download_checksums": {"https://doc2dial.github.io/multidoc2dial/file/multidoc2dial.zip": {"num_bytes": 6451144, "checksum": "a8051237dd3be50d81c06aca82ed5171716922e35f44bfa5b9c024f090903419"}}, "download_size": 6451144, "post_processing_size": null, "dataset_size": 150954990, "size_in_bytes": 157406134}}
dummy/dialogue_domain/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f3d82bb5e67d5906037da55ec6ec9346d769c16152dc07178dc46c86c3b7969d
3
+ size 5963
dummy/document_domain/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f3d82bb5e67d5906037da55ec6ec9346d769c16152dc07178dc46c86c3b7969d
3
+ size 5963
dummy/multidoc2dial/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f3d82bb5e67d5906037da55ec6ec9346d769c16152dc07178dc46c86c3b7969d
3
+ size 5963
multidoc2dial.py ADDED
@@ -0,0 +1,364 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace Datasets Authors.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ # Lint as: python3
17
+ """MultiDoc2Dial: Modeling Dialogues Grounded in Multiple Documents"""
18
+
19
+
20
+ import json
21
+ import os
22
+
23
+ import datasets
24
+
25
+
26
+ logger = datasets.logging.get_logger(__name__)
27
+
28
+ _CITATION = """\
29
+ @inproceedings{feng2021multidoc2dial,
30
+ title={MultiDoc2Dial: Modeling Dialogues Grounded in Multiple Documents},
31
+ author={Feng, Song and Patel, Siva Sankalp and Wan, Hui and Joshi, Sachindra},
32
+ booktitle={EMNLP},
33
+ year={2021}
34
+ }
35
+ """
36
+
37
+ _DESCRIPTION = """\
38
+ MultiDoc2Dial is a new task and dataset on modeling goal-oriented dialogues grounded in multiple documents. \
39
+ Most previous works treat document-grounded dialogue modeling as a machine reading comprehension task based on a \
40
+ single given document or passage. We aim to address more realistic scenarios where a goal-oriented information-seeking \
41
+ conversation involves multiple topics, and hence is grounded on different documents.
42
+ """
43
+
44
+ _HOMEPAGE = "https://doc2dial.github.io/multidoc2dial/"
45
+
46
+
47
+ _URL = "https://doc2dial.github.io/multidoc2dial/file/multidoc2dial.zip"
48
+
49
+
50
+ class MultiDoc2dial(datasets.GeneratorBasedBuilder):
51
+ """MultiDoc2Dial v1.0"""
52
+
53
+ VERSION = datasets.Version("1.0.0")
54
+
55
+ BUILDER_CONFIGS = [
56
+ datasets.BuilderConfig(
57
+ name="dialogue_domain",
58
+ version=VERSION,
59
+ description="This part of the dataset covers the dialogue domain that has questions, answers and the associated doc ids",
60
+ ),
61
+ datasets.BuilderConfig(
62
+ name="document_domain",
63
+ version=VERSION,
64
+ description="This part of the dataset covers the document domain which details all the documents in the various domains",
65
+ ),
66
+ datasets.BuilderConfig(
67
+ name="multidoc2dial",
68
+ version=VERSION,
69
+ description="Load MultiDoc2Dial dataset for machine reading comprehension tasks",
70
+ ),
71
+ ]
72
+
73
+ DEFAULT_CONFIG_NAME = "multidoc2dial"
74
+
75
+ def _info(self):
76
+
77
+ if self.config.name == "dialogue_domain":
78
+ features = datasets.Features(
79
+ {
80
+ "dial_id": datasets.Value("string"),
81
+ "domain": datasets.Value("string"),
82
+ "turns": [
83
+ {
84
+ "turn_id": datasets.Value("int32"),
85
+ "role": datasets.Value("string"),
86
+ "da": datasets.Value("string"),
87
+ "references": [
88
+ {
89
+ "id_sp": datasets.Value("string"),
90
+ "label": datasets.Value("string"),
91
+ "doc_id": datasets.Value("string"),
92
+ }
93
+ ],
94
+ "utterance": datasets.Value("string"),
95
+ }
96
+ ],
97
+ }
98
+ )
99
+
100
+ elif "document_domain" in self.config.name:
101
+ features = datasets.Features(
102
+ {
103
+ "domain": datasets.Value("string"),
104
+ "doc_id": datasets.Value("string"),
105
+ "title": datasets.Value("string"),
106
+ "doc_text": datasets.Value("string"),
107
+ "spans": [
108
+ {
109
+ "id_sp": datasets.Value("string"),
110
+ "tag": datasets.Value("string"),
111
+ "start_sp": datasets.Value("int32"),
112
+ "end_sp": datasets.Value("int32"),
113
+ "text_sp": datasets.Value("string"),
114
+ "title": datasets.Value("string"),
115
+ "parent_titles": datasets.features.Sequence(
116
+ {
117
+ "id_sp": datasets.Value("string"),
118
+ "text": datasets.Value("string"),
119
+ "level": datasets.Value("string"),
120
+ }
121
+ ),
122
+ "id_sec": datasets.Value("string"),
123
+ "start_sec": datasets.Value("int32"),
124
+ "text_sec": datasets.Value("string"),
125
+ "end_sec": datasets.Value("int32"),
126
+ }
127
+ ],
128
+ "doc_html_ts": datasets.Value("string"),
129
+ "doc_html_raw": datasets.Value("string"),
130
+ }
131
+ )
132
+
133
+ else:
134
+ features = datasets.Features(
135
+ {
136
+ "id": datasets.Value("string"),
137
+ "title": datasets.Value("string"),
138
+ "context": datasets.Value("string"),
139
+ "question": datasets.Value("string"),
140
+ "da": datasets.Value("string"),
141
+ "answers": datasets.features.Sequence(
142
+ {
143
+ "text": datasets.Value("string"),
144
+ "answer_start": datasets.Value("int32"),
145
+ }
146
+ ),
147
+ "utterance": datasets.Value("string"),
148
+ "domain": datasets.Value("string"),
149
+ }
150
+ )
151
+
152
+ return datasets.DatasetInfo(
153
+ description=_DESCRIPTION,
154
+ features=features,
155
+ supervised_keys=None,
156
+ homepage=_HOMEPAGE,
157
+ citation=_CITATION,
158
+ )
159
+
160
+ def _split_generators(self, dl_manager):
161
+
162
+ data_dir = dl_manager.download_and_extract(_URL)
163
+
164
+ if self.config.name == "dialogue_domain":
165
+ return [
166
+ datasets.SplitGenerator(
167
+ name=datasets.Split.TRAIN,
168
+ gen_kwargs={
169
+ "filepath": os.path.join(data_dir, "multidoc2dial/multidoc2dial_dial_train.json"),
170
+ },
171
+ ),
172
+ datasets.SplitGenerator(
173
+ name=datasets.Split.VALIDATION,
174
+ gen_kwargs={
175
+ "filepath": os.path.join(data_dir, "multidoc2dial/multidoc2dial_dial_validation.json"),
176
+ },
177
+ ),
178
+ ]
179
+ elif self.config.name == "document_domain":
180
+ return [
181
+ datasets.SplitGenerator(
182
+ name=datasets.Split.TRAIN,
183
+ gen_kwargs={
184
+ "filepath": os.path.join(data_dir, "multidoc2dial/multidoc2dial_doc.json"),
185
+ },
186
+ )
187
+ ]
188
+ elif "multidoc2dial_" in self.config.name:
189
+ domain = self.config.name.split("_")[-1]
190
+ return [
191
+ datasets.SplitGenerator(
192
+ name=datasets.Split.VALIDATION,
193
+ gen_kwargs={
194
+ "filepath": os.path.join(
195
+ data_dir,
196
+ "multidoc2dial_domain",
197
+ domain,
198
+ "multidoc2dial_dial_validation.json",
199
+ ),
200
+ },
201
+ ),
202
+ datasets.SplitGenerator(
203
+ name=datasets.Split.TRAIN,
204
+ gen_kwargs={
205
+ "filepath": os.path.join(
206
+ data_dir,
207
+ "multidoc2dial_domain",
208
+ domain,
209
+ "multidoc2dial_dial_train.json",
210
+ ),
211
+ },
212
+ ),
213
+ datasets.SplitGenerator(
214
+ name=datasets.Split.TEST,
215
+ gen_kwargs={
216
+ "filepath": os.path.join(
217
+ data_dir,
218
+ "multidoc2dial_domain",
219
+ domain,
220
+ "multidoc2dial_dial_test.json",
221
+ ),
222
+ },
223
+ ),
224
+ ]
225
+ elif self.config.name == "multidoc2dial":
226
+ return [
227
+ datasets.SplitGenerator(
228
+ name=datasets.Split.VALIDATION,
229
+ gen_kwargs={
230
+ "filepath": os.path.join(data_dir, "multidoc2dial/multidoc2dial_dial_validation.json"),
231
+ },
232
+ ),
233
+ datasets.SplitGenerator(
234
+ name=datasets.Split.TRAIN,
235
+ gen_kwargs={
236
+ "filepath": os.path.join(data_dir, "multidoc2dial/multidoc2dial_dial_train.json"),
237
+ },
238
+ ),
239
+ datasets.SplitGenerator(
240
+ name=datasets.Split.TEST,
241
+ gen_kwargs={
242
+ "filepath": os.path.join(data_dir, "multidoc2dial/multidoc2dial_dial_test.json"),
243
+ },
244
+ ),
245
+ ]
246
+
247
+ def _load_doc_data_rc(self, filepath):
248
+ doc_filepath = os.path.join(os.path.dirname(filepath), "multidoc2dial_doc.json")
249
+ with open(doc_filepath, encoding="utf-8") as f:
250
+ data = json.load(f)["doc_data"]
251
+ return data
252
+
253
+ def _get_answers_rc(self, references, spans, doc_text):
254
+ """Obtain the grounding annotation for a given dialogue turn"""
255
+ if not references:
256
+ return []
257
+ start, end = -1, -1
258
+ ls_sp = []
259
+ for ele in references:
260
+ id_sp = ele["id_sp"]
261
+ start_sp, end_sp = spans[id_sp]["start_sp"], spans[id_sp]["end_sp"]
262
+ if start == -1 or start > start_sp:
263
+ start = start_sp
264
+ if end < end_sp:
265
+ end = end_sp
266
+ ls_sp.append(doc_text[start_sp:end_sp])
267
+ answer = {"text": doc_text[start:end], "answer_start": start}
268
+ return [answer]
269
+
270
+ def _generate_examples(self, filepath):
271
+ """This function returns the examples in the raw (text) form."""
272
+ if self.config.name == "dialogue_domain":
273
+ logger.info("generating examples from = %s", filepath)
274
+ with open(filepath, encoding="utf-8") as f:
275
+ data = json.load(f)
276
+ for domain in data["dial_data"]:
277
+ for dialogue in data["dial_data"][domain]:
278
+ x = {
279
+ "dial_id": dialogue["dial_id"],
280
+ "turns": dialogue["turns"],
281
+ "domain": domain,
282
+ }
283
+
284
+ yield dialogue["dial_id"], x
285
+
286
+ elif self.config.name == "document_domain":
287
+
288
+ logger.info("generating examples from = %s", filepath)
289
+ with open(filepath, encoding="utf-8") as f:
290
+ data = json.load(f)
291
+ for domain in data["doc_data"]:
292
+ for doc_id in data["doc_data"][domain]:
293
+
294
+ yield doc_id, {
295
+ "domain": domain,
296
+ "doc_id": doc_id,
297
+ "title": data["doc_data"][domain][doc_id]["title"],
298
+ "doc_text": data["doc_data"][domain][doc_id]["doc_text"],
299
+ "spans": [
300
+ {
301
+ "id_sp": data["doc_data"][domain][doc_id]["spans"][i]["id_sp"],
302
+ "tag": data["doc_data"][domain][doc_id]["spans"][i]["tag"],
303
+ "start_sp": data["doc_data"][domain][doc_id]["spans"][i]["start_sp"],
304
+ "end_sp": data["doc_data"][domain][doc_id]["spans"][i]["end_sp"],
305
+ "text_sp": data["doc_data"][domain][doc_id]["spans"][i]["text_sp"],
306
+ "title": data["doc_data"][domain][doc_id]["spans"][i]["title"],
307
+ "parent_titles": data["doc_data"][domain][doc_id]["spans"][i]["parent_titles"],
308
+ "id_sec": data["doc_data"][domain][doc_id]["spans"][i]["id_sec"],
309
+ "start_sec": data["doc_data"][domain][doc_id]["spans"][i]["start_sec"],
310
+ "text_sec": data["doc_data"][domain][doc_id]["spans"][i]["text_sec"],
311
+ "end_sec": data["doc_data"][domain][doc_id]["spans"][i]["end_sec"],
312
+ }
313
+ for i in data["doc_data"][domain][doc_id]["spans"]
314
+ ],
315
+ "doc_html_ts": data["doc_data"][domain][doc_id]["doc_html_ts"],
316
+ "doc_html_raw": data["doc_data"][domain][doc_id]["doc_html_raw"],
317
+ }
318
+
319
+ elif "multidoc2dial" in self.config.name:
320
+ logger.info("generating examples from = %s", filepath)
321
+ doc_data = self._load_doc_data_rc(filepath)
322
+ d_doc_data = {}
323
+ for domain, d_doc in doc_data.items():
324
+ for doc_id, data in d_doc.items():
325
+ d_doc_data[doc_id] = data
326
+ with open(filepath, encoding="utf-8") as f:
327
+ dial_data = json.load(f)["dial_data"]
328
+ for domain, dialogues in dial_data.items():
329
+ for dial in dialogues:
330
+ all_prev_utterances = []
331
+ for idx, turn in enumerate(dial["turns"]):
332
+ doc_id = turn["references"][0]["doc_id"]
333
+ doc = d_doc_data[doc_id]
334
+ utterance_line = turn["utterance"].replace("\n", " ").replace("\t", " ")
335
+ all_prev_utterances.append("{}: {}".format(turn["role"], utterance_line))
336
+ if turn["role"] == "agent":
337
+ continue
338
+ if idx + 1 < len(dial["turns"]):
339
+ if (
340
+ dial["turns"][idx + 1]["role"] == "agent"
341
+ and dial["turns"][idx + 1]["da"] != "respond_no_solution"
342
+ ):
343
+ turn_to_predict = dial["turns"][idx + 1]
344
+ else:
345
+ continue
346
+ else:
347
+ continue
348
+ question_str = utterance_line + "[SEP]" + "||".join(reversed(all_prev_utterances[:-1]))
349
+ id_ = "{}_{}".format(dial["dial_id"], turn["turn_id"])
350
+ qa = {
351
+ "id": id_,
352
+ "title": doc_id,
353
+ "context": doc["doc_text"],
354
+ "question": question_str,
355
+ "da": turn["da"],
356
+ "answers": self._get_answers_rc(
357
+ turn_to_predict["references"],
358
+ doc["spans"],
359
+ doc["doc_text"],
360
+ ),
361
+ "utterance": turn_to_predict["utterance"],
362
+ "domain": domain,
363
+ }
364
+ yield id_, qa