|
|
--- |
|
|
inference: false |
|
|
language: |
|
|
- nl |
|
|
metrics: |
|
|
- sari |
|
|
- bleu |
|
|
pipeline_tag: text2text-generation |
|
|
tags: |
|
|
- sentence_simplification |
|
|
- simplification |
|
|
- text2text |
|
|
--- |
|
|
|
|
|
## Model Details |
|
|
|
|
|
# simplify_dutch |
|
|
|
|
|
This is the source code for my thesis on "Controllable Sentence Simplification in Dutch" |
|
|
in the Masters of AI at KU Leuven. The full code can be found at: https://github.com/tsei902/simplify_dutch |
|
|
|
|
|
# Data |
|
|
The origin of the datasets in resources/datasets is: |
|
|
1) Wikilarge, available under: https://github.com/XingxingZhang/dress |
|
|
The wikilarge data is limited the first 10000 rows. |
|
|
|
|
|
2) ASSET, available under: https://github.com/facebookresearch |
|
|
Which both have been translated to Dutch. |
|
|
|
|
|
# Model |
|
|
The Dutch T5 model t5-base-dutch from Hugging Face has been adopted and trained on the task |
|
|
of sentence simplification. |
|
|
The folder /saved model contains the final trained model on 10000 rows of data, as stated in the Thesis. |
|
|
|
|
|
# Sequence: |
|
|
1) TRAINING DATA needs preprocessing with preprocessor.py |
|
|
2) Generation can be done with generate_on_pretrained.py with a prior adjustment of |
|
|
3) The generation parameters in model.simplify() where the decoding method needs to be chosen (Greedy decoding, Top-p & top-k, or Beam search) |
|
|
4) Manual scoring of a generated text is possible with evaluate.py |
|
|
|
|
|
# Further remarks: |
|
|
1) The folder resources/processed data contains the training set with the prepended control tokens |
|
|
2) The folder resources/DUMPS contains the Word embeddings from Fares et al. (2017) have been used. The data is available under: http://vectors.nlpl.eu/repository. (Fares, M., Kutuzov, A., Oepen, S., & Velldal, E. (2017). Word vectors, reuse, and replicability: Towards a community repository of large-text resources. Proceedings of the 21st Nordic Conference on Computational Linguistics, Gothenburg, Sweden.) |
|
|
3) The folder resources/outputs/final_decoder_outputs contains the final generated text per decoding strategy (Greedy decoding, Top-p & top-k, or Beam search) for both the full test set and the sample dataset |
|
|
4) The folder translations contains sampled text (106 and 84 rows) from the original English datasets (WIKILarge and ASSET), a machine-translated version as well as the human translated references. |
|
|
|
|
|
# Credits |
|
|
The preprocessor.py and the utils.py contain code that has been adapted from https://github.com/KimChengSHEANG/TS_T5 (Sheang, K. C., & Saggion, H. (2021). Controllable Sentence Simplification with a Unified Text-to-Text Transfer Transformer.INLG 2021 International Conference on Natural Language Generation, Aberdeen, Scotland, UK.) |
|
|
The preprocessor.py has been adapted to the usage of Dutch. |
|
|
|
|
|
|
|
|
### Model Description |
|
|
|
|
|
<!-- Provide a longer summary of what this model is. --> |
|
|
|
|
|
|
|
|
|
|
|
- **Developed by:** Theresa Seidl |
|
|
- **Funded by [optional]:** [More Information Needed] |
|
|
- **Shared by [optional]:** [More Information Needed] |
|
|
- **Model type:** [More Information Needed] |
|
|
- **Language(s) (NLP):** Dutsch |
|
|
- **License:** [More Information Needed] |
|
|
- **Finetuned from model [optional]:** https://huggingface.co/yhavinga/t5-base-dutch |
|
|
|
|
|
### Model Sources [optional] |
|
|
|
|
|
<!-- Provide the basic links for the model. --> |
|
|
|
|
|
- **Repository:** https://github.com/tsei902/simplify_dutch |
|
|
- **Paper [optional]:** [More Information Needed] |
|
|
- **Demo [optional]:** [More Information Needed] |
|
|
|
|
|
# |
|
|
## Uses |
|
|
|
|
|
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> |
|
|
|
|
|
### Direct Use |
|
|
|
|
|
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. --> |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
### Downstream Use [optional] |
|
|
|
|
|
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app --> |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
### Out-of-Scope Use |
|
|
|
|
|
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. --> |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
## Bias, Risks, and Limitations |
|
|
|
|
|
<!-- This section is meant to convey both technical and sociotechnical limitations. --> |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
### Recommendations |
|
|
|
|
|
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. --> |
|
|
|
|
|
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. |
|
|
|
|
|
## How to Get Started with the Model |
|
|
|
|
|
Use the code below to get started with the model. |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
## Training Details |
|
|
|
|
|
### Training Data |
|
|
|
|
|
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --> |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
### Training Procedure |
|
|
|
|
|
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. --> |
|
|
|
|
|
#### Preprocessing [optional] |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
|
|
|
#### Training Hyperparameters |
|
|
|
|
|
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision --> |
|
|
|
|
|
#### Speeds, Sizes, Times [optional] |
|
|
|
|
|
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. --> |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
## Evaluation |
|
|
|
|
|
<!-- This section describes the evaluation protocols and provides the results. --> |
|
|
|
|
|
### Testing Data, Factors & Metrics |
|
|
|
|
|
#### Testing Data |
|
|
|
|
|
<!-- This should link to a Dataset Card if possible. --> |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
|
|
|
#### Metrics |
|
|
|
|
|
<!-- These are the evaluation metrics being used, ideally with a description of why. --> |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
### Results |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
#### Summary |
|
|
|
|
|
|
|
|
|
|
|
### Model Architecture and Objective |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
### Compute Infrastructure |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
#### Hardware |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
|
|
|
## Citation [optional] |
|
|
|
|
|
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. --> |
|
|
|
|
|
**BibTeX:** |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
**APA:** |
|
|
|
|
|
[More Information Needed] |
|
|
|