e79449afe45f4da6f1756a7d92bdd3cd6618c638,qanta/buzzer/util.py,,process_question,#,86
Before Change
qid, q_group = item
answer = questions[qid].page
q_group = sorted(q_group.items(), key=lambda x: x[0])
word_positions, guesses = list(map(list, zip(*q_group)))
// each entry is a list of (guess, logit, prob) sorted by logit
labels = np.array([int(g[0][0] == answer) for g in guesses], dtype=np.int32)
vectors = vector_converter(guesses)
return qid, vectors, labels, word_positions
After Change
// labels = np.array([int(g[0][0] == answer) for g in guesses], dtype=np.int32)
// vectors = vector_converter(guesses)
q_rows = q_rows.groupby("char_index")
q_rows = q_rows.apply(lambda x: x.sort_values("score"))
return qid, vectors, labels, word_positions
def read_data(
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: Pinafore/qb
Commit Name: e79449afe45f4da6f1756a7d92bdd3cd6618c638
Time: 2018-04-25
Author: sjtufs@gmail.com
File Name: qanta/buzzer/util.py
Class Name:
Method Name: process_question
Project Name: weinman/cnn_lstm_ctc_ocr
Commit Name: 96fad3497a4373cc289f9e7c4272d4722a22f381
Time: 2018-06-20
Author: am.lamsal@gmail.com
File Name: src/mjsynth.py
Class Name:
Method Name: bucketed_input_pipeline
Project Name: weinman/cnn_lstm_ctc_ocr
Commit Name: f72e30b86039b53dcced080dc999e1a9fb052c49
Time: 2018-06-19
Author: am.lamsal@gmail.com
File Name: src/mjsynth.py
Class Name:
Method Name: bucketed_input_pipeline