protected Triple<String[],List<Pair<String,StringFeatureVector>>,List<POSState>> tagMain() { List<Pair<String,StringFeatureVector>> insts = new ArrayList<Pair<String,StringFeatureVector>>(); List<POSState> states = new ArrayList<POSState>(); while (i_input < t_size) tagAux(getLabel(insts, states)); if (states.size() > n_beams - 1) { Collections.sort(states); states = states.subList(0, n_beams - 1); } return new Triple<String[],List<Pair<String,StringFeatureVector>>,List<POSState>>(d_tree.getPOSTags(), insts, states); }
/** Called by {@link AbstractPOSTagger#process(DEPTree)}. */ protected void init(DEPTree tree) { d_tree = tree; t_size = tree.size(); if (i_flag != FLAG_DECODE) { g_tags = tree.getPOSTags(); tree.clearPOSTags(); } EngineProcess.normalizeForms(tree); }
/** Called by {@link CPOSTaggerSB#process(DEPTree)}. */ protected void init(DEPTree tree) { d_tree = tree; t_size = tree.size(); b_first = true; // m_labels = new HashMap<String, Pair<StringPrediction,StringPrediction>>(); if (i_flag != FLAG_DECODE) { g_tags = tree.getPOSTags(); tree.clearPOSTags(); } initAux(); EngineProcess.normalizeForms(tree); }