ea2b8969e20223b33a9bad6df9d5ee8065998855,textgenrnn/utils.py,,textgenrnn_generate,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,39

Before Change


        if word_level:
            text = prefix.split() if prefix else [""]
        else:
            text = list(prefix) if prefix else [""]
        max_gen_length += maxlen
    else:
        if word_level:

After Change


    if word_level and prefix:
        punct = "!"//$%&()*+,-./:;<=>?@[\]^_`{|}~\\n\\t\"‘’“”’–—"
        prefix = re.sub("([{}])".format(punct), r" \1 ", prefix)
        prefix_t = [x.lower() for x in prefix.split()]

    if not word_level and prefix:
        prefix_t = list(prefix)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: minimaxir/textgenrnn
Commit Name: ea2b8969e20223b33a9bad6df9d5ee8065998855
Time: 2018-08-05
Author: max@minimaxir.com
File Name: textgenrnn/utils.py
Class Name:
Method Name: textgenrnn_generate


Project Name: snipsco/snips-nlu
Commit Name: f782e70c53068bd68ae048957aa1e29ec46b405a
Time: 2018-05-02
Author: adrien.ball@snips.net
File Name: snips_nlu/intent_parser/deterministic_intent_parser.py
Class Name:
Method Name: _get_joined_entity_utterances


Project Name: dmlc/gluon-nlp
Commit Name: bb82889e5cc39ef7a9e7fefdfb7b51fe8c605cf9
Time: 2018-09-28
Author: szhengac@users.noreply.github.com
File Name: scripts/nmt/bleu.py
Class Name:
Method Name: compute_bleu