public PrioSetMember addPrioSetMember( SymbolTable table, ColumnDescription column, int symbolCode, RelationToPrevMember relationToPrevMember) throws MaltChainedException { cache.setTable(table); cache.setSymbolCode(symbolCode); if (!contains(cache)) { PrioSetMember newItem = new PrioSetMember(this, table, column, symbolCode, relationToPrevMember); add(newItem); return newItem; } return cache; }
private boolean matchHeadChild(PhraseStructureNode child, PrioSetMember member) throws MaltChainedException { if (child instanceof NonTerminalNode && member.getTable().getName().equals("CAT") && member.getSymbolCode() == child.getLabelCode(member.getTable())) { return true; } else if (member.getTable().getName().equals("LABEL") && member.getSymbolCode() == child.getParentEdgeLabelCode(member.getTable())) { return true; } else if (child instanceof TokenNode && member.getColumn().getCategory() == ColumnDescription.INPUT && member.getSymbolCode() == child.getLabelCode(member.getTable())) { return true; } return false; }