edu.upenn.cis.pdtb.xpath
Class CompareSpanListFunction
java.lang.Object
edu.upenn.cis.pdtb.xpath.CompareSpanListFunction
- All Implemented Interfaces:
- org.jaxen.Function
- public class CompareSpanListFunction
- extends java.lang.Object
- implements org.jaxen.Function
Generic SpanList comparisons. This function has the signature:
boolean comp-splist(string comparisonMethod, node-set setOfL2s, string flags?)
The following are valid comparison methods:
- contains
- is-contained-by
- overlaps
- ranges-contains
- is-ranged-contained-by
- range-identity
- range-crosses
- range-overlaps
- identity
Any subset of the following flags may be used separated by hyphens:
- uc - Union interpretation of context
- uns - Union interpretation of node-set
- ei - Exclude identity
- ec - Exclude containment
- eo - Exclude overlap
- eri - Exclude range identity
- erc - Exclude range containment
- ero - Exclude range overlap
- erx - Exclude range crosses
- esp - Exclude siblings and parents from being compared against each other
- emp - Exclude if the parents of the context and the node-set match
- emcp - Exclude if the parent of the context matches the node in the node-set
- emnsp - Exclude if the context node matches the parent of the node in the node-set
The flags emp, emcp and emnsp exclude cases only if the parent is a relation. While
checking if a parent or parents match: the flags ei, ec, eo, eri, ero and erx are
negated, i.e., the parent matches if there is identity, overlap, range-identity, ranging-over or range-crossing.
The flag uc works as follows: if the context node is a relation, then the corresponding
spanlist is the union of the spanlists of the connective(if any) and it's arguments. If the context node is Arg2 of a relation, then
the spanlist is the union of the connective(if any) and Arg2.
The following query selects relations which
share an argument exactly with another relation:
Shared Argument:
>::*[>::*[is-arg() and
comp-splist('identity',/>>::*[is-arg()])]]
A detailed discussion of this and other examples can be found off the
API Page
- Since:
- 0.2.5
- Version:
- 3 Added several flags, comparison methods and changed range-over to range-contains., 2
- Author:
- nikhild
|
Method Summary |
java.lang.Object |
call(org.jaxen.Context context,
java.util.List args)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompareSpanListFunction
public CompareSpanListFunction()
- Creates a new instance of CompareSpanListFunction
call
public java.lang.Object call(org.jaxen.Context context,
java.util.List args)
throws org.jaxen.FunctionCallException
- Specified by:
call in interface org.jaxen.Function
- Throws:
org.jaxen.FunctionCallException