Repository navigation
fix(sefariasqlite): stop orienting links between reference works and texts - #97
Merged
Merged
Conversation
…texts Sefaria types the Otzar La'azei Rashi -> Rashi on X rows as `commentary`. The dictionary has no `dependence` while Rashi does, so the dependence asymmetry made the dictionary Rashi's base, and it showed up in Rashi's sources panel (and as a commentator on the Talmud in the other direction). Flag books whose top-level Sefaria category is `Reference` and store oriented links between a reference work and a non-reference book as REFERENCE. Links inside the reference category (Hafla'ah she-ba'Arakhin on Sefer HeArukh) keep their orientation. Fixes kdroidFilter/Zayit#503 Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes kdroidFilter/Zayit#503
Problem
Otzar La'azei Rashi appears in Rashi's מקורות panel. Sefaria types the
Otzar La'azei Rashi → Rashi on Xrows ascommentary(~3.8k links). The dictionary has nodependencewhile Rashi on X does, so the dependence-asymmetry step ofresolveDirectionalConnectionTypesForMetapicks the dictionary as the base. The reverse is also wrong: ~2.5k links likeShabbat → Otzarmade Otzar appear as a commentator on the Talmud.Fix
Reference(isReferenceWork,BookPayload→BookMeta).REFERENCE, so it no longer feeds the SOURCE view or the commentators panel.Checked against the current DB: apart from Otzar, only 3 links are affected, and all 3 were wrong (e.g. Ibn Ezra on Tehillim as a commentary on Machberet Menachem).
Tests
SefariaLinksImporterTest: reference work vs. commentary →REFERENCE; commentary on a reference work → still oriented.:sefariasqlite:jvmTestpasses. The DB was not regenerated.