Beispiel #1
0
 def __init__(self, opt, shared=None):
     build(opt)
     opt['datafile'] = os.path.join(
         opt['datapath'],
         'dialog-bAbI-plus',
         'dialog-bAbI-plus-tasks',
         'dialog-babi-kb-all.txt',
     )
     super().__init__(opt, shared)
Beispiel #2
0
def _path(task, opt):
    # Build the data if it doesn't exist.
    build(opt)
    prefix = os.path.join(opt['datapath'], 'dialog-bAbI-plus', 'dialog-bAbI-plus-tasks')
    suffix = ''
    dt = opt['datatype'].split(':')[0]
    if dt == 'train':
        suffix = 'trn'
    elif dt == 'test':
        suffix = 'tst'
    elif dt == 'valid':
        suffix = 'dev'
    datafile = os.path.join(prefix,
                            '{tsk}-{type}.txt'.format(tsk=tasks[int(task)], type=suffix))

    cands_datafile = os.path.join(prefix, 'dialog-babi-candidates.txt')

    return datafile, cands_datafile
def _path(task, opt):
    # Build the data if it doesn't exist.
    build(opt)
    prefix = os.path.join(opt['datapath'], 'dialog-bAbI-plus', 'dialog-bAbI-plus-tasks')
    suffix = ''
    dt = opt['datatype'].split(':')[0]
    if dt == 'train':
        suffix = 'trn'
    elif dt == 'test':
        suffix = 'tst'
    elif dt == 'valid':
        suffix = 'dev'
    datafile = os.path.join(prefix,
                            '{tsk}-{type}.txt'.format(tsk=tasks[int(task)], type=suffix))

    cands_datafile = os.path.join(prefix, 'dialog-babi-candidates.txt')

    return datafile, cands_datafile
Beispiel #4
0
 def __init__(self, opt, shared=None):
     build(opt)
     opt['datafile'] = os.path.join(opt['datapath'], 'dialog-bAbI-plus',
                                    'dialog-bAbI-plus-tasks',
                                    'dialog-babi-kb-all.txt')
     super().__init__(opt, shared)