Class ActivationBasedAnaphorResolution<N,​E,​T,​B,​TB extends B,​S,​I,​QI,​R extends RelatedExpression<N,​T,​B,​TB,​S,​QI,​R>,​A extends ASTBasedAnaphora<N,​E,​T,​B,​TB,​S,​I,​QI,​R,​A>>

java.lang.Object
de.monochromata.anaphors.cog.ActivationBasedAnaphorResolution<N,​E,​T,​B,​TB,​S,​I,​QI,​R,​A>
Type Parameters:
N - The node type in the AST
E - The expression type
T - The type type
B - The binding type
TB - The type binding type
S - The scope type (optional)
I - The type used to represent identifiers
QI - The type used to represent qualified identifiers
R - The sub-type of related expression to use
A - The sub-type of AST-based anaphora to use

public class ActivationBasedAnaphorResolution<N,​E,​T,​B,​TB extends B,​S,​I,​QI,​R extends RelatedExpression<N,​T,​B,​TB,​S,​QI,​R>,​A extends ASTBasedAnaphora<N,​E,​T,​B,​TB,​S,​I,​QI,​R,​A>>
extends Object
Resolve the referents of anaphors based on a cognitive model.
  • Constructor Details

  • Method Details

    • resolveAnaphor

      public List<Resolution<N,​E,​T,​B,​TB,​S,​I,​QI,​R,​A>> resolveAnaphor​(String anaphor, E definiteExpression, S scope, long timestamp, int numberOfChunksToConsider)
      Perform anaphora resolution on the AST implementation configured via the service provider interfaces.

      TODO: Evaluate whether anaphora relations can be transformed into AST-based anaphora relations

      TODO: Provide means to transform these anaphora relations into AST-based anaphora relations by performing complex AST manipulations / refactorings like introducing parameters to multiple methods ...

      1. Find ways to create Anaphora relations
      2. This might include a preparation step that performs complex AST transformations that prepare the referentialization of the anaphor
      Parameters:
      anaphor - The anaphor that is to be (re-)resolved.
      definiteExpression - The expression that may function as anaphor in the anaphora relation to be generated by this method. If the anaphora relation is to be re-resolved, this can be a non-trivial expression. If the anaphora relation is to be resolved for the first time, this is typically a simple name and might as well be called a definite expression at this point.
      scope - May be null if not required by the AST implementation configured via the service provider interfaces.
      timestamp - the point in time at which the memory access occurs (in the format returned by System.currentTimeMillis()
      numberOfChunksToConsider - The maximum number of chunks to consider as potential related expressions.
      Returns:
      TODO: Rework: A list of anaphors that the given definite expression can function as. The list is empty is the anaphor could not be resolved and will contain more than one element if the anaphor is ambiguous.
    • resolve

      protected Stream<Resolution<N,​E,​T,​B,​TB,​S,​I,​QI,​R,​A>> resolve​(Chunk<N> chunk, String anaphor, E definiteExpression, S scope)
    • createResolution

      protected Resolution<N,​E,​T,​B,​TB,​S,​I,​QI,​R,​A> createResolution​(CheckResult<N,​E,​S> checkResult, PreparatoryTransformation<N,​E,​T,​B,​TB,​S,​I,​QI,​R,​A> preparatoryTransformation, A preliminaryAnaphora)