parquet-converter commited on
Commit
8d4b819
1 Parent(s): cbf2232

Update parquet files

Browse files
README.md DELETED
@@ -1,17 +0,0 @@
1
- ---
2
- dataset_info:
3
- features:
4
- - name: id
5
- dtype: string
6
- - name: name
7
- dtype: string
8
- splits:
9
- - name: train
10
- num_bytes: 2451067
11
- num_examples: 73380
12
- download_size: 1258591
13
- dataset_size: 2451067
14
- ---
15
- # Dataset Card for "job_titles"
16
-
17
- [More Information needed](https://github.com/huggingface/datasets/blob/main/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/train-00000-of-00001-f3966556d39a54a6.parquet → bstds--job_titles/parquet-train.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7fc2493e503b31392703b3ad282bede32e325737a601b665076eab7bfce7d26a
3
- size 1258591
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c61e7fcc1bf00fe41a2683e4ab42abb8bcdfb3612aada11d2a1a0c69beda9615
3
+ size 1258955
job_titles_generator.py DELETED
@@ -1,79 +0,0 @@
1
- #!/usr/bin/env python3
2
- # -*- coding: utf-8 -*-
3
- import os
4
- import shutil
5
- import uuid
6
- from functools import partial
7
- from pathlib import Path
8
- from typing import Dict, Iterable
9
-
10
- import datasets
11
- from datasets import DatasetDict, DownloadManager, load_dataset
12
- import pandas as pd
13
-
14
-
15
- VERSION = datasets.Version("0.0.1")
16
-
17
- AVAILABLE_DATASETS = {
18
- "job_titles": "https://github.com/jneidel/job-titles"
19
- }
20
-
21
- class JobTitlesDataset(datasets.GeneratorBasedBuilder):
22
- """JobTitlesDataset dataset."""
23
-
24
- BUILDER_CONFIGS = [
25
- datasets.BuilderConfig(
26
- name=data_name, version=VERSION, description=f"{data_name} dataset"
27
- )
28
- for data_name in AVAILABLE_DATASETS
29
- ]
30
-
31
- @staticmethod
32
- def load(data_name_config: str = "job_titles") -> DatasetDict:
33
- ds = load_dataset(__file__, data_name_config)
34
- return ds
35
-
36
- def _info(self) -> datasets.DatasetInfo:
37
- return datasets.DatasetInfo(
38
- description="",
39
- features=datasets.Features(
40
- {
41
- "id": datasets.Value("string"),
42
- "name": datasets.Value("string"),
43
- }
44
- ),
45
- supervised_keys=None,
46
- homepage="https://github.com/jneidel/job-titles",
47
- citation="",
48
- )
49
-
50
- def _split_generators(
51
- self, dl_manager: DownloadManager
52
- ) -> Iterable[datasets.SplitGenerator]:
53
- git_repo = AVAILABLE_DATASETS[self.config.name]
54
- current_dir = Path(__file__).resolve().parent
55
- temp_dir = current_dir / uuid.uuid4().hex
56
- temp_dir.mkdir(exist_ok=True)
57
- os.system(f"cd {temp_dir} && git clone {git_repo}")
58
- shutil.copy(temp_dir / "job-titles" / "job-titles.txt", current_dir)
59
- shutil.rmtree(f"{temp_dir}")
60
- filepath = str(current_dir / "job-titles.txt")
61
-
62
- # There is no predefined train/val/test split for this dataset.
63
- return [
64
- datasets.SplitGenerator(
65
- name=datasets.Split.TRAIN,
66
- gen_kwargs={
67
- "filepath": filepath
68
- },
69
- ),
70
- ]
71
-
72
- def _generate_examples(self, filepath: str) -> Iterable[Dict]:
73
- with open(filepath, "r") as f_in:
74
- for idx, line in enumerate(f_in):
75
- line = line.strip()
76
- yield idx, {
77
- "id": idx,
78
- "name": line
79
- }