What most people refer to as "projection"
requires "folding". Unfortunately, Notio version 0.2.2 and earlier does not
correctly support folding (it will crash or produce incorrect results).
Therefore, the best you can do is "non-folding projection", which can be
achieved by using the following matching scheme:
MatchingScheme projectionScheme;
projectionScheme = new MatchingScheme(
MatchingScheme.GR_MATCH_SUBGRAPH,
MatchingScheme.CN_MATCH_ALL,
MatchingScheme.RN_MATCH_ALL,
MatchingScheme.CT_MATCH_SUBTYPE,
MatchingScheme.RT_MATCH_SUBTYPE,
MatchingScheme.QF_MATCH_ANYTHING,
MatchingScheme.DG_MATCH_RESTRICTION,
MatchingScheme.MARKER_MATCH_ID,
MatchingScheme.ARC_MATCH_CONCEPT,
MatchingScheme.COREF_AUTOMATCH_OFF,
MatchingScheme.COREF_AGREE_OFF,
MatchingScheme.FOLD_MATCH_OFF,
MatchingScheme.CONN_MATCH_OFF,
0,
null,
null);
Folding refers to the matcher's ability to allow more than one node in Graph
A to be mapped to Graph B, and vice versa. For example:
Graph A:
[Male][Chicken]
Grapb B:
[Rooster]
If folding is not allowed, then the two graphs above cannot be matched,
because there must be a one-to-one mapping between nodes in the two graphs.
However, if folding is allowed, then both [Male] and [Chicken] can be
mapped to [Rooster], and a match is possible.
Folding becomes more complicated than this when individual markers are
introduced since that places constraints on the nodes that may be
folded within a single graph. For example:
Graph C:
[Male #3][Chicken #57]
Grapb D:
[Rooster]
The Male and Chicken nodes have referents that refer to different individual
markers. Under the CG dpAns, different individual markers refer to distinct
entities. This means that the Male and Chicken nodes in Graphs C and D
cannot refer to the same entity, and therefore they cannot both be mapped to
the Rooster node. Either the match must fail or the individual markers
must be updated, depending on the application for which the matching is
used.