@Override public boolean match(T node) { return !p.match(node); }
if (node != null && pattern.match(node)) {
@Override public boolean match(T node) { boolean matched = false; for (NodePattern<T> p:nodePatterns) { if (p.match(node)) { matched = true; break; } } return matched; }
/** * Returns result associated with the match * @param node node to match * @return null if not matched, TRUE if there is a match but no other result associated with the match. * Any other value is treated as the result value of the match. */ public Object matchWithResult(T node) { if (match(node)) return Boolean.TRUE; else return null; }
@Override public boolean match(T node) { boolean matched = true; for (NodePattern<T> p:nodePatterns) { if (!p.match(node)) { matched = false; break; } } return matched; }
@Override public boolean match(M token) { boolean matched = true; for (Pair<K,NodePattern> entry:annotationPatterns) { NodePattern annoPattern = entry.second; Object anno = getter.apply(token, entry.first); if (!annoPattern.match(anno)) { matched = false; break; } } return matched; }
protected Collection<Interval<Integer>> match(List<? extends CoreMap> nodes, int start) { List<Interval<Integer>> matched = new ArrayList<>(); int minEnd = start + minNodes; int maxEnd = nodes.size(); if (maxNodes >= 0 && maxNodes + start < nodes.size()) { maxEnd = maxNodes + start; } for (int end = minEnd; end <= maxEnd; end++) { CoreMap chunk = ChunkAnnotationUtils.getMergedChunk(nodes, start, end, aggregators, null); if (nodePattern.match(chunk)) { matched.add(Interval.toInterval(start, end)); } } return matched; }
@Override public boolean match(T node) { boolean matched = false; for (NodePattern<T> p:nodePatterns) { if (p.match(node)) { matched = true; break; } } return matched; }
protected boolean match(T node) { boolean matched = false; for (NodePattern<T> p:nodePatterns) { if (p.match(node)) { matched = true; break; } } return matched; } }
@Override public boolean match(T node) { boolean matched = true; for (NodePattern<T> p:nodePatterns) { if (!p.match(node)) { matched = false; break; } } return matched; }
@Override public boolean match(T node) { return !p.match(node); }
/** * Returns result associated with the match * @param node node to match * @return null if not matched, TRUE if there is a match but no other result associated with the match. * Any other value is treated as the result value of the match. */ public Object matchWithResult(T node) { if (match(node)) return Boolean.TRUE; else return null; }
public boolean match(T node) { boolean matched = false; for (NodePattern<T> p:nodePatterns) { if (p.match(node)) { matched = true; break; } } return matched; }
@Override public boolean match(T node) { return !p.match(node); }
@Override public boolean match(T node) { boolean matched = false; for (NodePattern<T> p:nodePatterns) { if (p.match(node)) { matched = true; break; } } return matched; }
@Override public boolean match(T node) { boolean matched = true; for (NodePattern<T> p:nodePatterns) { if (!p.match(node)) { matched = false; break; } } return matched; }
/** * Returns result associated with the match * @param node node to match * @return null if not matched, TRUE if there is a match but no other result associated with the match. * Any other value is treated as the result value of the match. */ public Object matchWithResult(T node) { if (match(node)) return Boolean.TRUE; else return null; }
protected boolean match(T node) { return !p.match(node); } }
/** * Returns result associated with the match * @param node node to match * @return null if not matched, TRUE if there is a match but no other result associated with the match. * Any other value is treated as the result value of the match. */ public Object matchWithResult(T node) { if (match(node)) return Boolean.TRUE; else return null; }
protected boolean match(CoreMap token) { boolean matched = true; for (Map.Entry<Class,NodePattern> entry:annotationPatterns.entrySet()) { NodePattern annoPattern = entry.getValue(); Object anno = token.get(entry.getKey()); if (!annoPattern.match(anno)) { matched = false; break; } } return matched; }