BraveyJS / Bravey

A simple JavaScript NLP-like library to help you creating your own bot.
https://braveyjs.github.io/
MIT License
78 stars 6 forks source link

Trying to improve sequential.js #25

Closed cheiode9oclock closed 3 years ago

cheiode9oclock commented 3 years ago

In sequential.js , line 134 there's a check for an expand property:

while (intent.entities[entitypos] && entities[intent.entities[entitypos].entity].expand) {

but entities do not have this property, the closest would be FreeTextEntityRecognizer, that has it as a method, not a property:

this.expand = function(match)

This property is checked again in line 182:

if (entities[outentities[i].entity].expand) {

I would like to help in improving sequential.js, but I'm not getting the why of this check, could you shed some light on the use of this property or the meaning of some funcitons?