// Path: src/edu/stanford/nlp/semparse/open/model/candidate/Candidate.java
// public class Candidate {
//   public final Example ex;
//   public final CandidateGroup group;
//   public final TreePattern pattern;
//   public final List<String> predictedEntities;
//   public FeatureVector features;
//   
//   public Candidate(CandidateGroup group, TreePattern pattern) {
//     this.pattern = pattern;
//     this.group = group;
//     group.candidates.add(this);
//     // Perform shallow copy
//     this.ex = group.ex;
//     this.predictedEntities = group.predictedEntities;
//   }
//   
//   public int numEntities() {
//     return group.numEntities();
//   }
//   
//   public double getReward() {
//     return group.ex.expectedAnswer.reward(this);
//   }
//   
//   public Map<String, Double> getCombinedFeatures() {
//     Map<String, Double> map = new HashMap<>();
//     features.increment(1, map);
//     group.features.increment(1, map);
//     return map;
//   }
//   
//   // ============================================================
//   // Debug Print
//   // ============================================================
//   
//   public String sampleEntities() {
//     return group.sampleEntities();
//   }
//   
//   public String allEntities() {
//     return group.allEntities();
//   }
// }
// 
// Path: src/edu/stanford/nlp/semparse/open/model/candidate/CandidateGroup.java
// public class CandidateGroup {
//   public static class Options {
//     @Option(gloss = "level of entity string normalization when creating candidate group "
//                   + "(0 = none / 1 = whitespace / 2 = simple / 3 = aggressive)")
//     public int lateNormalizeEntities = 2;
//   }
//   public static Options opts = new Options();
// 
//   public final Example ex;
//   public final List<KNode> selectedNodes;
//   public final List<String> predictedEntities;
//   final List<Candidate> candidates;
//   public FeatureVector features;
//   public AveragedWordVector averagedWordVector;
//   
//   public CandidateGroup(Example ex, List<KNode> selectedNodes) {
//     this.ex = ex;
//     this.selectedNodes = new ArrayList<>(selectedNodes);
//     List<String> entities = new ArrayList<>();
//     for (KNode node : selectedNodes) {
//       entities.add(LingUtils.normalize(node.fullText, opts.lateNormalizeEntities));
//     }
//     predictedEntities = new ArrayList<>(entities);
//     candidates = new ArrayList<>();
//   }
//   
//   public void initAveragedWordVector() {
//     if (averagedWordVector == null)
//       averagedWordVector = new AveragedWordVector(predictedEntities);
//   }
//   
//   public int numEntities() {
//     return predictedEntities.size();
//   }
//   
//   public int numCandidate() {
//     return candidates.size();
//   }
//   
//   public List<Candidate> getCandidates() {
//     return Collections.unmodifiableList(candidates);
//   }
//   
//   public Candidate addCandidate(TreePattern pattern) {
//     return new Candidate(this, pattern);
//   }
//   
//   public double getReward() {
//     return ex.expectedAnswer.reward(this);
//   }
//   
//   // ============================================================
//   // Debug Print
//   // ============================================================
//  
//   public String sampleEntities() {
//     return StringSampler.sampleEntities(predictedEntities, StringSampler.DEFAULT_LIMIT);
//   }
// 
//   public String allEntities() {
//     return StringSampler.sampleEntities(predictedEntities);
//   }
// 
// }


import edu.stanford.nlp.semparse.open.model.candidate.Candidate;
import edu.stanford.nlp.semparse.open.model.candidate.CandidateGroup;
import fig.basic.LogInfo;
package edu.stanford.nlp.semparse.open.model.feature;


public abstract class FeaturePostProcessor {

  public abstract void process(Candidate candidate);
// Path: src/edu/stanford/nlp/semparse/open/model/candidate/Candidate.java
// public class Candidate {
//   public final Example ex;
//   public final CandidateGroup group;
//   public final TreePattern pattern;
//   public final List<String> predictedEntities;
//   public FeatureVector features;
//   
//   public Candidate(CandidateGroup group, TreePattern pattern) {
//     this.pattern = pattern;
//     this.group = group;
//     group.candidates.add(this);
//     // Perform shallow copy
//     this.ex = group.ex;
//     this.predictedEntities = group.predictedEntities;
//   }
//   
//   public int numEntities() {
//     return group.numEntities();
//   }
//   
//   public double getReward() {
//     return group.ex.expectedAnswer.reward(this);
//   }
//   
//   public Map<String, Double> getCombinedFeatures() {
//     Map<String, Double> map = new HashMap<>();
//     features.increment(1, map);
//     group.features.increment(1, map);
//     return map;
//   }
//   
//   // ============================================================
//   // Debug Print
//   // ============================================================
//   
//   public String sampleEntities() {
//     return group.sampleEntities();
//   }
//   
//   public String allEntities() {
//     return group.allEntities();
//   }
// }
// 
// Path: src/edu/stanford/nlp/semparse/open/model/candidate/CandidateGroup.java
// public class CandidateGroup {
//   public static class Options {
//     @Option(gloss = "level of entity string normalization when creating candidate group "
//                   + "(0 = none / 1 = whitespace / 2 = simple / 3 = aggressive)")
//     public int lateNormalizeEntities = 2;
//   }
//   public static Options opts = new Options();
// 
//   public final Example ex;
//   public final List<KNode> selectedNodes;
//   public final List<String> predictedEntities;
//   final List<Candidate> candidates;
//   public FeatureVector features;
//   public AveragedWordVector averagedWordVector;
//   
//   public CandidateGroup(Example ex, List<KNode> selectedNodes) {
//     this.ex = ex;
//     this.selectedNodes = new ArrayList<>(selectedNodes);
//     List<String> entities = new ArrayList<>();
//     for (KNode node : selectedNodes) {
//       entities.add(LingUtils.normalize(node.fullText, opts.lateNormalizeEntities));
//     }
//     predictedEntities = new ArrayList<>(entities);
//     candidates = new ArrayList<>();
//   }
//   
//   public void initAveragedWordVector() {
//     if (averagedWordVector == null)
//       averagedWordVector = new AveragedWordVector(predictedEntities);
//   }
//   
//   public int numEntities() {
//     return predictedEntities.size();
//   }
//   
//   public int numCandidate() {
//     return candidates.size();
//   }
//   
//   public List<Candidate> getCandidates() {
//     return Collections.unmodifiableList(candidates);
//   }
//   
//   public Candidate addCandidate(TreePattern pattern) {
//     return new Candidate(this, pattern);
//   }
//   
//   public double getReward() {
//     return ex.expectedAnswer.reward(this);
//   }
//   
//   // ============================================================
//   // Debug Print
//   // ============================================================
//  
//   public String sampleEntities() {
//     return StringSampler.sampleEntities(predictedEntities, StringSampler.DEFAULT_LIMIT);
//   }
// 
//   public String allEntities() {
//     return StringSampler.sampleEntities(predictedEntities);
//   }
// 
// }


// Path: src/edu/stanford/nlp/semparse/open/model/feature/FeaturePostProcessor.java
import edu.stanford.nlp.semparse.open.model.candidate.Candidate;
import edu.stanford.nlp.semparse.open.model.candidate.CandidateGroup;
import fig.basic.LogInfo;

package edu.stanford.nlp.semparse.open.model.feature;


public abstract class FeaturePostProcessor {

  public abstract void process(Candidate candidate);
  public abstract void process(CandidateGroup group);