cdQA-annotator icon indicating copy to clipboard operation
cdQA-annotator copied to clipboard

Update JSON to SQuAD2.0

Open fmikaelian opened this issue 6 years ago • 3 comments

  • [ ] Add question id on addAnnotation() method
  • [ ] If answer is empty on addAnnotation() add "is_impossible":true otherwise false
{
    "version":"v2.0",
    "data":[
       {
          "title":"Beyonc\u00e9",
          "paragraphs":[
             {
                "qas":[
                   {
                      "question":"When did Beyonce start becoming popular?",
                      "id":"56be85543aeaaa14008c9063",
                      "answers":[
                         {
                            "text":"in the late 1990s",
                            "answer_start":269
                         }
                      ],
                      "is_impossible":false
                   },
                   {
                      "question":"What areas did Beyonce compete in when she was growing up?",
                      "id":"56be85543aeaaa14008c9065",
                      "answers":[
                         {
                            "text":"singing and dancing",
                            "answer_start":207
                         }
                      ],
                      "is_impossible":false
                   },

fmikaelian avatar Feb 01 '19 16:02 fmikaelian

This may help for id https://github.com/kelektiv/node-uuid #29

fmikaelian avatar Feb 12 '19 14:02 fmikaelian

@fmikaelian I have been able to migrate the application to support SQuAD2.0 format including the above-requested enhancement.

rsjain1978 avatar Jan 05 '20 17:01 rsjain1978

Hi @rsjain1978 Thank you for sharing!

We would be very happy to support both SQuAD 1.1 and SQuAD 2.0 in the annotator. We just need to find a proper way to handle this feature from the user point of view. Could you describe your solution? Or open a PR with what you have so we can review together?

fmikaelian avatar Jan 08 '20 21:01 fmikaelian