# Path: corpkit/constants.py
# INPUTFUNC = input if PYTHON_VERSION == 3 else raw_input
# 
# PYTHON_VERSION = sys.version_info.major


from corpkit.constants import INPUTFUNC, PYTHON_VERSION
    from os.path import join, isfile, isdir, basename, splitext, exists
    from corpkit.build import folderise, can_folderise
    from corpkit.process import saferead, make_dotfile
    from corpkit.build import (get_corpus_filepaths, 
                               check_jdk, 
                               rename_all_files,
                               make_no_id_corpus, parse_corpus, move_parsed_files)
    from corpkit.constants import REPEAT_PARSE_ATTEMPTS, OPENER, PYTHON_VERSION
                from joblib import Parallel, delayed
                    from corpkit.constants import OPENER
            from corpkit.conll import convert_json_to_conll
        from corpkit.tokenise import plaintext_to_conll
    import sys
    import os
    import shutil
    import codecs
        import __main__ as main
                import __main__ as main
                    import multiprocessing
            import shutil
    unparsed_corpus_path = os.path.abspath(unparsed_corpus_path)

    # move it into project
    if fileparse:
        datapath = project_path
    else:
        datapath = join(project_path, 'data')
    
    if isdir(datapath):
        newp = join(datapath, basename(unparsed_corpus_path))
    else:
        os.makedirs(datapath)
        if fileparse:
            noext = splitext(unparsed_corpus_path)[0]
            newp = join(datapath, basename(noext))
        else:
            newp = join(datapath, basename(unparsed_corpus_path))

    if exists(newp):
        pass
    else:
        copier(unparsed_corpus_path, newp)
    
    unparsed_corpus_path = newp

    # ask to folderise?
    check_do_folderise = False
    do_folderise = kwargs.get('folderise', None)
    if can_folderise(unparsed_corpus_path):
        if do_folderise is None and not hasattr(main, '__file__'):

# Path: corpkit/constants.py
# INPUTFUNC = input if PYTHON_VERSION == 3 else raw_input
# 
# PYTHON_VERSION = sys.version_info.major


# Path: corpkit/make.py
from corpkit.constants import INPUTFUNC, PYTHON_VERSION
    from os.path import join, isfile, isdir, basename, splitext, exists
    from corpkit.build import folderise, can_folderise
    from corpkit.process import saferead, make_dotfile
    from corpkit.build import (get_corpus_filepaths, 
                               check_jdk, 
                               rename_all_files,
                               make_no_id_corpus, parse_corpus, move_parsed_files)
    from corpkit.constants import REPEAT_PARSE_ATTEMPTS, OPENER, PYTHON_VERSION
                from joblib import Parallel, delayed
                    from corpkit.constants import OPENER
            from corpkit.conll import convert_json_to_conll
        from corpkit.tokenise import plaintext_to_conll
    import sys
    import os
    import shutil
    import codecs
        import __main__ as main
                import __main__ as main
                    import multiprocessing
            import shutil

    unparsed_corpus_path = os.path.abspath(unparsed_corpus_path)

    # move it into project
    if fileparse:
        datapath = project_path
    else:
        datapath = join(project_path, 'data')
    
    if isdir(datapath):
        newp = join(datapath, basename(unparsed_corpus_path))
    else:
        os.makedirs(datapath)
        if fileparse:
            noext = splitext(unparsed_corpus_path)[0]
            newp = join(datapath, basename(noext))
        else:
            newp = join(datapath, basename(unparsed_corpus_path))

    if exists(newp):
        pass
    else:
        copier(unparsed_corpus_path, newp)
    
    unparsed_corpus_path = newp

    # ask to folderise?
    check_do_folderise = False
    do_folderise = kwargs.get('folderise', None)
    if can_folderise(unparsed_corpus_path):
        if do_folderise is None and not hasattr(main, '__file__'):

            check_do_folderise = INPUTFUNC("Your corpus has multiple files, but no subcorpora. "\