<commit_before>"""
This example shows how to build a fully-functional text classification application with command-line support for
training and testing with a minimum of code.

The model used in the application is copied from imdb_cnn_lstm.py in the Keras examples folder.

Run "python convolution_net.py --help" to see the command line options. Notice that they identical to what is provided
by the "mycroft" command line application, except the model parameters correspond to the model being trained below.
"""

import mycroft.console
import mycroft.model
import mycroft.text


# Write your own model by extending mycroft.model.TextEmbeddingClassifier. All you need to do is override the
# constructor.
class ConvolutionNetClassifier(mycroft.model.TextEmbeddingClassifier):
    # (It is not necessary to write default parameter values at the top of the class, but I do it here for clarity's
    # sake.)
    VOCABULARY_SIZE = 20000
    DROPOUT = 0.25
    FILTERS = 64
    KERNEL_SIZE = 5<commit_msg>Improved comment<commit_after>"""
This example shows how to build a fully-functional text classification application with command-line support for
training and testing with a minimum of code.

The model used in the application is copied from imdb_cnn_lstm.py in the Keras examples folder.

Run "python convolution_net.py --help" to see the command line options. Notice that they identical to what is provided
by the "mycroft" command line application, except the model parameters correspond to the model being trained below.
"""

import mycroft.console
import mycroft.model
import mycroft.text


# Write your own model by extending mycroft.model.TextEmbeddingClassifier. All you need to do is override the
# constructor.
class ConvolutionNetClassifier(mycroft.model.TextEmbeddingClassifier):
    # (It is not necessary make default parameter values class values, but I do it here for clarity's sake.)
    VOCABULARY_SIZE = 20000
    DROPOUT = 0.25
    FILTERS = 64
    KERNEL_SIZE = 5
{'fraction_non_alphanumeric': 0.04984894259818731, 'fraction_numerical': 0.011077542799597181, 'mean_word_length': 4.4289617486338795, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3597699', 'n_tokens_mistral': 562, 'n_tokens_neox': 508, 'n_words': 253}