Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

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

Merged
munozemilio merged 14 commits intomainmicrosoft/botframework-cli:mainfrom
shuwan/fixFilterIntentmicrosoft/botframework-cli:shuwan/fixFilterIntentCopy head branch name to clipboard
Jun 3, 2021
Merged

fix import filtered intents not work in luis:cross-train#1232
munozemilio merged 14 commits intomainmicrosoft/botframework-cli:mainfrom
shuwan/fixFilterIntentmicrosoft/botframework-cli:shuwan/fixFilterIntentCopy head branch name to clipboard

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
@cosmicshuai cosmicshuai requested a review from munozemilio as a code owner May 12, 2021 05:40
Copy link
Contributor

@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

@cosmicshuai cosmicshuai requested a review from munozemilio May 19, 2021 07:31
packages/lu/src/parser/cross-train/test.js Outdated Show resolved Hide resolved
packages/lu/src/parser/cross-train/test.js Outdated Show resolved Hide resolved
packages/lu/src/parser/cross-train/cross-train.js Outdated Show resolved Hide resolved

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.

packages/lu/src/parser/cross-train/cross-train.js Outdated Show resolved Hide resolved
packages/lu/src/parser/cross-train/cross-train.js Outdated Show resolved Hide resolved
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.