public class Diff extends Object
SDocumentGraph objects for isomorphie. It
uses characteristics of document graphs to use a more specific algorithm for
checking whether a graph is isomorphic. At first tokens are compared. Both
graphs are compared starting with offset "0". Two tokens are the same, when
their textual offset and the overlapped text is the same. As with all
following SNodes, SAnnotations and SFeatures are
checked. The next step is to look for SNodes that are the source of a
incoming relations of a SToken. Of these only those are picked, that
have SNodes on their outgoing relations, that already have been
checked (at this point: only STokens). These SNodes are then
compared with each other. Whenever a relation is used in the way described
above, the SRelation is checked for SFeatures and
SRelations.
To adapt the isomorphie check and the computation of differences you can pass
an option map via Diff(SDocumentGraph, SDocumentGraph, Map).
Possible options are:
#OPTION_CHECK_ANNOTATION - When true, even all annotations of
nodes and relations are used for isomorphie check and difference computation.
#OPTION_CHECK_ANNOTATION_DIFF - ???#OPTION_CHECK_ID - When true identifiers needs to be the same in
isomorphie check and difference computation.| Modifier and Type | Class and Description |
|---|---|
static class |
Diff.Builder<S>
A fluent builder for comparing two
SDocumentGraph or
SCorpusGraph objects. |
| Constructor and Description |
|---|
Diff(SaltProject template,
SaltProject other,
DiffOptions optionMap) |
Diff(SCorpusGraph template,
SCorpusGraph other)
Initializes Diff object with the two graphs
template and
other. |
Diff(SCorpusGraph template,
SCorpusGraph other,
DiffOptions optionMap) |
Diff(SCorpusGraph template,
SCorpusGraph other,
Map<String,Boolean> optionMap)
Deprecated.
use
Diff(SCorpusGraph, SCorpusGraph, DiffOptions)
instead |
Diff(SDocumentGraph template,
SDocumentGraph other)
Initializes Diff object with the two graphs
template and
other. |
Diff(SDocumentGraph template,
SDocumentGraph other,
DiffOptions optionMap) |
Diff(SDocumentGraph template,
SDocumentGraph other,
Map<String,Boolean> optionMap)
Deprecated.
use {@link #Diff(SDocumentGraph, SDocumentGraph, DiffOptions)
instead
|
| Modifier and Type | Method and Description |
|---|---|
Set<Difference> |
findDiffs()
Compares the set graphs and returns if they are isomorphic or not.
|
boolean |
isIsomorph()
Compares the set graphs and returns if they are isomorphic or not.
|
public Diff(SDocumentGraph template, SDocumentGraph other)
template and
other.template - other - public Diff(SDocumentGraph template, SDocumentGraph other, DiffOptions optionMap)
@Deprecated public Diff(SDocumentGraph template, SDocumentGraph other, Map<String,Boolean> optionMap)
template - other - optionMap - public Diff(SCorpusGraph template, SCorpusGraph other)
template and
other.template - other - public Diff(SCorpusGraph template, SCorpusGraph other, DiffOptions optionMap)
public Diff(SaltProject template, SaltProject other, DiffOptions optionMap)
@Deprecated public Diff(SCorpusGraph template, SCorpusGraph other, Map<String,Boolean> optionMap)
Diff(SCorpusGraph, SCorpusGraph, DiffOptions)
insteadtemplate - other - optionMap - public boolean isIsomorph()
findDiffs().public Set<Difference> findDiffs()
isIsomorph().Copyright © 2009–2020 Humboldt-Universität zu Berlin, INRIA. All rights reserved.