d6c184579dee8328635016607049ab17f12c68e4,tgen/rank.py,PerceptronRanker,_get_rival_candidates,#PerceptronRanker#Any#Any#Any#,284
Before Change
gen_doc = None
while gen_doc is None or (len(gen_doc.bundles) < self.rival_number):
gen_doc = self.sampling_planner.generate_tree(da, gen_doc)
if (gen_doc.bundles[-1].get_zone(self.language, self.selector).ttree
== train_ttrees[gold_ttree_no]): // don"t generate trees identical to the gold one
del gen_doc.bundles[-1]
random_ttrees = ttrees_from_doc(gen_doc, self.language, self.selector)
rival_ttrees.extend(random_ttrees)
rival_feats.extend([self._extract_feats(ttree, da) for ttree in random_ttrees])
After Change
random_trees = []
while len(random_trees) < self.rival_number:
tree = self.sampling_planner.generate_tree(da)
if (tree != train_trees[gold_tree_idx]): // don"t generate trees identical to the gold one
random_trees.append(tree)
rival_trees.extend(random_trees)
rival_feats.extend([self._extract_feats(ttree, da) for ttree in random_trees])
// candidates generated using the A*search planner, which uses this ranker with current
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: UFAL-DSG/tgen
Commit Name: d6c184579dee8328635016607049ab17f12c68e4
Time: 2014-08-20
Author: odusek@ufal.mff.cuni.cz
File Name: tgen/rank.py
Class Name: PerceptronRanker
Method Name: _get_rival_candidates
Project Name: pyinstaller/pyinstaller
Commit Name: f1a093ebed17dab737153888733c06ed807b6746
Time: 2015-05-11
Author: h.goebel@crazy-compilers.com
File Name: PyInstaller/depend/analysis.py
Class Name: TOC
Method Name: __sub__
Project Name: idank/explainshell
Commit Name: 1fffcec16578e6bea8de6e685632b3f56713a438
Time: 2013-09-07
Author: idankk86@gmail.com
File Name: explainshell/matcher.py
Class Name: matcher
Method Name: _mergeadjacent