Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix import filtered intents not work in luis:cross-train #1232

Merged
merged 14 commits into from
Jun 3, 2021

Conversation

cosmicshuai
Copy link
Contributor

closes: #1210
In this PR, for the test cases of using imported intents User report case will only includes the referenced intents in the generated files.

Here is the new result of Cross-train for that case above:

> LUIS application information
> !# @app.versionId = 0.1
> !# @app.culture = en-us
> !# @app.luis_schema_version = 3.2.0


> # Intent definitions

# InternalIntent
- Intent within application.lu


# ExternalIntentShouldBeIncluded
- Intent which should be included


> # Entity definitions


> # PREBUILT Entity definitions


> # Phrase list definitions


> # List entities

> # RegEx entities

@cosmicshuai cosmicshuai marked this pull request as ready for review May 12, 2021 05:40
Copy link
Member

@munozemilio munozemilio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comment on code optimization


const matchedUtterence = luObj.utterances.find(e => e.intent === intent)
const fileContent = `# ${intent}\r\n${parseUtterancesToLu([matchedUtterence], luObj)}`
let cloned = {...(isAbsolutePath ? importFile : filePathOrFound[0])}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const, also does this need to be a deep clone?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I used a deep clone here is due to I don't want to change the original content of luis and qna files.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a deep clone actually, that was my question. See Typescript playground for explanataion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I just fixed this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bf luis:cross-train not working as expected when using external file references which use intent filter
3 participants