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

[textanalytics] add :keyword: to docstrings for TextDocumentInput and DetectLanguageInput #16542

Merged
merged 1 commit into from
Feb 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,12 @@ def __repr__(self):
class DetectLanguageInput(LanguageInput):
"""The input document to be analyzed for detecting language.

:keyword str id: Unique, non-empty document identifier.
Copy link
Contributor

Choose a reason for hiding this comment

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

hey @a-noyass thank you so much for doing this PR.

When adding the keyword docstrings, you can remove the ivar ones, so they're not duplicated. Other than that your pr looks great!

Copy link
Contributor

Choose a reason for hiding this comment

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

actually @a-noyass i'm totally wrong, we should keep both. Going to merge your PR when it's green

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@iscai-msft Okay. Thank you!

:keyword str text: The input text to process.
:keyword str country_hint: A country hint to help better detect
the language of the text. Accepts two letter country codes
specified by ISO 3166-1 alpha-2. Defaults to "US". Pass
in the string "none" to not use a country_hint.
:ivar id: Required. Unique, non-empty document identifier.
:vartype id: str
:ivar text: Required. The input text to process.
Expand Down Expand Up @@ -869,7 +875,12 @@ def __repr__(self):
class TextDocumentInput(DictMixin, MultiLanguageInput):
"""The input document to be analyzed by the service.

:ivar id: Required. A unique, non-empty document identifier.
:keyword str id: Unique, non-empty document identifier.
:keyword str text: The input text to process.
:keyword str language: This is the 2 letter ISO 639-1 representation
of a language. For example, use "en" for English; "es" for Spanish etc. If
not set, uses "en" for English as default.
:ivar id: Required. Unique, non-empty document identifier.
:vartype id: str
:ivar text: Required. The input text to process.
:vartype text: str
Expand Down