public static String getPOS(TextAnnotation ta, int tokenId) { return ((TokenLabelView) (ta.getView(ViewNames.POS))).getLabel(tokenId); } }
public static String getPOS(TextAnnotation ta, int tokenId) { return ((TokenLabelView) (ta.getView(ViewNames.POS))).getLabel(tokenId); } }
private static String getTokenLabel(TextAnnotation ta, int tokenId, String viewName) { return ((TokenLabelView) (ta.getView(viewName))).getLabel(tokenId); }
private String getPOS(TextAnnotation ta, int token) { return ((TokenLabelView) ta.getView(ViewNames.POS)).getLabel(token); }
private static String getTokenLabel(TextAnnotation ta, int tokenId, String viewName) { return ((TokenLabelView) (ta.getView(viewName))).getLabel(tokenId); }
private String getPOS(TextAnnotation ta, int token) { return ((TokenLabelView) ta.getView(ViewNames.POS)).getLabel(token); }
@Override public String toString() { StringBuilder sb = new StringBuilder(); for (int i = 0; i < this.textAnnotation.size(); i++) { String label = this.getLabel(i); if (label.length() == 0) sb.append(this.getTextAnnotation().getToken(i)).append(" "); else sb.append("(").append(this.getLabel(i)).append(" ") .append(this.textAnnotation.getToken(i)).append(") "); } return sb.toString(); } }
@Override public String toString() { StringBuilder sb = new StringBuilder(); for (int i = 0; i < this.textAnnotation.size(); i++) { String label = this.getLabel(i); if (label.length() == 0) sb.append(this.getTextAnnotation().getToken(i)).append(" "); else sb.append("(").append(this.getLabel(i)).append(" ") .append(this.textAnnotation.getToken(i)).append(") "); } return sb.toString(); } }
public String getPOSToLeft(int distance) { TokenLabelView posView; if (GOLD) posView = (TokenLabelView) s.goldTa.getView(ViewNames.POS); else posView = (TokenLabelView) s.ta.getView(ViewNames.POS); String pos = posView.getLabel(commaPosition - distance); if (pos.equals("DT") && distance == 1 && getWordToRight(distance).equalsIgnoreCase("the")) return "DT-the"; else return pos; }
public String getPOSToRight(int distance) { TokenLabelView posView; if (GOLD) posView = (TokenLabelView) s.goldTa.getView(ViewNames.POS); else posView = (TokenLabelView) s.ta.getView(ViewNames.POS); String pos = posView.getLabel(commaPosition + distance); if (pos.equals("DT") && distance == 1 && getWordToRight(distance).equalsIgnoreCase("the")) return "DT-the"; else return pos; }
public String getPOSToLeft(int distance) { TokenLabelView posView; if (GOLD) posView = (TokenLabelView) s.goldTa.getView(ViewNames.POS); else posView = (TokenLabelView) s.ta.getView(ViewNames.POS); String pos = posView.getLabel(commaPosition - distance); if (pos.equals("DT") && distance == 1 && getWordToRight(distance).equalsIgnoreCase("the")) return "DT-the"; else return pos; }
public String getPOSToRight(int distance) { TokenLabelView posView; if (GOLD) posView = (TokenLabelView) s.goldTa.getView(ViewNames.POS); else posView = (TokenLabelView) s.ta.getView(ViewNames.POS); String pos = posView.getLabel(commaPosition + distance); if (pos.equals("DT") && distance == 1 && getWordToRight(distance).equalsIgnoreCase("the")) return "DT-the"; else return pos; }
String tag = POSView.getLabel(i); features.add(new DiscreteFeature(classifier + ":" + tag + "_" + form));
String tag = POSView.getLabel(i); features.add(new DiscreteFeature(classifier + ":" + tag + "_" + form));
String tag = POSView.getLabel(i); features.add(new DiscreteFeature(classifier + ":" + tag + "_" + form));
String tag = POSView.getLabel(i); features.add(new DiscreteFeature(classifier + ":" + tag + "_" + form));
String tag = POSView.getLabel(i); features.add(new DiscreteFeature(classifier + ":" + tag + "_" + form));
String tag = POSView.getLabel(i); features.add(new DiscreteFeature(classifier + ":" + tag + "_" + form));
String tag = POSView.getLabel(i); features.add(new DiscreteFeature(classifier + ":" + tag + "_" + form));
String tag = POSView.getLabel(i); features.add(new DiscreteFeature(classifier + ":" + tag + "_" + form));