asahi417 commited on
Commit
41dd509
1 Parent(s): 4ebb4be
generate_reference_files.py CHANGED
@@ -1,4 +1,5 @@
1
  import os
 
2
  from datasets import load_dataset
3
 
4
  dataset_name = 'asahi417/qg_squadshifts'
@@ -7,14 +8,17 @@ os.makedirs('./reference_files', exist_ok=True)
7
 
8
  for split in ['test']:
9
  for domain in ["default", 'new_wiki', 'nyt', 'reddit', 'amazon']:
10
- print(split, domain, dataset_name)
11
  dataset = load_dataset(dataset_name, domain, split=split)
12
  for data in ['question', 'answer', 'sentence', 'paragraph']:
13
  with open('./reference_files/{}-{}.{}txt'.format(data, split, "" if domain == 'default' else f"{domain}."), 'w') as f:
14
- print(dataset)
15
  if data == 'paragraph':
16
- f.write('\n'.join(dataset['paragraph_id']))
17
  else:
18
- f.write('\n'.join(dataset[data]))
 
19
 
 
 
 
20
 
 
1
  import os
2
+ from glob import glob
3
  from datasets import load_dataset
4
 
5
  dataset_name = 'asahi417/qg_squadshifts'
 
8
 
9
  for split in ['test']:
10
  for domain in ["default", 'new_wiki', 'nyt', 'reddit', 'amazon']:
 
11
  dataset = load_dataset(dataset_name, domain, split=split)
12
  for data in ['question', 'answer', 'sentence', 'paragraph']:
13
  with open('./reference_files/{}-{}.{}txt'.format(data, split, "" if domain == 'default' else f"{domain}."), 'w') as f:
14
+
15
  if data == 'paragraph':
16
+ tmp_data = dataset['paragraph_id']
17
  else:
18
+ tmp_data = dataset[data]
19
+ f.write('\n'.join([i.replace('\n', '.') for i in tmp_data]))
20
 
21
+ for domain in ['new_wiki', 'nyt', 'reddit', 'amazon']:
22
+ length = [len(open(i).read().split('\n')) for i in glob(f'reference_files/*{domain}*.txt')]
23
+ assert len(list(set(length))) == 1, length
24
 
reference_files/sentence-test.new_wiki.txt CHANGED
The diff for this file is too large to render. See raw diff
 
reference_files/sentence-test.nyt.txt CHANGED
@@ -3808,21 +3808,13 @@ There’s that old expression, “If work was that great, the rich would keep it
3808
  But you can aim for a pretty good heart-singing-to-bummed-out ratio .
3809
  I think everybody does better if they really like some aspect of what they’re doing, but work is work.
3810
  The association has begun working with operators of communities on strategies to mitigate the effect of cliques and will conduct a new study this year to examine the prevalence of cliques in assisted-living residences as well.
3811
- DAVID S. SCHLESS
3812
- President
3813
- American Seniors Housing Association
3814
- Washington, Jan. 19, 2015 To the Editor: I ached with memory reading Jennifer Weiner’s account of her grandmother’s entry into retirement living.
3815
  Cliques and shunning people are seen just about everywhere there are groups of people , of any age, who share spaces and resources.
3816
- DAVID S. SCHLESS
3817
- President
3818
- American Seniors Housing Association
3819
- Washington, Jan. 19, 2015 To the Editor: I ached with memory reading Jennifer Weiner’s account of her grandmother’s entry into retirement living.
3820
  The writer, a clinical social worker , is the author of “Witness to Resilience: Stories of Intimate Violence.”
3821
  She can create her own “in group, ” where only kind women are welcome.
3822
- MAREA WEXLER
3823
- Northampton, Mass., Jan. 20, 2015
3824
- MAREA WEXLER
3825
- Northampton, Mass., Jan. 20, 2015
3826
  The state House is again pushing forward with a Republican priority to require photo identification at the polls, after similar measures were stymied by the Senate or courts in recent years.
3827
  The state House is again pushing forward with a Republican priority to require photo identification at the polls, after similar measures were stymied by the Senate or courts in recent years.
