Skip to content

Fix builder formula error and improve coverage - #891

Merged
lukhnos merged 1 commit into
openvanilla:masterfrom
lukhnos:fix-formula
Aug 6, 2026
Merged

Fix builder formula error and improve coverage#891
lukhnos merged 1 commit into
openvanilla:masterfrom
lukhnos:fix-formula

Conversation

@lukhnos

@lukhnos lukhnos commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Also reduce the entries in Postprocess.txt after the fix.

Fixes #889

@ChiahongHong PTAL.

Also reduce the entries in Postprocess.txt after the fix.

Fixes openvanilla#889
@zonble

zonble commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

LGTM

@lukhnos
lukhnos merged commit a9b13e6 into openvanilla:master Aug 6, 2026
7 checks passed
print("({})".format(e))
for k in phrases:
if phrases[k] < 1:
handle.write('%s %.8f\n' % (k, math.log(fscale ** (len(k) / 3 - 1) * 0.5 / norm, 10)))

@ChiahongHong ChiahongHong Aug 6, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

因為這幾天有點忙,我其實也做一些額外的檢查但還沒做完,所以才沒回覆您在 #889 提到的 make analyze

我的筆電不在身邊沒辦法驗證,用手機很難操作 GitHub 所以我先留個言。您提到的 6% (或是筆數,我記得我的結果是 8 千多筆)印象中跟我前天跑的不太一樣,主因是這兩處可能也要改

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

感恩。發了 #891 ,不過 make analyze 的結果沒有變(一樣是 14,209 條被覆蓋的詞)。這要麻煩你有空的時候再驗證看看了。

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

抱歉 6% 跟 8 千多筆是我記錯了,因為我認為統計方式需要調整,所以忘記我改過 find_cover_issues.py ,自然結果數值不同。現在我的計算方式統計出來的值又有不同,已經更新在 #889,之後要找比較好找。

if phrases[k] < 1:
handle.write('%s %.8f\n' % (k, math.log(fscale ** (len(k) / 3 - 1) * 0.5 / norm, 10)))
else:
handle.write('%s %.8f\n' % (k, math.log(fscale ** (len(k) / 3 - 1) * phrases[k] / norm, 10)))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

還有這行,再麻煩您看一下~

zonble pushed a commit that referenced this pull request Aug 8, 2026
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.

[詞庫問題回報] Python 3 造成的詞庫詞頻計算錯誤

3 participants