Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
parquet
Languages:
English
Size:
10K - 100K
Tags:
long context
add readme
Browse files- README.md +40 -0
- patent-classification.py +1 -1
README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
languages: en
|
| 3 |
+
task_categories: text-classification
|
| 4 |
+
tags:
|
| 5 |
+
- long context
|
| 6 |
+
task_ids:
|
| 7 |
+
- multi-class-classification
|
| 8 |
+
- topic-classification
|
| 9 |
+
size_categories: 10K<n<100K
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
**Patent Classification: a classification of Patents and abstracts (9 classes).**
|
| 13 |
+
|
| 14 |
+
This dataset is intended for long context classification (non abstract documents are longer that 512 tokens). \
|
| 15 |
+
Data are sampled from "BIGPATENT: A Large-Scale Dataset for Abstractive and Coherent Summarization." by Eva Sharma, Chen Li and Lu Wang
|
| 16 |
+
* See: https://aclanthology.org/P19-1212.pdf
|
| 17 |
+
* See: https://evasharma.github.io/bigpatent/
|
| 18 |
+
|
| 19 |
+
It contains 11 slightly unbalanced classes, 35k Patents and abstracts divided into 3 splits: train (25k), val (5k) and test (5k).
|
| 20 |
+
|
| 21 |
+
**Note that documents are uncased and space separated (by authors)**
|
| 22 |
+
|
| 23 |
+
Compatible with [run_glue.py](https://github.com/huggingface/transformers/tree/master/examples/pytorch/text-classification) script:
|
| 24 |
+
```
|
| 25 |
+
export MODEL_NAME=roberta-base
|
| 26 |
+
export MAX_SEQ_LENGTH=512
|
| 27 |
+
|
| 28 |
+
python run_glue.py \
|
| 29 |
+
--model_name_or_path $MODEL_NAME \
|
| 30 |
+
--dataset_name ccdv/patent-classification \
|
| 31 |
+
--do_train \
|
| 32 |
+
--do_eval \
|
| 33 |
+
--max_seq_length $MAX_SEQ_LENGTH \
|
| 34 |
+
--per_device_train_batch_size 8 \
|
| 35 |
+
--gradient_accumulation_steps 4 \
|
| 36 |
+
--learning_rate 2e-5 \
|
| 37 |
+
--num_train_epochs 1 \
|
| 38 |
+
--max_eval_samples 500 \
|
| 39 |
+
--output_dir tmp/patent
|
| 40 |
+
```
|
patent-classification.py
CHANGED
|
@@ -9,7 +9,7 @@ _CITATION = None
|
|
| 9 |
|
| 10 |
_DESCRIPTION = """
|
| 11 |
Patent Classification Dataset: a classification of Patents (9 classes).
|
| 12 |
-
It contains
|
| 13 |
Copied from "Long Document Classification From Local Word Glimpses via Recurrent Attention Learning" by JUN HE LIQUN WANG LIU LIU, JIAO FENG AND HAO WU
|
| 14 |
See: https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=8675939
|
| 15 |
See: https://github.com/LiqunW/Long-document-dataset
|
|
|
|
| 9 |
|
| 10 |
_DESCRIPTION = """
|
| 11 |
Patent Classification Dataset: a classification of Patents (9 classes).
|
| 12 |
+
It contains 9 unbalanced classes, 25k Patents and summaries divided into 3 splits: train (25k), val (5k) and test (5k).
|
| 13 |
Copied from "Long Document Classification From Local Word Glimpses via Recurrent Attention Learning" by JUN HE LIQUN WANG LIU LIU, JIAO FENG AND HAO WU
|
| 14 |
See: https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=8675939
|
| 15 |
See: https://github.com/LiqunW/Long-document-dataset
|