Refactor SubjectSet and Document to store subject IDs instead of URIs and labels #606
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR refactors the SubjectSet class, which are used to represent gold standard / manually indexed subjects for training and evaluation documents, so that the SubjectSet class only stores numeric subject IDs instead of subject URIs and labels. It also changes the Document class to contain a SubjectSet instead of separate fields for subject URIs and labels. The end result is that internally, numeric IDs are used much more than before and the conversion from concept URIs and/or labels to subject IDs is performed earlier than before. The changes should simplify things overall and also likely improve efficiency (both RAM and CPU), although I haven't measured the difference.
This PR is very similar to PR #604 which did the same kind of overhaul for the SubjectSuggestion class.