EntityAssignmentComparer class
Compare two entity assignments to determine their relative priority.
Remarks
Compare by event: assignEntity, chooseProperty, chooseEntity Then by operations in order from schema (usually within assignEntity). Then by unexpected before expected. Then by oldest turn first. Then by minimum position in utterance.
Constructors
Entity |
Initializes a new instance of the EntityAssignmentComparer class. |
Methods
compare(Partial<Entity |
Compares EntityAssignment x against y to determine its relative priority. |
Constructor Details
EntityAssignmentComparer(string[])
Initializes a new instance of the EntityAssignmentComparer class.
new EntityAssignmentComparer(operationPreference: string[])
Parameters
- operationPreference
-
string[]
Preference on operations.
Method Details
compare(Partial<EntityAssignment>, Partial<EntityAssignment>)
Compares EntityAssignment x against y to determine its relative priority.
function compare(x: Partial<EntityAssignment>, y: Partial<EntityAssignment>): number
Parameters
- x
-
Partial<EntityAssignment>
First entity assigment to compare.
- y
-
Partial<EntityAssignment>
Second entity assigment to compare.
Returns
number
Numerical value representing x's relative priority.