-
Notifications
You must be signed in to change notification settings - Fork 0
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
Translation Alignments: Port translation alignment endpoints from Flask app to ATLAS #4
Conversation
This is being ported from the examples provided at: and implemented within: |
I've pushed, deployed and loaded all alignment data. Still working out the best way to support a "reference" based query for alignment chunks like was done in scaife-viewer/readhomer#25 |
I think this is an example of a more general pattern where you want to retrieve As but you want to specify the range of As in terms of some other referencing scheme based on Bs. Other examples might include, "give me the sentences in John 3.1–3.11" or give me the Beowulf fitts for lines 1000–1500. I think the basic algorithm is: (1) work out the (first) fitt containing line 1000; (2) work out the (last) fitt containing line 1500; (3) use those two fitts as the "new" range returned. We might want to annotate the results with the fact it was actually lines 1000 to 1500 that were requests (and the two chunking systems aren't perfectly aligned. Obviously that means we need to index to support (1) and (2). Anyway, IMO all this applies to translation units containing other referencing schemes too. |
@jtauber I agree; my original comment could have been clearer in that I was trying to figure out how to support a reference-based query in GraphQL / I'd already set up a
Will still want to work out the "annotation" approach for GraphQL as well. The Flask-based API had a metadata entry for |
fixes an issue where we had to define filter_fields even with an explicit filterset_class was in use
# Conflicts: # readhomer_atlas/library/admin.py # readhomer_atlas/library/schema.py # requirements.txt
I've updated this branch based on some things we've worked on with KITAB's ATLAS server.
|
6469882
to
6ee0bd2
Compare
# Conflicts: # README.md # readhomer_atlas/library/admin.py # readhomer_atlas/library/importers/versions.py # readhomer_atlas/library/migrations/0001_initial.py # readhomer_atlas/library/models.py # readhomer_atlas/library/schema.py
we had a a "contains" relation ("lines") that isn't performant: 345b87e took ingestion from ~7s to ~45s this allows us to do contains queries (and would likely allow further metadata such as "resolved")
Models translation alignments in ATLAS and provides hooks to import alignment data and query
TextAlignmentChunk
data byreference
.Each TextAlignmentChunk has both start and end
Line
FKs as well as acontains
property that can be used to retrieve allTextPart
instances within the range.importers.alignments
handles importing the data from Homeric Iliad and Odyssey aligned at the sentence level to the A. T. Murray Translation.When retrieving
TextAlignmentChunk
instances, the actual alignment data is stored in anitems
JSON field with the following format: