Update README.md
Browse files
README.md
CHANGED
@@ -14,4 +14,16 @@ dataset_info:
|
|
14 |
---
|
15 |
# Dataset Card for "programming-languages-keywords"
|
16 |
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
---
|
15 |
# Dataset Card for "programming-languages-keywords"
|
16 |
|
17 |
+
Structured version of https://github.com/e3b0c442/keywords
|
18 |
+
|
19 |
+
Generated using:
|
20 |
+
```python
|
21 |
+
r = requests.get("https://raw.githubusercontent.com/e3b0c442/keywords/main/README.md")
|
22 |
+
keywords = r.text.split("### ")[1:]
|
23 |
+
keywords = [i for i in keywords if not i.startswith("Sources")]
|
24 |
+
keywords = {i.split("\n")[0]:[j for j in re.findall("[a-zA-Z]*", i.split("\n",1)[1]) if j] for i in keywords}
|
25 |
+
keywords = pd.DataFrame(pd.Series(keywords)).reset_index().rename(columns={"index":"language", 0:"keywords"})
|
26 |
+
keywords['language'] = keywords['language'].str.split("\) ").str[0]
|
27 |
+
keywords['keywords'] = keywords['keywords'].apply(lambda x: sorted(list(set(x))))
|
28 |
+
ds = Dataset.from_pandas(keywords)
|
29 |
+
```
|