Update README.md
Browse files
README.md
CHANGED
@@ -30,7 +30,41 @@ dataset_info:
|
|
30 |
num_examples: 5954
|
31 |
download_size: 152635605
|
32 |
dataset_size: 261322043
|
|
|
|
|
|
|
33 |
---
|
34 |
-
# Dataset Card for "
|
35 |
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
num_examples: 5954
|
31 |
download_size: 152635605
|
32 |
dataset_size: 261322043
|
33 |
+
license: apache-2.0
|
34 |
+
language:
|
35 |
+
- en
|
36 |
---
|
37 |
+
# Dataset Card for "simple_wikipedia_LM"
|
38 |
|
39 |
+
|
40 |
+
|
41 |
+
```python
|
42 |
+
import re
|
43 |
+
|
44 |
+
|
45 |
+
def split_on_headings(text):
|
46 |
+
headings = ["References", "Related pages", "Other websites", "Further reading"]
|
47 |
+
|
48 |
+
for heading in headings:
|
49 |
+
|
50 |
+
parts = re.split(
|
51 |
+
r"^\s*" + re.escape(heading) + r".*$", text, flags=re.MULTILINE
|
52 |
+
)
|
53 |
+
|
54 |
+
if len(parts) > 1:
|
55 |
+
return parts[0].strip()
|
56 |
+
|
57 |
+
return text
|
58 |
+
|
59 |
+
|
60 |
+
text = """
|
61 |
+
Central Zazaki is a dialect of the Zazaki language. It is spoken in Eastern Anatolia Region of Turkey.
|
62 |
+
Related pages
|
63 |
+
Zazaki
|
64 |
+
Central Anatolia Region
|
65 |
+
Other websites
|
66 |
+
example.com
|
67 |
+
"""
|
68 |
+
|
69 |
+
print(split_on_headings(text))
|
70 |
+
```
|