Skip to content

Commit 3ab7f30

Browse files
committed
Fixed another schme issue with LUIS. They stopped returning resolution_type for the pre-built datetime entity
1 parent eaffd14 commit 3ab7f30

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

Node/lib/dialogs/EntityRecognizer.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
"use strict";
21
var utils = require('../utils');
32
var chrono = require('chrono-node');
43
var EntityRecognizer = (function () {
@@ -35,7 +34,7 @@ var EntityRecognizer = (function () {
3534
var time;
3635
entities.forEach(function (entity) {
3736
if (entity.resolution) {
38-
switch (entity.resolution.resolution_type) {
37+
switch (entity.resolution.resolution_type || entity.type) {
3938
case 'builtin.datetime.date':
4039
case 'builtin.datetime.time':
4140
var parts = (entity.resolution.date || entity.resolution.time).split('T');
@@ -198,5 +197,5 @@ var EntityRecognizer = (function () {
198197
EntityRecognizer.noExp = /^(0|n|no|nope|not|false)\z/i;
199198
EntityRecognizer.numberExp = /[+-]?(?:\d+\.?\d*|\d*\.?\d+)/;
200199
return EntityRecognizer;
201-
}());
200+
})();
202201
exports.EntityRecognizer = EntityRecognizer;

Node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "botbuilder",
33
"author": "Microsoft Corp.",
44
"description": "Bot Builder is a dialog system for building rich bots on virtually any platform.",
5-
"version": "0.6.3",
5+
"version": "0.6.4",
66
"license": "MIT",
77
"keywords": [
88
"bots",

Node/src/dialogs/EntityRecognizer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export class EntityRecognizer {
101101
var time: string;
102102
entities.forEach((entity: ILuisDateTimeEntity) => {
103103
if (entity.resolution) {
104-
switch (entity.resolution.resolution_type) {
104+
switch (entity.resolution.resolution_type || entity.type) {
105105
case 'builtin.datetime.date':
106106
case 'builtin.datetime.time':
107107
var parts = (entity.resolution.date || entity.resolution.time).split('T');

0 commit comments

Comments
 (0)