diff --git a/lib/dataset-tools/augmentation/replace_parameters.ts b/lib/dataset-tools/augmentation/replace_parameters.ts index 7f1cffdc8..01af55a74 100644 --- a/lib/dataset-tools/augmentation/replace_parameters.ts +++ b/lib/dataset-tools/augmentation/replace_parameters.ts @@ -689,14 +689,25 @@ export default class ParameterReplacer { let valueListKey = await this._getParamListKey(slot, arg); const fallbackKey = this._getFallbackParamListKey(slot); - if (valueListKey[0] === 'string' && valueListKey[1] !== fallbackKey && - coin(this._untypedStringProbability, this._rng)) - valueListKey = ['string', fallbackKey]; + if (valueListKey[0] === 'string') { + if (valueListKey[1] === fallbackKey) { + const isExplicit = arg ? !!arg.getImplementationAnnotation('string_values') : false; + if (!isExplicit) { + this._warn('default-free-text:' + slot.tag + ':' + slot.type, + `Using default value of ${valueListKey[0]} ${valueListKey[1]} for ${slot.tag}:${slot.type}`); + } + } else { + if (coin(this._untypedStringProbability, this._rng)) + valueListKey = ['string', fallbackKey]; + } + } let valueList = await this._loader.get(valueListKey); if (valueList.size === 0) { - if (this._debug) - this._warn('novalue:' + slot.tag + ':' + slot.type, `Found no values for ${slot.tag}:${slot.type}, falling back to ${fallbackKey}`); + if (this._debug) { + this._warn('novalue:' + slot.tag + ':' + slot.type + ':' + valueListKey[0] + ':' + valueListKey[1], + `Found no values for ${slot.tag}:${slot.type} (searching for ${valueListKey[0]} ${valueListKey[1]}), falling back to ${fallbackKey}`); + } valueList = await this._loader.get(['string', fallbackKey]); if (valueList.size === 0) diff --git a/lib/templates/load-thingpedia.ts b/lib/templates/load-thingpedia.ts index 941a803b8..82a08f502 100644 --- a/lib/templates/load-thingpedia.ts +++ b/lib/templates/load-thingpedia.ts @@ -1504,7 +1504,8 @@ export default class ThingpediaLoader { } for (const entity of entityTypes) { - entity.has_ner_support = !!(entity.type.startsWith('tt:') && entity.has_ner_support); + entity.has_ner_support = !!((entity.type.startsWith('tt:') || entity.type === 'org.freedesktop:app_id') + && entity.has_ner_support); this._loadEntityType(entity.type, entity); } for (const device of devices)