-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Rust: Add Comprehend Getting Started scenario using Code Loom #7553
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
base: main
Are you sure you want to change the base?
Conversation
|
||
#[derive(Debug, Parser)] | ||
struct Opt { | ||
/// The text to analyze for entities. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meh - these comments sorta suck
.send() | ||
.await?; | ||
|
||
println!("Detected entities:"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine for an example
assert!(result.is_ok(), "Comprehend scenario should complete successfully: {:?}", result); | ||
} | ||
|
||
#[tokio::test] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are full integration tests, I'm not sure if I support this. Since they require network access.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have settled on having full integration tests for our examples as a cross-language standard, so this existing does fit the requirements.
} | ||
|
||
let primary_language = &languages[0]; | ||
let language_code = primary_language.language_code().unwrap_or("en"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is a correct unwrap
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.