Open vccortez opened 4 years ago
Any update on this? I am running into the same issue.
Is there any update on this issue? Any ETA on this one at least?
@jesus-seijas-sp - we are blocked by this issue, is there ETA on the the fix for this issue? thanks in advance
Did you have any corrections regarding this?
This is a fallback logic. In fact the second answer do not contain anything which is matched and also no "member" entity was found. Thats why the slot filling logic just uses the full input as "the answer" for the currently expecting slot entry.
One idea could be to allow this behaviour to be configured. Then it would fallback to the same question again.
Describe the bug I added a regex entity to an NlpManager instance and some documents to capture this entity in a sentence. This is working as expected, however, once I add a slot filler (with
manager.slotManager.addSlot
), the process function will take any follow up text as an entity to fill the slot with high accuracy, even if the word (or sentence) has nothing to do with the regex for the entity. I have also tested this with a named entity and the slot filling also ignores the named options.To Reproduce Steps to reproduce the behavior:
const languages = ['en'] const m = new NlpManager({ languages })
m.addNamedEntityText('action', 'kick', languages, ['kick', 'to kick']) m.addNamedEntityText('action', 'ban', languages, ['ban', 'to ban']) m.addRegexEntity('member', languages, /@[0-9]+/g)
m.addDocument('en', 'I want to %action% %member%', 'member.act') m.addDocument('en', 'I wanna %action% %member%', 'member.act') m.addDocument('en', '%action% %member%', 'member.act')
m.addAnswer('en', 'member.act', 'confirm {{action}} on {{member}}?')
m.slotManager.addSlot('member.act', 'member', true, { en: 'who should I {{action}}?', }) m.slotManager.addSlot('member.act', 'action', true, { en: 'what shoud I do to {{member}}?', })
async function main() { await m.train() m.save() console.log('you may type now') const context = new ConversationContext() ri.on('line', async (line) => { if (line == 'quit') process.exit() console.log('> ' + line) try { const response = await m.process(null, line, context) console.log('BOT:', JSON.stringify(response, null, 2)) } catch (err) { console.error(err) process.exit() } }) }
main()
I want to ban someone kick