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

fix: heuristic matching for "びしょ濡れのしずくちゃん" #1370

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

bdunderscore
Copy link
Owner

No description provided.

@bdunderscore
Copy link
Owner Author

@Sayamame-beans 一部ユニットテストの意図が分からなかったものもあるので確認お願いします 🙏

Copy link
Contributor

@Sayamame-beans Sayamame-beans left a comment

Choose a reason for hiding this comment

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

処理内容未確認です
とりあえず元の意図の思い出しをしました

@@ -17,7 +17,7 @@ public void TestNoPrefixSuffix()

var outfit = CreateChild(root, "Outfit");
var outfit_armature = CreateChild(outfit, "armature");
var outfit_hips = CreateChild(outfit_armature, "hips");
var outfit_hips = CreateChild(outfit_armature, "hip");
Copy link
Contributor

Choose a reason for hiding this comment

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

元の意図: アバターがhipで衣装がhipsでもsuffixは空であることの確認

Copy link
Contributor

Choose a reason for hiding this comment

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

変更されているようにhip同士でも十分そう
(TestDifferentHipsNameにおける"pre_hips.suf"があれば十分そう)

@@ -42,21 +42,33 @@ public void TestDifferentHipsName()

var outfit = CreateChild(root, "Outfit");
var outfit_armature = CreateChild(outfit, "armature");
var outfit_hips = CreateChild(outfit_armature, "pre_Hips.suf");
var outfit_hips = CreateChild(outfit_armature, "pre_hips.suf");
Copy link
Contributor

Choose a reason for hiding this comment

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

元の意図: ケース違いでの対応チェック(ケース違いにする必要なさそうかも)

@@ -101,8 +115,38 @@ public void TestSameHipsName_Fail()

outfit_mama.InferPrefixSuffix();

// Current(v1.10.x) InferPrefixSuffix fail to infer prefix/suffix when avatar has unique prefix/suffix and outfit has their name
Copy link
Contributor

Choose a reason for hiding this comment

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

元の意図: 完全一致の優先度が低かったため、hipsとしての認識が優先されていた(多分そう)

Copy link
Owner Author

Choose a reason for hiding this comment

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

このテストの求めていた仕様は・・・?

Copy link
Contributor

Choose a reason for hiding this comment

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

bd_さんがされてるように一致することが理想的で、しかしあの段階では無理であったので、無理であることの確認が入ってました

Copy link
Contributor

Choose a reason for hiding this comment

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

今回の変更により問題なくなった(推定出来るようになった)
👍

Copy link
Contributor

@Sayamame-beans Sayamame-beans left a comment

Choose a reason for hiding this comment

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

修正ありがとうございます!!

Copy link
Contributor

Choose a reason for hiding this comment

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

確認: 旧手法(アバター側ボーン名との一致確認)をやり、その後に新手法(辞書確認)をやり、ボーン全体での一致数を見た際に後者が前者の2倍以上一致しているなら後者を採用、それ以外は前者
特に恩恵を受けるのは、normalize処理をしない純粋な一致確認でも十分にprefix/suffixが推定出来る(しずくさんとその対応衣装のような)ケース

良さそうですね…?

@@ -17,7 +17,7 @@ public void TestNoPrefixSuffix()

var outfit = CreateChild(root, "Outfit");
var outfit_armature = CreateChild(outfit, "armature");
var outfit_hips = CreateChild(outfit_armature, "hips");
var outfit_hips = CreateChild(outfit_armature, "hip");
Copy link
Contributor

Choose a reason for hiding this comment

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

変更されているようにhip同士でも十分そう
(TestDifferentHipsNameにおける"pre_hips.suf"があれば十分そう)

@@ -101,8 +115,38 @@ public void TestSameHipsName_Fail()

outfit_mama.InferPrefixSuffix();

// Current(v1.10.x) InferPrefixSuffix fail to infer prefix/suffix when avatar has unique prefix/suffix and outfit has their name
Copy link
Contributor

Choose a reason for hiding this comment

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

今回の変更により問題なくなった(推定出来るようになった)
👍

}

[Test]
public void TestSpuriousMatch()
Copy link
Contributor

Choose a reason for hiding this comment

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

よさそうです👍

@bdunderscore bdunderscore merged commit 80d17f8 into main Nov 26, 2024
5 checks passed
@bdunderscore bdunderscore deleted the shizuku branch November 26, 2024 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants