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

Issue309 key files with labels only #313

Merged
merged 6 commits into from
Aug 9, 2019

Conversation

osma
Copy link
Member

@osma osma commented Aug 9, 2019

Fixes #309

This PR modifies the document corpus processing code so that URIs are looked up based on labels and vice versa (with the help of a subject index). This should make it possible to use simple .key files with only subject labels, as specified in the wiki.

Marking as draft PR since some refactoring may be necessary before merging.

@osma osma added the bug label Aug 9, 2019
@osma osma added this to the 0.42 milestone Aug 9, 2019
@osma osma self-assigned this Aug 9, 2019
@codecov
Copy link

codecov bot commented Aug 9, 2019

Codecov Report

Merging #313 into master will decrease coverage by 19.38%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #313       +/-   ##
===========================================
- Coverage   99.36%   79.97%   -19.39%     
===========================================
  Files          55       55               
  Lines        2842     2867       +25     
===========================================
- Hits         2824     2293      -531     
- Misses         18      574      +556
Impacted Files Coverage Δ
annif/corpus/convert.py 100% <ø> (ø) ⬆️
annif/corpus/document.py 100% <100%> (ø) ⬆️
tests/test_corpus.py 100% <100%> (ø) ⬆️
annif/corpus/subject.py 100% <100%> (ø) ⬆️
annif/corpus/types.py 100% <100%> (ø) ⬆️
annif/backend/vw_base.py 4.34% <0%> (-95.66%) ⬇️
tests/test_backend_vw_multi.py 4.58% <0%> (-95.42%) ⬇️
annif/backend/mixins.py 0% <0%> (-93.75%) ⬇️
annif/backend/vw_multi.py 6.66% <0%> (-93.34%) ⬇️
annif/backend/fasttext.py 8.21% <0%> (-90.42%) ⬇️
... and 9 more

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 58c2928...0678998. Read the comment docs.

@osma osma marked this pull request as ready for review August 9, 2019 09:14
@osma
Copy link
Member Author

osma commented Aug 9, 2019

Code Climate keeps complaining but I think the code is now good enough

@codecov
Copy link

codecov bot commented Aug 9, 2019

Codecov Report

Merging #313 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #313      +/-   ##
==========================================
+ Coverage   99.36%   99.37%   +<.01%     
==========================================
  Files          55       55              
  Lines        2842     2867      +25     
==========================================
+ Hits         2824     2849      +25     
  Misses         18       18
Impacted Files Coverage Δ
annif/corpus/convert.py 100% <ø> (ø) ⬆️
annif/corpus/document.py 100% <100%> (ø) ⬆️
tests/test_corpus.py 100% <100%> (ø) ⬆️
annif/corpus/subject.py 100% <100%> (ø) ⬆️
annif/corpus/types.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 58c2928...0678998. Read the comment docs.

@osma osma merged commit a8999e7 into master Aug 9, 2019
@lgtm-com
Copy link

lgtm-com bot commented Aug 9, 2019

This pull request introduces 1 alert when merging 0678998 into 1877f40 - view on LGTM.com

new alerts:

  • 1 for Unused import

juhoinkinen added a commit that referenced this pull request Aug 26, 2019
@osma osma deleted the issue309-key-files-with-labels-only branch September 30, 2019 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Training from .key files with only subject labels fails
1 participant