task_categories:visual-question-answering task_ids:visual-question-answering language:vi language:en license:unknown OK-VQA OK-VQA-vi region:us
---
language:
  - vi
  - en
pretty_name: OK-VQA in multilang
source-datasets:
  - OK-VQA
  - COCO
tags:
  - OK-VQA
  - OK-VQA-vi
license: unknown
task_categories:
  - visual-question-answering
task_ids:
  - visual-question-answering
---
# OK-VQA in multilang

This is Google-translated versions of [OK-VQA](https://okvqa.allenai.org/index.html) in many languages. Each language version stays in each folder.

The process of building Vietnamese version as follows:
- In `en/` folder,
  - From [OK-VQA](https://okvqa.allenai.org/index.html), obtain all json files: `mscoco_train2014_annotations.json`, `mscoco_val2014_annotations.json`, `OpenEnded_mscoco_train2014_questions.json`, `OpenEnded_mscoco_val2014_questions.json`.
  - By using [set data structure](https://docs.python.org/3/tutorial/datastructures.html#sets), generate txt files of unique text: `train_answer_list.txt`, `train_question_list.txt`, `val_answer_list.txt`, `val_question_list.txt`.
- In `vi/` folder,
  - By translating 4 `en/.txt` files, generate `train_answer_list.jsonl`, `train_question_list.jsonl`, `val_answer_list.jsonl`, `val_question_list.jsonl`. In each of entry of each file, the key is the original english text, the value is the translated text in vietnamese.

To load Vietnamese version in your code, you need original English version. Then just use English text as key to retrieve Vietnamese value from jsonl files. I provide both English and Vietnamese version.

Other languages (if added) shall follow the same process.

Current languages:
- en
- vi

There will be more if I have time.

Please refer to [this code](https://github.com/dinhanhx/velvet/blob/main/scripts/apply_translate_okvqa.py) to apply translation.