import logging import sys # from word2embeddings.apps import use_theano_development_version # use_theano_development_version() from cis.deep.utils import logger_config from word2embeddings.nn.trainer import HingeSentimentMiniBatchTrainer, \ HingeSentiment2MiniBatchTrainer, HingeMiniBatchTrainer, \ SimpleVLblNceTrainer, SimpleVLblNceSentimentTrainer, \ VLblNceTrainer, VLblNceSentimentTrainer, VLblNceDistributionalTrainer, \ NlblNceTrainer, NvLblNceTrainer, SLmNceTrainer, LblNceTrainer from word2embeddings.tools.util import debug log = getLogger(__name__) logger_config(log) parser = ArgumentParser() parser.add_argument('train_file', help='Document for training that contains tokenized text') parser.add_argument( '--hidden-layers', dest='hidden_layers', help='Width of each hidden layer, comma separated. E.g., ' + '"28,64,32". This option only has an effect for mlp models and ' + 'for slm, where only one hidden layer is allowed.') parser.add_argument( 'vocabulary', help='Vocabulary file that contains list of tokens.\nCaution: Add ' +
# -*- coding: utf-8 -*- """ example usage: """ from argparse import ArgumentParser from logging import getLogger import re import sys from cis.deep.utils import utf8_file_open, logger_config log = getLogger(__name__) logger_config(log) parser = ArgumentParser(description="""Escape the given text file to remove all regular expressions.""") parser.add_argument('infile', help='file that might contain regular expressions') parser.add_argument('outfile', help='file having regular expressions escaped') def main(argv=None): if argv is None: argv = sys.argv[1:] args = parser.parse_args(argv) log.info('start parameters: ' + str(args)) log.info('transforming data')