@Override public String toString() { return "ExtendedInfo [nodeInfo=" + InfoGetFields.getLemma(nodeInfo) + "/" + InfoGetFields.getPartOfSpeech(nodeInfo) + ", edgeInfo=" + InfoGetFields.getRelation(edgeInfo) + ", id=" + id + ", additionalNodeInformation=" + additionalNodeInformation + "]"; }
String pos = InfoGetFields.getPartOfSpeech(textNodeToBeSubstituted.getInfo()); String newPos = InfoGetFields.getPartOfSpeech(newNodeInfo);
/** * @return a simple string representing the given info (serial, word, lemma, POS, dependency). * Based on {@link eu.excitementproject.eop.common.representation.parse.tree.AbstractNodeUtils#stringOfNode} */ public static String toString(Info info) { StringBuffer sb = new StringBuffer(); sb.append("["); if (info == null){ sb.append("null"); } else{ NodeInfo nodeInfo = info.getNodeInfo(); if (nodeInfo == null){ sb.append(", "); } else{ sb.append(info.getId()).append(", "); // info.getId() may be different than nodeInfo.getSerial() in case of variable substitutions! sb.append(InfoGetFields.getWord(info)).append(", "); sb.append(InfoGetFields.getLemma(info)).append(", "); sb.append(InfoGetFields.getPartOfSpeech(info)).append(", "); sb.append(InfoGetFields.getNamedEntityAnnotation(info)).append(", "); } sb.append(InfoGetFields.getRelation(info)); } sb.append("]"); return sb.toString(); }
String pos = InfoGetFields.getPartOfSpeech(textNodeToBeSubstituted.getInfo()); String newPos = InfoGetFields.getPartOfSpeech(newNodeInfo);
public String toShortString() { StringBuffer ret = new StringBuffer(); String id = textNodeToBeSubstituted.getInfo().getId(); String lemma = InfoGetFields.getLemma(textNodeToBeSubstituted.getInfo()); String pos = InfoGetFields.getPartOfSpeech(textNodeToBeSubstituted.getInfo()); ret.append(StringUtil.capitalizeFirstLetterOnly(ruleBaseName)); ret.append(" substitute "); ret.append(NodePrintUtilities.nodeDetailsToString(id, lemma, pos)); return ret.toString(); }
@Override public String toShortString() { StringBuffer ret = new StringBuffer(); String id = textNodeToBeSubstituted.getInfo().getId(); String lemma = InfoGetFields.getLemma(textNodeToBeSubstituted.getInfo()); String pos = InfoGetFields.getPartOfSpeech(textNodeToBeSubstituted.getInfo()); // String newLemma = InfoGetFields.getLemma(newNodeInfo); // String newPos = InfoGetFields.getPartOfSpeech(newNodeInfo); if (this.specificationName!=null) { ret.append(this.specificationName).append(" "); } else { ret.append("Substitute "); } ret.append(NodePrintUtilities.nodeDetailsToString(id, lemma, pos)); // ret.append(id); // ret.append(", \""); // ret.append(lemma); // ret.append("\", "); // ret.append(pos); // ret.append('>'); return ret.toString(); }
@Override public String toShortString() { StringBuffer sb = new StringBuffer(); sb.append("Insert "); sb.append(NodePrintUtilities.nodeDetailsToString( hypothesisNodeToInsert.getInfo().getId(), InfoGetFields.getLemma(hypothesisNodeToInsert.getInfo()), InfoGetFields.getPartOfSpeech(hypothesisNodeToInsert.getInfo()), InfoGetFields.getRelation(hypothesisNodeToInsert.getInfo()))); return sb.toString(); }
@Override public StringBuffer specString() { StringBuffer sb = new StringBuffer(); if (source!=null) { sb.append(source); sb.append(": replace"); } else sb.append("Replace"); sb.append(" subtree of "); sb.append(NodePrintUtilities.nodeDetailsToString( subtreeToRemove.getInfo().getId(), InfoGetFields.getLemma(subtreeToRemove.getInfo()), InfoGetFields.getPartOfSpeech(subtreeToRemove.getInfo()))); sb.append(" with subtree of "); sb.append(NodePrintUtilities.nodeDetailsToString( subtreeToAdd.getInfo().getId(), InfoGetFields.getLemma(subtreeToAdd.getInfo()), InfoGetFields.getPartOfSpeech(subtreeToAdd.getInfo()))); return sb; }
hypothesisNodeToInsert.getInfo().getId(), InfoGetFields.getLemma(hypothesisNodeToInsert.getInfo()), InfoGetFields.getPartOfSpeech(hypothesisNodeToInsert.getInfo()), InfoGetFields.getRelation(hypothesisNodeToInsert.getInfo()))); sb.append(" under "); textNodeToBeParent.getInfo().getId(), InfoGetFields.getLemma(textNodeToBeParent.getInfo()), InfoGetFields.getPartOfSpeech(textNodeToBeParent.getInfo())));
String id = (missingHypothesisNode.getInfo() != null && missingHypothesisNode.getInfo().getId() != null) ? missingHypothesisNode.getInfo().getId() : "unknown id"; String lemma = InfoGetFields.getLemma(missingHypothesisNode.getInfo()); String pos = InfoGetFields.getPartOfSpeech(missingHypothesisNode.getInfo()); String relation = InfoGetFields.getRelation(missingHypothesisNode.getInfo()); String missingHypoNodeString = StringUtil.escapeHTML(NodePrintUtilities.nodeDetailsToString(id, lemma, pos)); String parentPos = InfoGetFields.getPartOfSpeech(parent.getInfo()); parentString = StringUtil.escapeHTML(NodePrintUtilities.nodeDetailsToString(parentId, parentLemma, parentPos));
if (antecedent==null)throw new ParserRunException("Antecedent not found for node: "+counterString+".\nParser output was:\n"+listStringToString(parserOutput)+rawTextForExceptionString); serial = antecedent.getInfo().getNodeInfo().getSerial(); pos = InfoGetFields.getPartOfSpeech(antecedent.getInfo());
String pos = InfoGetFields.getPartOfSpeech(node.getInfo()); String idOfContentAncestor = null; ExtendedInfo contentAncestor = node.getInfo().getAdditionalNodeInformation().getContentAncestor();
if (InfoGetFields.getPartOfSpeech(ret.getInfo()).equals(PREP_POS)) childRelation = DEFAULT_RELATION_TO_PREP; else
if (InfoGetFields.getPartOfSpeech(ret.getInfo()).equals(PREP_POS)) childRelation = DEFAULT_RELATION_TO_PREP; else
String pos = InfoGetFields.getPartOfSpeech(node.getInfo()); String relation = InfoGetFields.getRelation(node.getInfo()); String corefGroupId = ExtendedInfoGetFields.getCorefGroupId(node.getInfo());
String pos = InfoGetFields.getPartOfSpeech(node.getInfo()); String idOfContentAncestor = ""; ExtendedInfo contentAncestor = node.getInfo().getAdditionalNodeInformation().getContentAncestor();
String pos = InfoGetFields.getPartOfSpeech(node.getInfo()); String corefGroupId = ExtendedInfoGetFields.getCorefGroupId(node.getInfo());
String pos = InfoGetFields.getPartOfSpeech(node.getInfo()); String corefGroupId = ExtendedInfoGetFields.getCorefGroupId(node.getInfo());