KEMBAR78
Implement language detection for notebook cells by JacksonKearl · Pull Request #147537 · microsoft/vscode · GitHub
Skip to content

Conversation

@JacksonKearl
Copy link
Contributor

This PR fixes #147184

@JacksonKearl JacksonKearl self-assigned this Apr 15, 2022
@JacksonKearl JacksonKearl added this to the April 2022 milestone Apr 15, 2022
if (!documentTextSample) { return; }

const neuralResolver = async () => {
if (supportedLangs?.length) { return undefined; /* neural resolver doesnt support language tuning */ }
Copy link
Member

@TylerLeonhardt TylerLeonhardt Apr 19, 2022

Choose a reason for hiding this comment

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

Could you just check if the language in the next line is a supportedLang before pushing to languages & confidence?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense 👍 do the confidences need to be scaled differently?

Copy link
Member

@TylerLeonhardt TylerLeonhardt Apr 19, 2022

Choose a reason for hiding this comment

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

Actually sorry, line 52 ... we only return 1 language.... Can you just return the first language that's in supportedLang? The languages are already sorted by confidence by the detectLanguagesImpl.

Clean up mapping of language id's in neural model
Add config to opt out of language detection hints
@JacksonKearl JacksonKearl merged commit bd95a8d into main Apr 21, 2022
@JacksonKearl JacksonKearl deleted the jackson/notebook-lang-detect branch April 21, 2022 03:38
@github-actions github-actions bot locked and limited conversation to collaborators Jun 5, 2022
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.

Improve automatic language detection in ployglot notebooks

2 participants