3828
  Both measures need a second House vote and also would have to pass the Senate , where Democrats have previously blocked proposed ID requirements.
@@ -6748,8 +6740,7 @@ When she became C.E.O. of Hewlett-Packard in 1999, she made the preposterous cla
6748
  Take Mr. Wadhwa’s claim that women in tech often underplay their accomplishments and that they should adopt a brash tone.
6749
  His critics concede that women do sometimes underplay their strengths, but they point to another concern: Studies show that when women speak up in negotiations or other meetings, they are often penalized for doing so.
6750
  “I think that in 2015 we can give women better advice than ‘Behave more like men,’ ” said Cate Huston, a software engineer who has worked at Google and IBM.
6751
- In an article responding to the WNYC podcast , Mr. Wadhwa wrote that his findings were the product of two research
6752
- reports, but those do not mention the confidence problem.
6753
  “I think that in 2015 we can give women better advice than ‘Behave more like men,’ ” said Cate Huston, a software engineer who has worked at Google and IBM.
6754
  The Italian Olympic Committee requested two-year doping bans for 26 track and field athletes — several of whom were expected to compete at next year’s Rio de Janeiro Games.
6755
  The Italian Olympic Committee requested two-year doping bans for 26 track and field athletes — several of whom were expected to compete at next year’s
 
3808
  But you can aim for a pretty good heart-singing-to-bummed-out ratio .
3809
  I think everybody does better if they really like some aspect of what they’re doing, but work is work.
3810
  The association has begun working with operators of communities on strategies to mitigate the effect of cliques and will conduct a new study this year to examine the prevalence of cliques in assisted-living residences as well.
3811
+ DAVID S. SCHLESS .President.American Seniors Housing Association.Washington, Jan. 19, 2015 To the Editor: I ached with memory reading Jennifer Weiner’s account of her grandmother’s entry into retirement living.
 
 
 
3812
  Cliques and shunning people are seen just about everywhere there are groups of people , of any age, who share spaces and resources.
3813
+ DAVID S. SCHLESS.President.American Seniors Housing Association.Washington, Jan. 19, 2015 To the Editor: I ached with memory reading Jennifer Weiner’s account of her grandmother’s entry into retirement living.
 
 
 
3814
  The writer, a clinical social worker , is the author of “Witness to Resilience: Stories of Intimate Violence.”
3815
  She can create her own “in group, ” where only kind women are welcome.
3816
+ MAREA WEXLER .Northampton, Mass., Jan. 20, 2015
3817
+ MAREA WEXLER.Northampton, Mass., Jan. 20, 2015
 
 
3818
  The state House is again pushing forward with a Republican priority to require photo identification at the polls, after similar measures were stymied by the Senate or courts in recent years.
3819
  The state House is again pushing forward with a Republican priority to require photo identification at the polls, after similar measures were stymied by the Senate or courts in recent years.
3820
  Both measures need a second House vote and also would have to pass the Senate , where Democrats have previously blocked proposed ID requirements.
 
6740
  Take Mr. Wadhwa’s claim that women in tech often underplay their accomplishments and that they should adopt a brash tone.
6741
  His critics concede that women do sometimes underplay their strengths, but they point to another concern: Studies show that when women speak up in negotiations or other meetings, they are often penalized for doing so.
6742
  “I think that in 2015 we can give women better advice than ‘Behave more like men,’ ” said Cate Huston, a software engineer who has worked at Google and IBM.
6743
+ In an article responding to the WNYC podcast , Mr. Wadhwa wrote that his findings were the product of two research. reports, but those do not mention the confidence problem.
 
6744
  “I think that in 2015 we can give women better advice than ‘Behave more like men,’ ” said Cate Huston, a software engineer who has worked at Google and IBM.
6745
  The Italian Olympic Committee requested two-year doping bans for 26 track and field athletes — several of whom were expected to compete at next year’s Rio de Janeiro Games.
6746
  The Italian Olympic Committee requested two-year doping bans for 26 track and field athletes — several of whom were expected to compete at next year’s
reference_files/sentence-test.txt CHANGED
The diff for this file is too large to render. See raw diff