oaregithub / oare_sql

1 stars 0 forks source link

limited use of the `text_epigraphy`.`type` of "stamp" #26

Closed Gertrudius closed 1 year ago

Gertrudius commented 1 year ago

There are only 4 instances of text_epigraphy.type = "stamp" and it is unclear to me whether these are erroneous entries, or whether we should consistently be rendering stamp seals as "stamp" or subsuming them all under "region" along with cylinder sealings.

SELECT * FROM text_epigraphy WHERE type = "stamp";

EDIT: Either method of rendering it should be fine for us on the SQL side (although it might affect the front end), but the difference can impact my review of the iterative stored procedure logic.

Gertrudius commented 1 year ago

I spotted a small complicating factor. It appears that "stamp" occurs as the child of a line, whereas regions do not. Given that there are more than 4 stamp seals in the database, that means we are rendering some as children of lines, while the rest must be children of columns.

SELECT DISTINCT type FROM text_epigraphy WHERE parent_uuid IN (SELECT uuid FROM text_epigraphy WHERE type = "line")

edstratford commented 1 year ago

Stamp seals do -- usually -- occur within lines - though not always. There are cases where they form their own region (such as when on an edge of an envelope. So both possibilities occur. But there is a problem that some stamp seals are not marked accordingly. -- This will ulitmately have to be a manual process. -- But YES, this is an undesirable situation-- to have seals fall under two different types. I'm open to discussion - a type that is 'seal' but I feel like it diverts from as simple as possible set of types in the larger picture (stamp as the type for inter-line seals is relatively rare).

Gertrudius commented 1 year ago

Further research on this shows only 2 of the 4 instances of "stamp" have lines as their parent, while no regions at all, whether they are set as isStampSealImpression in text_markup or not, have a line as their parent.

SELECT * FROM text_epigraphy WHERE `type` = "stamp" AND parent_uuid IN (SELECT uuid FROM text_epigraphy WHERE type = "line");
SELECT * FROM text_epigraphy WHERE `type` = "region" AND parent_uuid IN (SELECT uuid FROM text_epigraphy WHERE type = "line");

At some point, we must have decided to render both cylinder and stamp seals as regions because that's the only explanation I can think of for having only 4 of the "stamp" type. Moreover, as part of that or maybe something to do with adding column objects, we must have changed the parent of virtually all the stamp seals to column. This has created an issue for my reordering scripts/procedures, as at least some retain a correct char_on_line value, but their object_on_tablet is ordered in respect to their current siblings which are mostly lines. An example of this can be seen in one of the two texts that have a type of "stamp" in them which you can see if you run the below SELECT statement and scroll down to object_on_tablet 215.

SELECT * FROM text_epigraphy WHERE text_uuid = "0834251e-cf6d-41d9-ab26-349dd08cf5ea";

I confirmed from a pdf of ICK 1 19a that the stamp seals are within line 19 (18 as well if we want to be nitpicky) and so their object_on_tablet placement is significantly off.

I think this means we'll have to do some major cleanup to ensure that these stamp seals are either placed back into a line or are sorted directly above or below the line they would have belonged to.

EDIT: Strange, it also looks like we only have three text_markup entries with a type of "isStampSealImpression", which seems like it must be incorrect.

SELECT * FROM text_markup WHERE type = "isStampSealImpression";

An indication of this is the number of regions that have a char_on_line value.

SELECT * FROM text_epigraphy WHERE `type` = "region" AND char_on_line IS NOT NULL;
SELECT * FROM text_epigraphy WHERE `type` = "region" AND char_on_line IS NOT NULL AND uuid IN (SELECT reference_uuid FROM text_markup WHERE type = "isSealImpression");
SELECT * FROM text_epigraphy WHERE `type` = "region" AND char_on_line IS NOT NULL AND uuid IN (SELECT reference_uuid FROM text_markup WHERE type != "isSealImpression");
Gertrudius commented 1 year ago

I finished going through that list of stamp seals and confirming their position in relation to surrounding lines of text wherever an image/handcopy etc. was available. The data has been updated to reflect this, and all nomenclature has been updated to region/isSealImpression in text_epigraphy and text_markup, and all regions that are seal impressions except those five which occur within a line have had their char_on_line and line values set to NULL.