system HF staff commited on
Commit
8c69647
1 Parent(s): 8936988

Update files from the datasets library (from 1.8.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.8.0

Files changed (3) hide show
  1. README.md +2 -0
  2. dataset_infos.json +1 -1
  3. yelp_polarity.py +2 -0
README.md CHANGED
@@ -1,4 +1,6 @@
1
  ---
 
 
2
  paperswithcode_id: null
3
  ---
4
 
 
1
  ---
2
+ languages:
3
+ - en
4
  paperswithcode_id: null
5
  ---
6
 
dataset_infos.json CHANGED
@@ -1 +1 @@
1
- {"plain_text": {"description": "Large Yelp Review Dataset.\nThis is a dataset for binary sentiment classification. We provide a set of 560,000 highly polar yelp reviews for training, and 38,000 for testing. \nORIGIN\nThe Yelp reviews dataset consists of reviews from Yelp. It is extracted\nfrom the Yelp Dataset Challenge 2015 data. For more information, please\nrefer to http://www.yelp.com/dataset_challenge\n\nThe Yelp reviews polarity dataset is constructed by\nXiang Zhang (xiang.zhang@nyu.edu) from the above dataset.\nIt is first used as a text classification benchmark in the following paper:\nXiang Zhang, Junbo Zhao, Yann LeCun. Character-level Convolutional Networks\nfor Text Classification. Advances in Neural Information Processing Systems 28\n(NIPS 2015).\n\n\nDESCRIPTION\n\nThe Yelp reviews polarity dataset is constructed by considering stars 1 and 2\nnegative, and 3 and 4 positive. For each polarity 280,000 training samples and\n19,000 testing samples are take randomly. In total there are 560,000 trainig\nsamples and 38,000 testing samples. Negative polarity is class 1,\nand positive class 2.\n\nThe files train.csv and test.csv contain all the training samples as\ncomma-sparated values. There are 2 columns in them, corresponding to class\nindex (1 and 2) and review text. The review texts are escaped using double\nquotes (\"), and any internal double quote is escaped by 2 double quotes (\"\").\nNew lines are escaped by a backslash followed with an \"n\" character,\nthat is \"\n\".\n", "citation": "@article{zhangCharacterlevelConvolutionalNetworks2015,\n archivePrefix = {arXiv},\n eprinttype = {arxiv},\n eprint = {1509.01626},\n primaryClass = {cs},\n title = {Character-Level {{Convolutional Networks}} for {{Text Classification}}},\n abstract = {This article offers an empirical exploration on the use of character-level convolutional networks (ConvNets) for text classification. We constructed several large-scale datasets to show that character-level convolutional networks could achieve state-of-the-art or competitive results. Comparisons are offered against traditional models such as bag of words, n-grams and their TFIDF variants, and deep learning models such as word-based ConvNets and recurrent neural networks.},\n journal = {arXiv:1509.01626 [cs]},\n author = {Zhang, Xiang and Zhao, Junbo and LeCun, Yann},\n month = sep,\n year = {2015},\n}\n\n", "homepage": "https://course.fast.ai/datasets", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 2, "names": ["1", "2"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "supervised_keys": null, "builder_name": "yelp_polarity", "config_name": "plain_text", "version": {"version_str": "1.0.0", "description": "", "datasets_version_to_prepare": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"test": {"name": "test", "num_bytes": 27976351, "num_examples": 38000, "dataset_name": "yelp_polarity"}, "train": {"name": "train", "num_bytes": 413768861, "num_examples": 560000, "dataset_name": "yelp_polarity"}}, "download_checksums": {"https://s3.amazonaws.com/fast-ai-nlp/yelp_review_polarity_csv.tgz": {"num_bytes": 166373201, "checksum": "528f22e286cad085948acbc3bea7e58188416546b0e364d0ae4ca0ce666abe35"}}, "download_size": 166373201, "dataset_size": 441745212, "size_in_bytes": 608118413}}
 
1
+ {"plain_text": {"description": "Large Yelp Review Dataset.\nThis is a dataset for binary sentiment classification. We provide a set of 560,000 highly polar yelp reviews for training, and 38,000 for testing. \nORIGIN\nThe Yelp reviews dataset consists of reviews from Yelp. It is extracted\nfrom the Yelp Dataset Challenge 2015 data. For more information, please\nrefer to http://www.yelp.com/dataset_challenge\n\nThe Yelp reviews polarity dataset is constructed by\nXiang Zhang (xiang.zhang@nyu.edu) from the above dataset.\nIt is first used as a text classification benchmark in the following paper:\nXiang Zhang, Junbo Zhao, Yann LeCun. Character-level Convolutional Networks\nfor Text Classification. Advances in Neural Information Processing Systems 28\n(NIPS 2015).\n\n\nDESCRIPTION\n\nThe Yelp reviews polarity dataset is constructed by considering stars 1 and 2\nnegative, and 3 and 4 positive. For each polarity 280,000 training samples and\n19,000 testing samples are take randomly. In total there are 560,000 trainig\nsamples and 38,000 testing samples. Negative polarity is class 1,\nand positive class 2.\n\nThe files train.csv and test.csv contain all the training samples as\ncomma-sparated values. There are 2 columns in them, corresponding to class\nindex (1 and 2) and review text. The review texts are escaped using double\nquotes (\"), and any internal double quote is escaped by 2 double quotes (\"\").\nNew lines are escaped by a backslash followed with an \"n\" character,\nthat is \"\n\".\n", "citation": "@article{zhangCharacterlevelConvolutionalNetworks2015,\n archivePrefix = {arXiv},\n eprinttype = {arxiv},\n eprint = {1509.01626},\n primaryClass = {cs},\n title = {Character-Level {{Convolutional Networks}} for {{Text Classification}}},\n abstract = {This article offers an empirical exploration on the use of character-level convolutional networks (ConvNets) for text classification. We constructed several large-scale datasets to show that character-level convolutional networks could achieve state-of-the-art or competitive results. Comparisons are offered against traditional models such as bag of words, n-grams and their TFIDF variants, and deep learning models such as word-based ConvNets and recurrent neural networks.},\n journal = {arXiv:1509.01626 [cs]},\n author = {Zhang, Xiang and Zhao, Junbo and LeCun, Yann},\n month = sep,\n year = {2015},\n}\n\n", "homepage": "https://course.fast.ai/datasets", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 2, "names": ["1", "2"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": [{"task": "text-classification", "text_column": "text", "label_column": "label", "labels": ["1", "2"]}], "builder_name": "yelp_polarity", "config_name": "plain_text", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 413559061, "num_examples": 560000, "dataset_name": "yelp_polarity"}, "test": {"name": "test", "num_bytes": 27962113, "num_examples": 38000, "dataset_name": "yelp_polarity"}}, "download_checksums": {"https://s3.amazonaws.com/fast-ai-nlp/yelp_review_polarity_csv.tgz": {"num_bytes": 166373201, "checksum": "528f22e286cad085948acbc3bea7e58188416546b0e364d0ae4ca0ce666abe35"}}, "download_size": 166373201, "post_processing_size": null, "dataset_size": 441521174, "size_in_bytes": 607894375}}
yelp_polarity.py CHANGED
@@ -33,6 +33,7 @@
33
  import os
34
 
35
  import datasets
 
36
 
37
 
38
  _DESCRIPTION = """\
@@ -123,6 +124,7 @@ class YelpPolarity(datasets.GeneratorBasedBuilder):
123
  supervised_keys=None,
124
  homepage="https://course.fast.ai/datasets",
125
  citation=_CITATION,
 
126
  )
127
 
128
  def _vocab_text_gen(self, train_file):
 
33
  import os
34
 
35
  import datasets
36
+ from datasets.tasks import TextClassification
37
 
38
 
39
  _DESCRIPTION = """\
 
124
  supervised_keys=None,
125
  homepage="https://course.fast.ai/datasets",
126
  citation=_CITATION,
127
+ task_templates=[TextClassification(text_column="text", label_column="label")],
128
  )
129
 
130
  def _vocab_text_gen(self, train_file):