modules/utils/notebook_utils/doc2vec_helper.py
def execute_doc2vec(training_file, word_file, output_file, test_file, vocab_file, read_vocab=False):
    """
    This function is designed run doc2vec to embed sentences into dense vectors.

    training_file - a file path that contains training sentences used for embeddings
    word_file - a file path that tells doc2vec where to output word vectors
    output_file - a file path that tells doc2vec where to output doc vectors
    test_file - a file path that contains sentences that will be embedded
    vocab_file - a file path that tells doc2vec where to output vocabulary
    read_vocab - a boolean to say read in a vocab list or create one from scratch
    """

    command = [
    '../../../iclr2017/doc2vecc',
    '-train', training_file,
    '-word', word_file,
    '-output', output_file,
    '-cbow', '1',
    '-size', '500',
    '-negative', '5',
    '-hs', '0',
    '-threads', '5',
    '-binary', '0',
    '-iter', '30',
    '-test', test_file,
    ]

    if read_vocab:
        command + ['read-vocab', vocab_file]
    else:
        command  + ['save-vocab', vocab_file]

    subprocess.Popen(command).wait()
    return

    This function is designed run doc2vec to embed sentences into dense vectors.

    training_file - a file path that contains training sentences used for embeddings
    word_file - a file path that tells doc2vec where to output word vectors
    output_file - a file path that tells doc2vec where to output doc vectors
    test_file - a file path that contains sentences that will be embedded
    vocab_file - a file path that tells doc2vec where to output vocabulary
    read_vocab - a boolean to say read in a vocab list or create one from scratch
    
This function is designed run doc2vec to embed sentences into dense vectors.
This function is designed run doc2vec to embed sentences into dense vectors .
def execute_doc2vec(training_file, word_file, output_file, test_file, vocab_file, read_vocab=False):
    command = [
    '../../../iclr2017/doc2vecc',
    '-train', training_file,
    '-word', word_file,
    '-output', output_file,
    '-cbow', '1',
    '-size', '500',
    '-negative', '5',
    '-hs', '0',
    '-threads', '5',
    '-binary', '0',
    '-iter', '30',
    '-test', test_file,
    ]
    if read_vocab:
        command + ['read-vocab', vocab_file]
    else:
        command  + ['save-vocab', vocab_file]
    subprocess.Popen(command).wait()
    return
def execute_doc2vec ( training_file , word_file , output_file , test_file , vocab_file , read_vocab = False ) : command = [ '../../../iclr2017/doc2vecc' , '-train' , training_file , '-word' , word_file , '-output' , output_file , '-cbow' , '1' , '-size' , '500' , '-negative' , '5' , '-hs' , '0' , '-threads' , '5' , '-binary' , '0' , '-iter' , '30' , '-test' , test_file , ] if read_vocab : command + [ 'read-vocab' , vocab_file ] else : command + [ 'save-vocab' , vocab_file ] subprocess . Popen ( command ) . wait ( ) return
This function is designed run doc2vec to embed sentences into dense vectors.
This function is designed run doc2vec to embed sentences into dense vectors .
"""
    This function is designed run doc2vec to embed sentences into dense vectors.

    training_file - a file path that contains training sentences used for embeddings
    word_file - a file path that tells doc2vec where to output word vectors
    output_file - a file path that tells doc2vec where to output doc vectors
    test_file - a file path that contains sentences that will be embedded
    vocab_file - a file path that tells doc2vec where to output vocabulary
    read_vocab - a boolean to say read in a vocab list or create one from scratch
    """
training_file
word_file
output_file
test_file
vocab_file
read_vocab