Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit b39d7b3

Browse files
committed
Adding Converter to parser index
1 parent 053b221 commit b39d7b3

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

packages/luis/src/parser/converters/lutoluisconverter.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@ const exception = require('./../lufile/classes/exception')
77
const LUISObjNameEnum = require('./../lufile/enums/luisobjenum')
88

99
module.exports = {
10-
parseLuToLuis: async function(files, verbose, luis_culture) {
10+
/**
11+
* Parses a list of luObject into a LUIS JSON
12+
* @param {luObject []} luArray luObject list to be parsed
13+
* @returns {LUIS} Collated LUIS json contents
14+
* @throws {exception} Throws on errors. exception object includes errCode and text.
15+
*/
16+
parseLuToLuis: async function(luArray, verbose, luis_culture, luSearchFn) {
1117
try {
1218
// Extract all lu files and merge all into and object
13-
let allParsedContent = await lu.mergeAndResolveReferences(files, verbose, luis_culture)
19+
let allParsedContent = await lu.mergeAndResolveReferences(luArray, verbose, luis_culture, luSearchFn)
1420
// pass only files that need to be collated.
1521
let finalLUISJSON = await this.collateLUISFiles(allParsedContent.LUISContent.filter(item => item.includeInCollate))
1622
if (haveLUISContent(finalLUISJSON)) {

packages/luis/src/parser/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*/
55
const modules = {
66
parser: {
7+
parseLuList: require('./converters/lutoluisconverter').parseLuToLuis,
78
parseFile: require('./lufile/parseFileContents').parseFile,
89
validateLUISBlob: require('./luisfile/parseLuisFile').validateLUISBlob
910
},

0 commit comments

Comments
 (0)