File size: 2,535 Bytes
7850f23
 
 
 
 
 
 
 
 
ee2886f
308e106
ee2886f
 
 
 
9f4eaff
c1fcef3
 
ee2886f
 
 
0b4406c
abec40e
382d063
 
 
 
 
 
 
0b4406c
 
 
8fcafbc
 
 
 
 
 
 
 
0b4406c
ee2886f
 
 
8fcafbc
 
b6627a1
 
9f4eaff
8fcafbc
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
title: README
emoji: 📊
colorFrom: blue
colorTo: pink
sdk: static
pinned: false
---

<p align="center">
  <img src="https://raw.githubusercontent.com/asahi417/lm-question-generation/master/assets/example.png" width="900">
</p>

<br>

***Language Models for Question Generation (LMQG)*** is the official registry of <a href="https://aclanthology.org/2022.emnlp-main.42/">"Generative Language Models for Paragraph-Level Question Generation, EMNLP 2022"</a>, which has proposed <a href="https://github.com/asahi417/lm-question-generation/blob/master/QG_BENCH.md">QG-Bench</a>, multilingual and multidomain question generation datasets and models.
See the official <a href="https://github.com/asahi417/lm-question-generation">GitHub</a> for more information.
The QG models can be used with <a href="https://pypi.org/project/lmqg">`lmqg`</a> library as below.

<pre class="line-numbers">
   <code class="language-python">
   from lmqg import TransformersQG
   model = TransformersQG(language='en', model='lmqg/t5-large-squad-qg-ae')
   context = "William Turner was an English painter who specialised "
             "in watercolour landscapes. He is often known as "
             "William Turner of Oxford or just Turner of Oxford to "
             "distinguish him from his contemporary, J. M. W. Turner. "
             "Many of Turner's paintings depicted the countryside "
             "around Oxford. One of his best known pictures is a "
             "view of the city of Oxford from Hinksey Hill."
   question_answer = model.generate_qa(context)
   print(question_answer)
   [
       ('Who was an English painter who specialised in watercolour landscapes?',
        'William Turner'),
       ("What was William Turner's nickname?",
        'William Turner of Oxford'),
       ("What did many of Turner's paintings depict around Oxford?",
        'countryside'),
       ("What is one of William Turner's best known paintings?",
        'a view of the city of Oxford')
   ]
   </code>
</pre>

See more information bellow.
<ul>
   <li>&nbsp; lmqg: <a href="https://github.com/asahi417/lm-question-generation">https://github.com/asahi417/lm-question-generation</a></li>
   <li>&nbsp; QG-Bench: <a href="https://github.com/asahi417/lm-question-generation/blob/master/QG_BENCH.md#datasets">https://github.com/asahi417/lm-question-generation/blob/master/QG_BENCH.md#datasets</a></li>
   <li>&nbsp; Paper (EMNLP 2022): <a href="https://aclanthology.org/2022.emnlp-main.42/">https://aclanthology.org/2022.emnlp-main.42/</a></li>
</ul>