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

[ENH] Corpus: add title attribute selection dropdown #481

Merged
merged 1 commit into from
Dec 17, 2019

Conversation

PrimozGodec
Copy link
Collaborator

@PrimozGodec PrimozGodec commented Dec 11, 2019

Issue

When the corpus is loaded from a file or made out of the data table, the title attribute is not set if it does not exist in data already.

Description of changes

With this PR we:

  • implement the dropdown to select the title attribute
  • implement the strategy to select the most suitable title attribute by default
  • add unit-tests

When this PR is checked I will update the documentation since new images must be made.
This PR also does not address the numbering of documents in a Corpus Viewer it will be solved in a separate pull request #482.

Includes
  • Code changes
  • Tests
  • Documentation

@PrimozGodec PrimozGodec changed the title Corpus: add title attribute selection dropdown [ENH] Corpus: add title attribute selection dropdown Dec 11, 2019
@ajdapretnar
Copy link
Collaborator

If I select grimm-tales-selected and change the Title attribute to 'no title', I don't think the titles become the default, but the old title property is still used.

@codecov-io
Copy link

codecov-io commented Dec 16, 2019

Codecov Report

Merging #481 into master will increase coverage by 0.06%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #481      +/-   ##
==========================================
+ Coverage    85.7%   85.77%   +0.06%     
==========================================
  Files          34       34              
  Lines        2001     1996       -5     
  Branches      336      333       -3     
==========================================
- Hits         1715     1712       -3     
- Misses        247      248       +1     
+ Partials       39       36       -3

@PrimozGodec
Copy link
Collaborator Author

@ajdapretnar another heuristic was used in the corpus that outputted the title attribute even it was not marked in a table. In case that there was no title attribute marked in a table and table had one of the attributes "title", "heading", "filename", it was decided as a title. Since we are building a new strategy for deciding on a title attribute, I removed current heuristics from the corpus. Anyway, since the strategy was good I merged it in a corpus widget for deciding on a default title attribute.

@ajdapretnar ajdapretnar merged commit 6279e2b into biolab:master Dec 17, 2019
@PrimozGodec PrimozGodec deleted the corpus-title branch December 17, 2019 15:46
@PrimozGodec PrimozGodec mentioned this pull request Dec 27, 2019
3 tasks
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.

3 participants