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

New enwiki feature: total length of paragraphs without references #59

Merged
merged 1 commit into from
Jan 15, 2018

Conversation

nikitavbv
Copy link
Contributor

Bug: T174384

@codecov
Copy link

codecov bot commented Jan 13, 2018

Codecov Report

Merging #59 into master will increase coverage by 0.63%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #59      +/-   ##
==========================================
+ Coverage   35.43%   36.07%   +0.63%     
==========================================
  Files          33       33              
  Lines        1013     1023      +10     
==========================================
+ Hits          359      369      +10     
  Misses        654      654
Impacted Files Coverage Δ
wikiclass/feature_lists/enwiki.py 100% <100%> (ø) ⬆️
wikiclass/feature_lists/tests/test_enwiki.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e747822...5dcfbf3. Read the comment docs.

Copy link
Member

@Ladsgroup Ladsgroup left a comment

Choose a reason for hiding this comment

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

Thank you very much, sorry for late answer, this is a very nitpicky thing but it's needed.

@@ -60,6 +82,7 @@
main_article_templates / max(wikitext.revision.content_chars, 1),
(english.stemmed.revision.stem_chars /
max(wikitext.revision.content_chars, 1)),
paragraphs_without_refs_total_length,
Copy link
Member

Choose a reason for hiding this comment

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

One thing, this without scaling can cause abnormalities in the result, you need to add "log" to counting features, look at https://github.com/wiki-ai/wikiclass/blob/9e7660d6a2054119662de887e79456f44d9adf98/wikiclass/feature_lists/wikibase.py for example

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@nikitavbv nikitavbv force-pushed the master branch 2 times, most recently from 6c9aeaf to 7d9a311 Compare January 15, 2018 11:33

Short line.<ref>last</ref><ref>One more reference</ref>
"""
assert solve(enwiki.paragraphs_without_refs_total_length,
Copy link
Member

Choose a reason for hiding this comment

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

Niiice

@Ladsgroup Ladsgroup merged commit e294c8a into wikimedia:master Jan 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants