patrickvonplaten
commited on
Commit
·
b02c583
1
Parent(s):
6b4e666
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Swedish text corpus created by extracting the `"text"` from `dataset = load_dataset("europarl_bilingual", lang1="en", lang2="sv", split="train")` and processing it with:
|
2 |
+
|
3 |
+
```python
|
4 |
+
import re
|
5 |
+
|
6 |
+
def extract_text(batch):
|
7 |
+
text = batch["translation"]["sv"]
|
8 |
+
batch["text"] = re.sub(chars_to_ignore_regex, "", text.lower())
|
9 |
+
return batch
|
10 |
+
```
|