-
Notifications
You must be signed in to change notification settings - Fork 207
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
整理: docstring追加 #817
整理: docstring追加 #817
Conversation
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.
ちょっといろいろコメントしてしまったのですが、だいぶ多いのとあまり大事じゃないとこな気がするのでこっちで変更させていただこうと思います!
結構独自の言い回しをされていて、意味が分かる人には伝わるけど、分からない人が見ると誤解されそうだなと感じました。
もうちょっと正確さに倒すと良い塩梅になるかなと・・・!
phoneme_length_list[0] = audio_query.prePhonemeLength | ||
phoneme_length_list[-1] = audio_query.postPhonemeLength | ||
|
||
# Expects: speedScale適用 |
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.
表記が特殊だな~と感じました。
コメントを素直に受け取ると「expectとする値はspeedScale適用」で、言いたいことは「expectとする値にspeedScale適用」だと思うので、コメントが不正確かもです。
for i, phrase in enumerate(accent_phrases): | ||
for j, mora in enumerate(phrase.moras): | ||
# Rule3: "カナの手前に`_`を入れるとそのカナは無声化される" |
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.
# Rule3: "カナの手前に`_`を入れるとそのカナは無声化される" | |
# 無声化 |
if j + 1 == phrase.accent: | ||
text += _ACCENT_SYMBOL | ||
|
||
# Rule5: "アクセント句末に`?`(全角)を入れることにより疑問文の発音ができる" |
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.
# Rule5: "アクセント句末に`?`(全角)を入れることにより疑問文の発音ができる" | |
# `?`で疑問文 |
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.
LGTM!!!
コメント付与ありがとうございます!!
プルリクエストを頂いて、コメントがないと読みづらいところが多々あることに改めて気づきました。
コメントに関するコメントを色々書きましたが、良い感じの場合は見つかればお互い得かなと思いました!
(ちなみにgithubは、閉じられたコメントはaltを押しながらクリックすると全部展開できます)
Reviewありがとうございました!
Lines 59 to 66 in b997385
どの記法ルールがどの実装に対応しているか初見では理解できなかったため、ルールとの対応づけをコメントに示す意図でした。 suggest 頂いたように処理内容を書くことで可読性が向上することには賛成です。 |
(その2)
関数docstringは「呼び出し側から見た関数の機能」を記述するのが一般的かと思います。 コアはエンジン内部詳細であるため、推定や推論がエンジンの責務なのかコアの責務なのかも内部詳細です。 |
なるほどです。ルールから入った人には読みやすいけど、コードから入った人には読みづらくなるので、そこの塩梅かなと。 ファイル冒頭にルールを短文にして転写してRuleを振り、
|
なるほどです! 追記:あ、機械学習のアプリ応用のOSSコードを書いていて思ったのですが、裏で何が行われてるのかとかは全く気にされないです。値を渡したら値が返ってくる普通の関数と変わらない感じかなと。大事なのは重いか重くないか、並列処理は可能なのか、くらい! |
👍
👍 |
👍
本質情報ですね…😂 |
内容
音声合成周りのdocstringの追加
関連 Issue
part of #59