# Path: nmt_chainer/utilities/utils.py
# def ensure_path(path):
#     if len(path) == 0:
#         return
#     try:
#         os.makedirs(path)
#         log.info("Created directory %s" % path)
#     except OSError:
#         if not os.path.isdir(path):
#             raise


import nmt_chainer
import collections
import logging
import json
import operator
import os.path
import gzip
import nmt_chainer.dataprocessing.processors as processors
from nmt_chainer.utilities.utils import ensure_path
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""make_data.py: prepare data for training"""
from __future__ import absolute_import, division, print_function, unicode_literals

__author__ = "Fabien Cromieres"
__license__ = "undecided"
__version__ = "1.0"
__email__ = "fabien.cromieres@gmail.com"
__status__ = "Development"



logging.basicConfig()
log = logging.getLogger("rnns:make_data")
log.setLevel(logging.INFO)


def do_make_data(config):
    #     raw_input("Press Enter to Continue 222")

    save_prefix_dir, save_prefix_fn = os.path.split(config.data.save_prefix)

# Path: nmt_chainer/utilities/utils.py
# def ensure_path(path):
#     if len(path) == 0:
#         return
#     try:
#         os.makedirs(path)
#         log.info("Created directory %s" % path)
#     except OSError:
#         if not os.path.isdir(path):
#             raise


# Path: nmt_chainer/dataprocessing/make_data.py
import nmt_chainer
import collections
import logging
import json
import operator
import os.path
import gzip
import nmt_chainer.dataprocessing.processors as processors
from nmt_chainer.utilities.utils import ensure_path

#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""make_data.py: prepare data for training"""
from __future__ import absolute_import, division, print_function, unicode_literals

__author__ = "Fabien Cromieres"
__license__ = "undecided"
__version__ = "1.0"
__email__ = "fabien.cromieres@gmail.com"
__status__ = "Development"



logging.basicConfig()
log = logging.getLogger("rnns:make_data")
log.setLevel(logging.INFO)


def do_make_data(config):
    #     raw_input("Press Enter to Continue 222")

    save_prefix_dir, save_prefix_fn = os.path.split(config.data.save_prefix)

    ensure_path(save_prefix_dir)