NODE feat operand value qfalse
Where feat
is an string that represents a feature to pass to the findFeature
method of an item.
The value
represents the value to be compared against the feature obtained from the item via the feat
string. The operand
is the operation to do the comparison. The available operands are as follows:
[[[TODO: provide support for the IN operator.]]]
For < and >, this CART coerces the value and feature to float's. For =, this CART coerces the value and feature to string and checks for string equality. For MATCHES, this CART uses the value as a regular expression and compares the obtained feature to that.
A CART is represented by an array in this implementation. The qfalse
value represents the index of the array to go to if the comparison does not match. In this implementation, qtrue index is always implied, and represents the next element in the array. The root node of the CART is the first element in the array.
The interpretations always start at the root node of the CART and continue until a final node is found. The final nodes have the following form:
LEAF value
Where value
represents the value of the node. Reaching a final node indicates the interpretation is over and the value of the node is the interpretation result.
|
|
|
|