asahi417 commited on
Commit
7d400e6
·
1 Parent(s): f7e0826
data/tweet_nerd_new/validation.jsonl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ca3f9f434dce5156178748a4d8f8ae48457a1205761869f64ce774af56118186
3
- size 1230500
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:291ea200cebc1446707138bbc7ebf2257589a8af99cb3b07ac5cde1032d6ef8d
3
+ size 1425119
experiments/main.sh CHANGED
@@ -7,7 +7,7 @@ MODEL="cardiffnlp/twitter-roberta-base-2022-154m"
7
 
8
  # topic, ner [hawk]
9
  MODEL="vinai/bertweet-base"
10
- # topic [hawk], ner [ukri]
11
  MODEL="jhu-clsp/bernice"
12
 
13
 
 
7
 
8
  # topic, ner [hawk]
9
  MODEL="vinai/bertweet-base"
10
+ # topic [hawk], ner
11
  MODEL="jhu-clsp/bernice"
12
 
13
 
process/tweet_nerd.py CHANGED
@@ -23,13 +23,13 @@ while True:
23
  if dist_date[:n].sum() > total_n/2:
24
  break
25
  split_date = dist_date.index[n]
26
- input(split_date)
27
 
28
  train = df[df["date_dt"] <= split_date]
29
  test = df[df["date_dt"] > split_date]
30
  print(train.date_dt.min(), train.date_dt.max())
31
  print(test.date_dt.min(), test.date_dt.max())
32
- input()
33
  train.pop("date_dt")
34
  test.pop("date_dt")
35
  train = list(train.T.to_dict().values())
@@ -62,7 +62,7 @@ with open("data/tweet_nerd_new/test_4.jsonl", "w") as f:
62
  with open("data/tweet_nerd_new/train.jsonl", "w") as f:
63
  f.write("\n".join([json.dumps(i) for i in train]))
64
  with open("data/tweet_nerd_new/validation.jsonl", "w") as f:
65
- f.write("\n".join([json.dumps(i) for i in validation]))
66
 
67
 
68
  def sampler(dataset_test, r_seed):
 
23
  if dist_date[:n].sum() > total_n/2:
24
  break
25
  split_date = dist_date.index[n]
26
+ print(split_date)
27
 
28
  train = df[df["date_dt"] <= split_date]
29
  test = df[df["date_dt"] > split_date]
30
  print(train.date_dt.min(), train.date_dt.max())
31
  print(test.date_dt.min(), test.date_dt.max())
32
+
33
  train.pop("date_dt")
34
  test.pop("date_dt")
35
  train = list(train.T.to_dict().values())
 
62
  with open("data/tweet_nerd_new/train.jsonl", "w") as f:
63
  f.write("\n".join([json.dumps(i) for i in train]))
64
  with open("data/tweet_nerd_new/validation.jsonl", "w") as f:
65
+ f.write("\n".join([json.dumps(i) for i in valid]))
66
 
67
 
68
  def sampler(dataset_test, r_seed):
statistics.py CHANGED
@@ -22,7 +22,7 @@ for i in ["nerd_temporal", "ner_temporal", "topic_temporal"]:
22
  "size": len(dataset),
23
  "size (token length < 128)": len(token_length_in),
24
  "mean_token_length": sum(token_length)/len(token_length),
25
- "date": f'{str(date[0]).split(" ")[0]} / {str(date[-1]).split(" ")[0]}',
26
  })
27
  break
28
  df = pd.DataFrame(stats)
 
22
  "size": len(dataset),
23
  "size (token length < 128)": len(token_length_in),
24
  "mean_token_length": sum(token_length)/len(token_length),
25
+ "date": f'{str(date[0]).split("T")[0]} / {str(date[-1]).split("T")[0]}',
26
  })
27
  break
28
  df = pd.DataFrame(stats)
tweet_temporal_shift.py CHANGED
@@ -2,7 +2,7 @@
2
  import json
3
  import datasets
4
 
5
- _VERSION = "1.0.2"
6
  _TWEET_TEMPORAL_DESCRIPTION = """"""
7
  _TWEET_TEMPORAL_CITATION = """"""
8
  _TWEET_TOPIC_DESCRIPTION = """
 
2
  import json
3
  import datasets
4
 
5
+ _VERSION = "1.0.3"
6
  _TWEET_TEMPORAL_DESCRIPTION = """"""
7
  _TWEET_TEMPORAL_CITATION = """"""
8
  _TWEET_TOPIC_DESCRIPTION = """