## 3 Automatic Question Generation Methodology
### Semantic Quiz Generation  
Prior to starting the devising of questions, some considerations shall be taken into account. It must be borne in mind that the quiz game will be displayed in users' smartphones, thereby laying emphasis on producing a mobile-friendly interface. A multiple choice-based trivia is therefore an appropriate form of presenting questions in smartphones. Multiple choice questions take less time to answer [61], thus allowing users to easily and promptly tap the selected answer in their smartphones instead of having to type it in. The structure of a Multiple Choice Question (MCQ) consists in the following three items [62]: the _stem:_ the question to formulate; the _key:_ the correct answer; and the _distractors_: a set of wrong, yet plausible alternatives. The objective of the _semantic quiz generation_ stage is to produce sets of MCQs according to the described format and in an automated manner. In order to achieve such automation, MCQs will be generated through question templates. Question templates contain three main elements: the question to formulate; the category, if any, into which the question has been classified; and a parametrised SPARQL query. These, together with the enriched museum data, are fed into the automated question generator. Such generator consists in a script that evaluates the annotated data obtained about a museum item against the templates that comply with the specified criteria, i.e., the question category or subject matches the topics of at least one of the pieces of annotated data. Then, the SPARQL query is executed in order to retrieve: (i) the correct answer to the question ( the key) and (ii) a list of randomly selected distractors from a set of elements similar to the answer. With the intention of implementing gamification rules for the Trivia Quiz Game, distractors will be sorted into different sublists according to their difficulty, thus adapting the game to different expertise levels. The suggested approach benefits from the research produced by [PERSON] and [PERSON] [63], which exploits entity similarity scores computed by Sematch (Sematch is an entity similarity score calculator which has a working demo found in: [[http://sematch.cluster.gsi.dit.upm.es/](http://sematch.cluster.gsi.dit.upm.es/)]([http://sematch.cluster.gsi.dit.upm.es/](http://sematch.cluster.gsi.dit.upm.es/))) framework in order to classify distractors in consonance with their difficulty. Such scores range from 0 (no apparent  
Figure 2: Tasks involved in the NLP and Semantic Analysis Procedure. similarity between the two named entities) to 1 (strong similarity between them). A total of three sublists of distractors will be generated, corresponding to easy, medium and hard difficulties. The output of this stage is hence the enriched museum item together with an array of questions, their answers and the three aforementioned distractor lists. The assignation of the three distractors needed to complete the MCQ is performed in a posterior stage where players' expertise level can be checked. Further details are provided in Section 4. Referring back to _Las Meninas_ example presented in Section 3.1, given the enriched data version produced on this exhibit, it can be, for instance, evaluated against a question template resembling the structure presented in Listing 1. The question generator executes the query on DBpedia's SPARQL endpoint in order to obtain a set of distractors. A possible output of this evaluation is illustrated through the extract provided in Listing 2, portraying the enriched museum item data and the questions formed. The assorted lists of distractors contain their name and their associated similarity score with respect to the entity _[PERSON]_. ```
{\"stem\":\"WhoisthesuccessofEntity.name?\", \"category\":\"Royalty\", \"query\":\"SELECTYuri?nameWHERE{?uriadob:Royalty.?urirofs:label?name. FILTER(lang(?name)='en')}\" }
```  
Listing 1: Example of a simple question template.