Class ContextGenerator

Constructor for a simple context generator with the given radius. Node locations are resolved using nodeindex (typically an instance of tree.DocumentOrderIndex) and values are mapped using the valindex.

Constructor

class ContextGenerator(radius, nodeindex, valindex)
Arguments:
  • radius
  • nodeindex
  • valindex

Methods

tail

ContextGenerator#tail(anchor, length, depth)
Arguments:
  • anchor – The tree.Anchor specifying the first node after head.
  • length – The number of siblings affected by the operation.
  • depth
    Wether the operation affects subtrees (true) or only
    one node (false).

Return the values for the tail context starting with the given node.

Table Of Contents

Previous topic

Class Detacher

Next topic

Context Matcher