class documentation
class CaptionTranslator: (source)
Constructor: CaptionTranslator(data_path, out_json)
Translate the image captions to English via OpenAI API.
| Method | __init__ |
Initialize CaptionTranslator. |
| Method | load |
Load the original and the translated json file. |
| Method | load |
Load info from the xz file and save a json format. |
| Method | translate |
Translate the captions to English via OpenAI API. |
| Instance Variable | data |
path of the original json file. |
| Instance Variable | out |
path of the output json file. |