20d1da406aaa2ae2a32c48a28e3efe4f475d7398,ch12/libbots/subtitles.py,,phrase_pairs_dict,#Any#,181

Before Change


    
    res = set()
    for p1, p2 in phrase_pairs:
        res |= set(map(str.lower, p1.words)) | set(map(str.lower, p2.words))
    return res


def dialogues_to_pairs(dialogues, max_tokens=None):

After Change


    next_id = 0
    res = {}
    for p1, p2 in phrase_pairs:
        for w in map(str.lower, itertools.chain(p1.words, p2.words)):
            if w not in res:
                res[w] = next_id
                next_id += 1
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 20d1da406aaa2ae2a32c48a28e3efe4f475d7398
Time: 2018-01-06
Author: max.lapan@gmail.com
File Name: ch12/libbots/subtitles.py
Class Name:
Method Name: phrase_pairs_dict


Project Name: pgmpy/pgmpy
Commit Name: ca25da7c55ba436ab557410d5f2e2e9b557d2840
Time: 2015-03-02
Author: abinash.panda.ece10@itbhu.ac.in
File Name: pgmpy/models/MarkovModel.py
Class Name: MarkovModel
Method Name: to_junction_tree


Project Name: oddt/oddt
Commit Name: 6aac368b7dcda1bacaf250d72757067fed5a35ec
Time: 2018-05-17
Author: martasd@ibb.waw.pl
File Name: rdkit_fixer.py
Class Name:
Method Name: PreparePDBMol


Project Name: stanford-mast/nn_dataflow
Commit Name: dbce7a60ae3be16be1baaf9c76b9d8067484213f
Time: 2017-08-17
Author: mgao12@stanford.edu
File Name: nn_dataflow/Scheduling.py
Class Name: Scheduling
Method Name: schedule_search