5e80af5718813e29a81c036d862c355deb7e70d5,qanta/guesser/elasticsearch.py,ElasticSearchGuesser,guess,#ElasticSearchGuesser#Any#Any#,25

Before Change


              max_n_guesses: Optional[int]):
        predictions = []
        es_index = ElasticSearchIndex()
        bar = progressbar.ProgressBar()
        for q in bar(questions):
            guesses = es_index.search(q)[:max_n_guesses]
            predictions.append(guesses)
        return predictions

After Change


              questions: List[QuestionText],
              max_n_guesses: Optional[int]):
        predictions = []
        pool = Pool(processes=conf["guessers"]["ElasticSearch"]["n_cores"])
        for guesses in pool.starmap(es_search,
                                    zip(repeat(max_n_guesses), questions), chunksize=1000):
            predictions.append(guesses)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: Pinafore/qb
Commit Name: 5e80af5718813e29a81c036d862c355deb7e70d5
Time: 2017-03-23
Author: ski.rodriguez@gmail.com
File Name: qanta/guesser/elasticsearch.py
Class Name: ElasticSearchGuesser
Method Name: guess


Project Name: Pinafore/qb
Commit Name: 5803f7f073262df89dea926241e59dc30dee2547
Time: 2017-12-14
Author: sjtufs@gmail.com
File Name: qanta/experimental/chainer/main.py
Class Name:
Method Name: main


Project Name: graphbrain/graphbrain
Commit Name: b354803b038659359816213443108cf0ee18f74a
Time: 2020-01-08
Author: telmo@telmomenezes.net
File Name: graphbrain/agents/txt_parser.py
Class Name: TxtParser
Method Name: input_file