Update t_rex.py
Browse files
t_rex.py
CHANGED
|
@@ -7,7 +7,7 @@ import datasets
|
|
| 7 |
logger = datasets.logging.get_logger(__name__)
|
| 8 |
_DESCRIPTION = """T-Rex dataset."""
|
| 9 |
_NAME = "t_rex"
|
| 10 |
-
_VERSION = "
|
| 11 |
_CITATION = """
|
| 12 |
@inproceedings{elsahar2018t,
|
| 13 |
title={T-rex: A large scale alignment of natural language with knowledge base triples},
|
|
@@ -19,17 +19,17 @@ _CITATION = """
|
|
| 19 |
|
| 20 |
_HOME_PAGE = "https://github.com/asahi417/relbert"
|
| 21 |
_URL = f'https://huggingface.co/datasets/relbert/{_NAME}/resolve/main/data'
|
| 22 |
-
MIN_ENTITY_FREQ = [1, 2, 3, 4]
|
| 23 |
-
MAX_PREDICATE_FREQ = [100, 50, 25, 10]
|
| 24 |
|
| 25 |
-
_TYPES = [f"filter_unified.min_entity_{a}_max_predicate_{b}" for a, b in product(MIN_ENTITY_FREQ, MAX_PREDICATE_FREQ)]
|
| 26 |
# _TYPES += ["raw", "filter", "filter_unified"]
|
| 27 |
-
_NON_SPLITS = ["raw", "filter", "filter_unified"]
|
| 28 |
-
_URLS = {
|
| 29 |
str(datasets.Split.TRAIN): [f'{_URL}/t_rex.{i}.train.jsonl'],
|
| 30 |
str(datasets.Split.VALIDATION): [f'{_URL}/t_rex.{i}.validation.jsonl'],
|
| 31 |
-
str(datasets.Split.TEST): [f'{_URL}/t_rex.filter_unified.test.jsonl']
|
| 32 |
-
|
| 33 |
|
| 34 |
|
| 35 |
class TREXConfig(datasets.BuilderConfig):
|
|
|
|
| 7 |
logger = datasets.logging.get_logger(__name__)
|
| 8 |
_DESCRIPTION = """T-Rex dataset."""
|
| 9 |
_NAME = "t_rex"
|
| 10 |
+
_VERSION = "1.0.0"
|
| 11 |
_CITATION = """
|
| 12 |
@inproceedings{elsahar2018t,
|
| 13 |
title={T-rex: A large scale alignment of natural language with knowledge base triples},
|
|
|
|
| 19 |
|
| 20 |
_HOME_PAGE = "https://github.com/asahi417/relbert"
|
| 21 |
_URL = f'https://huggingface.co/datasets/relbert/{_NAME}/resolve/main/data'
|
| 22 |
+
# MIN_ENTITY_FREQ = [1, 2, 3, 4]
|
| 23 |
+
# MAX_PREDICATE_FREQ = [100, 50, 25, 10]
|
| 24 |
|
| 25 |
+
# _TYPES = [f"filter_unified.min_entity_{a}_max_predicate_{b}" for a, b in product(MIN_ENTITY_FREQ, MAX_PREDICATE_FREQ)]
|
| 26 |
# _TYPES += ["raw", "filter", "filter_unified"]
|
| 27 |
+
# _NON_SPLITS = ["raw", "filter", "filter_unified"]
|
| 28 |
+
_URLS = {
|
| 29 |
str(datasets.Split.TRAIN): [f'{_URL}/t_rex.{i}.train.jsonl'],
|
| 30 |
str(datasets.Split.VALIDATION): [f'{_URL}/t_rex.{i}.validation.jsonl'],
|
| 31 |
+
str(datasets.Split.TEST): [f'{_URL}/t_rex.filter_unified.test.jsonl']
|
| 32 |
+
}
|
| 33 |
|
| 34 |
|
| 35 |
class TREXConfig(datasets.BuilderConfig):
|