Skip to content

Commit

Permalink
fix(nlu): ambiguous flag only when multiple intents
Browse files Browse the repository at this point in the history
  • Loading branch information
slvnperron committed Jul 1, 2019
1 parent ca4515e commit 1eea4a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/nlu/src/backend/engine.ts
Expand Up @@ -387,7 +387,7 @@ export default class ScopedEngine implements Engine {
const lower = perfectConfusion - AMBIGUITY_RANGE
const upper = perfectConfusion + AMBIGUITY_RANGE

ds.ambiguous = allInRange(ds.intents.map(i => i.confidence), lower, upper)
ds.ambiguous = ds.intents.length > 1 && allInRange(ds.intents.map(i => i.confidence), lower, upper)

return Promise.resolve(ds)
}
Expand Down

0 comments on commit 1eea4a3

Please sign in to comment.