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


from corpkit.constants import STRINGTYPE, PYTHON_VERSION, INPUTFUNC
    from time import localtime, strftime
    from collections import Counter
    from pandas import DataFrame, Series
    from corpkit.interrogation import Interrogation, Interrodict
    from corpkit.corpus import Datalist, Corpora, Corpus, File, Subcorpus
    from corpkit.process import (tregex_engine, get_deps, unsplitter, sanitise_dict, 
                                 animator, filtermaker, fix_search,
                                 pat_format, auto_usecols, format_tregex,
                                 make_conc_lines_from_whole_mid)
    from corpkit.other import as_regex
    from corpkit.dictionaries.process_types import Wordlist
    from corpkit.build import check_jdk
    from corpkit.conll import pipeline
    from corpkit.process import delete_files_and_subcorpora
    from traitlets import TraitError
        from corpkit.cql import to_corpkit
        from time import localtime, strftime
        from collections import OrderedDict
        from corpkit.dictionaries.process_types import Wordlist
        from collections import OrderedDict
            from time import localtime, strftime
        from corpkit.dictionaries.word_transforms import usa_convert
            from corpkit.process import dictformat
            from corpkit.build import get_all_metadata_fields
        from corpkit.interrogation import Concordance
            from blessings import Terminal
    from corpkit.process import searchfixer
        from nltk.stem.wordnet import WordNetLemmatizer
        from corpkit.multiprocess import pmultiquery
    from collections import defaultdict
        from corpkit.process import gettag
    import codecs
    import signal
    import os
    import pandas as pd
    import re
        import signal
        import sys
        import string
        import re
            import traceback
            import sys
        import copy
            print(finalstring)

    def get_conc_colnames(corpus,
                          fsi_index=False,
                          simple_tregex_mode=False):
    
        fields = []
        base = 'c f s l m r'
        
        if simple_tregex_mode:
            base = base.replace('f ', '')

        if fsi_index and not simple_tregex_mode:
            base = 'i ' + base
        
        if PYTHON_VERSION == 2:
            base = base.encode('utf-8').split()
        else:
            base = base.split() 

        if show_conc_metadata:
            meta = get_all_metadata_fields(corpus.path)

            if isinstance(show_conc_metadata, list):
                meta = [i for i in meta if i in show_conc_metadata]
            #elif show_conc_metadata is True:
            #    pass
            for i in sorted(meta):
                if i in ['speaker', 'sent_id', 'parse']:
                    continue

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


# Path: corpkit/interrogator.py
from corpkit.constants import STRINGTYPE, PYTHON_VERSION, INPUTFUNC
    from time import localtime, strftime
    from collections import Counter
    from pandas import DataFrame, Series
    from corpkit.interrogation import Interrogation, Interrodict
    from corpkit.corpus import Datalist, Corpora, Corpus, File, Subcorpus
    from corpkit.process import (tregex_engine, get_deps, unsplitter, sanitise_dict, 
                                 animator, filtermaker, fix_search,
                                 pat_format, auto_usecols, format_tregex,
                                 make_conc_lines_from_whole_mid)
    from corpkit.other import as_regex
    from corpkit.dictionaries.process_types import Wordlist
    from corpkit.build import check_jdk
    from corpkit.conll import pipeline
    from corpkit.process import delete_files_and_subcorpora
    from traitlets import TraitError
        from corpkit.cql import to_corpkit
        from time import localtime, strftime
        from collections import OrderedDict
        from corpkit.dictionaries.process_types import Wordlist
        from collections import OrderedDict
            from time import localtime, strftime
        from corpkit.dictionaries.word_transforms import usa_convert
            from corpkit.process import dictformat
            from corpkit.build import get_all_metadata_fields
        from corpkit.interrogation import Concordance
            from blessings import Terminal
    from corpkit.process import searchfixer
        from nltk.stem.wordnet import WordNetLemmatizer
        from corpkit.multiprocess import pmultiquery
    from collections import defaultdict
        from corpkit.process import gettag
    import codecs
    import signal
    import os
    import pandas as pd
    import re
        import signal
        import sys
        import string
        import re
            import traceback
            import sys
        import copy

            print(finalstring)

    def get_conc_colnames(corpus,
                          fsi_index=False,
                          simple_tregex_mode=False):
    
        fields = []
        base = 'c f s l m r'
        
        if simple_tregex_mode:
            base = base.replace('f ', '')

        if fsi_index and not simple_tregex_mode:
            base = 'i ' + base
        
        if PYTHON_VERSION == 2:
            base = base.encode('utf-8').split()
        else:
            base = base.split() 

        if show_conc_metadata:
            meta = get_all_metadata_fields(corpus.path)

            if isinstance(show_conc_metadata, list):
                meta = [i for i in meta if i in show_conc_metadata]
            #elif show_conc_metadata is True:
            #    pass
            for i in sorted(meta):
                if i in ['speaker', 'sent_id', 'parse']:
                    continue

                if PYTHON_VERSION == 2: