Datasets:
Remove invisible characters
Browse files
filter_scat.py
CHANGED
@@ -80,16 +80,16 @@ def drop_malformed_tags(
|
|
80 |
else:
|
81 |
drop = True
|
82 |
if not drop:
|
83 |
-
ctx_en.append(
|
84 |
-
ctx_fr.append(
|
85 |
-
tgt_en.append(
|
86 |
-
tgt_fr.append(
|
87 |
|
88 |
else:
|
89 |
-
drop_ctx_en.append(
|
90 |
-
drop_ctx_fr.append(
|
91 |
-
drop_tgt_en.append(
|
92 |
-
drop_tgt_fr.append(
|
93 |
#print("Dropped example:", txt)
|
94 |
|
95 |
print("# of dropped examples:", len(orig_ctx_en) - len(ctx_en))
|
|
|
80 |
else:
|
81 |
drop = True
|
82 |
if not drop:
|
83 |
+
ctx_en.append(re.sub(r"\u200e", "", re.sub(r"\u200b", "", txt_list[0].strip())) + "\n")
|
84 |
+
ctx_fr.append(re.sub(r"\u200e", "", re.sub(r"\u200b", "", txt_list[2].strip())) + "\n")
|
85 |
+
tgt_en.append(re.sub(r"\u200e", "", re.sub(r"\u200b", "", txt_list[1].strip())) + "\n")
|
86 |
+
tgt_fr.append(re.sub(r"\u200e", "", re.sub(r"\u200b", "", txt_list[3].strip())) + "\n")
|
87 |
|
88 |
else:
|
89 |
+
drop_ctx_en.append(re.sub(r"\u200e", "", re.sub(r"\u200b", "", txt_list[0].strip())) + "\n")
|
90 |
+
drop_ctx_fr.append(re.sub(r"\u200e", "", re.sub(r"\u200b", "", txt_list[2].strip())) + "\n")
|
91 |
+
drop_tgt_en.append(re.sub(r"\u200e", "", re.sub(r"\u200b", "", txt_list[1].strip())) + "\n")
|
92 |
+
drop_tgt_fr.append(re.sub(r"\u200e", "", re.sub(r"\u200b", "", txt_list[3].strip())) + "\n")
|
93 |
#print("Dropped example:", txt)
|
94 |
|
95 |
print("# of dropped examples:", len(orig_ctx_en) - len(ctx_en))
|
filtered_scat/filtered.test.fr
CHANGED
@@ -57,7 +57,7 @@ Les <hon>filles<hoff> à qui tu l'as fait, <p>elles</p> aimaient pas ça.
|
|
57 |
Mon grand-père me l'a laissé. Mais parce que j'ai renié mon <hon>héritage<hoff> , <p>elle</p> revient à mon frère.
|
58 |
La <hon>machine<hoff> devait repérer des actes terroristes, mais <p>elle</p> voit tout.
|
59 |
Je vais lui donner un nom, et <p>il</p> verra ma tête.
|
60 |
-
Ouais, regarde, si on peux tirer une <hon>masse<hoff> de 12 ans et demi dans le panier, <p>il</p> ferait baisser le garçon très doucement sur
|
61 |
Quand une <hon>affaire<hoff> ne marche plus, <p>elle</p> meurt, et se fait remplacer par une autre meilleure.
|
62 |
Eh bien, <p>il</p> n'a pas l'air méchant comme ça mais tu aurais été etonnée.
|
63 |
Et puis, d'un seul coup, <p>il</p> se mettait à faire... un bruit strident inexplicable.
|
|
|
57 |
Mon grand-père me l'a laissé. Mais parce que j'ai renié mon <hon>héritage<hoff> , <p>elle</p> revient à mon frère.
|
58 |
La <hon>machine<hoff> devait repérer des actes terroristes, mais <p>elle</p> voit tout.
|
59 |
Je vais lui donner un nom, et <p>il</p> verra ma tête.
|
60 |
+
Ouais, regarde, si on peux tirer une <hon>masse<hoff> de 12 ans et demi dans le panier, <p>il</p> ferait baisser le garçon très doucement sur le sol.
|
61 |
Quand une <hon>affaire<hoff> ne marche plus, <p>elle</p> meurt, et se fait remplacer par une autre meilleure.
|
62 |
Eh bien, <p>il</p> n'a pas l'air méchant comme ça mais tu aurais été etonnée.
|
63 |
Et puis, d'un seul coup, <p>il</p> se mettait à faire... un bruit strident inexplicable.
|
filtered_scat/filtered.train.context.en
CHANGED
@@ -3782,7 +3782,7 @@ Way back, there was a whole army trying to knock over a place called Troy... and
|
|
3782 |
Where are the dollars now? I didn't get them! Miss Rotttach's room was locked! Now you get your comeuppance for this mess! It is your mess as well as mine!
|
3783 |
Murderer! To death! Murderer! And meanwhile, ...secretly, ...nature was preparing the fate. <hon>People<hoff> were making fun.
|
3784 |
Helen, the mason is working right now. He knows the temple and is not afraid. Aulus! Come closer. I hear you, brother.
|
3785 |
-
I think I did not put much conviction. In fact, you did not say to Mr. Serpi for what it was? He
|
3786 |
Granted. Ignore the last remark. Mr. Sabballera, you keep a shop, I think at 18 Dougherty Street? What state is this shop? What state?
|
3787 |
- Goodbye. "And so my hat which has, lo, these many seasons, become firmly rooted about my ears, is lifted to Miss Harrington." "I am available for dancing in the streets and shouting from the housetops." I thought that one went out with Woollcott. Now listen to this.
|
3788 |
- I can't believe Eve said those things. - In this rat race, everybody's guilty till proved innocent. One of the differences between the theatre and civilisation. What gets me is how all the papers happened to catch that particular performance. Lloyd says it's a publicity release.
|
|
|
3782 |
Where are the dollars now? I didn't get them! Miss Rotttach's room was locked! Now you get your comeuppance for this mess! It is your mess as well as mine!
|
3783 |
Murderer! To death! Murderer! And meanwhile, ...secretly, ...nature was preparing the fate. <hon>People<hoff> were making fun.
|
3784 |
Helen, the mason is working right now. He knows the temple and is not afraid. Aulus! Come closer. I hear you, brother.
|
3785 |
+
I think I did not put much conviction. In fact, you did not say to Mr. Serpi for what it was? He promised not to tell anyone. Good. All right, Enrico?
|
3786 |
Granted. Ignore the last remark. Mr. Sabballera, you keep a shop, I think at 18 Dougherty Street? What state is this shop? What state?
|
3787 |
- Goodbye. "And so my hat which has, lo, these many seasons, become firmly rooted about my ears, is lifted to Miss Harrington." "I am available for dancing in the streets and shouting from the housetops." I thought that one went out with Woollcott. Now listen to this.
|
3788 |
- I can't believe Eve said those things. - In this rat race, everybody's guilty till proved innocent. One of the differences between the theatre and civilisation. What gets me is how all the papers happened to catch that particular performance. Lloyd says it's a publicity release.
|