# Path: autoencoder/utils/io_utils.py
# def load_json(file):
#     try:
#         with open(file, 'r') as datafile:
#             data = json.load(datafile)
#     except Exception as e:
#         raise e
# 
#     return data
# 
# def dump_json(data, file):
#     try:
#         with open(file, 'w') as datafile:
#             json.dump(data, datafile)
#     except Exception as e:
#         raise e


import os
import sys
import argparse
import numpy as np
    import pdb;pdb.set_trace()
from autoencoder.utils.io_utils import load_json, dump_json
'''
Created on Jan, 2017

@author: hugo

'''
from __future__ import absolute_import


def main():
    parser = argparse.ArgumentParser()
    parser.add_argument('train_doc_codes', type=str, help='path to the train doc code file')
    parser.add_argument('val_doc_codes', type=str, help='path to the valid doc code file')
    parser.add_argument('out_dir', type=str, help='path to the output dir')
    args = parser.parse_args()

    train_doc_codes_path = args.train_doc_codes
    train_doc_codes = load_json(train_doc_codes_path)

# Path: autoencoder/utils/io_utils.py
# def load_json(file):
#     try:
#         with open(file, 'r') as datafile:
#             data = json.load(datafile)
#     except Exception as e:
#         raise e
# 
#     return data
# 
# def dump_json(data, file):
#     try:
#         with open(file, 'w') as datafile:
#             json.dump(data, datafile)
#     except Exception as e:
#         raise e


# Path: nvdm_doccodes_converter.py
import os
import sys
import argparse
import numpy as np
    import pdb;pdb.set_trace()
from autoencoder.utils.io_utils import load_json, dump_json

'''
Created on Jan, 2017

@author: hugo

'''
from __future__ import absolute_import


def main():
    parser = argparse.ArgumentParser()
    parser.add_argument('train_doc_codes', type=str, help='path to the train doc code file')
    parser.add_argument('val_doc_codes', type=str, help='path to the valid doc code file')
    parser.add_argument('out_dir', type=str, help='path to the output dir')
    args = parser.parse_args()

    train_doc_codes_path = args.train_doc_codes
    train_doc_codes = load_json(train_doc_codes_path)

    val_doc_codes = load_json(args.val_doc_codes)