Ahmet Bağcı
commited on
Commit
·
20bdb85
1
Parent(s):
d3d65a7
First Readme
Browse files
README.md
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- tr
|
4 |
+
tags:
|
5 |
+
- paraphrasing
|
6 |
+
- encoder-decoder
|
7 |
+
- seq2seq
|
8 |
+
- bert
|
9 |
+
---
|
10 |
+
|
11 |
+
#Bert2Bert Turkish Paraphrase Generation
|
12 |
+
|
13 |
+
#INISTA 2021
|
14 |
+
|
15 |
+
#Comparison of Turkish Paraphrase Generation Models
|
16 |
+
|
17 |
+
#Dataset
|
18 |
+
|
19 |
+
The dataset used in model training was created with the combination of the translation of the QQP dataset and manually generated dataset.
|
20 |
+
Dataset [Link](https://drive.google.com/file/d/1-2l9EwIzXZ7fUkNW1vdeF3lzQp2pygp_/view?usp=sharing)
|
21 |
+
|
22 |
+
#How To Use
|
23 |
+
```python
|
24 |
+
from transformers import BertTokenizerFast,EncoderDecoderModel
|
25 |
+
tokenizer=BertTokenizerFast.from_pretrained("dbmdz/bert-base-turkish-cased")
|
26 |
+
model = EncoderDecoderModel.from_pretrained("ahmetbagci/bert2bert-turkish-paraphrase-generation")
|
27 |
+
|
28 |
+
text="son model arabalar çevreye daha mı az zarar veriyor?"
|
29 |
+
input_ids = tokenizer(article, return_tensors="pt").input_ids
|
30 |
+
output_ids = model.generate(input_ids)
|
31 |
+
print(tokenizer.decode(output_ids[0], skip_special_tokens=True))
|
32 |
+
#sample output
|
33 |
+
#son model arabalar çevre için daha az zararlı mı?
|
34 |
+
```
|
35 |
+
#Cite
|
36 |
+
```bibtex
|
37 |
+
|
38 |
+
@inproceedings{bagci2021paraphrase,
|
39 |
+
title={Comparison of Turkish Paraphrase Generation Models},
|
40 |
+
author={Ba{\u{g}}c{\i}, Ahmet and Amasyali, Mehmet Fatih},
|
41 |
+
booktitle={2021 International Conference on INnovations in Intelligent SysTems and Applications (INISTA)},
|
42 |
+
year={2021},
|
43 |
+
organization={IEEE}
|
44 |
+
}
|
45 |
+
```
|