oaregithub / oare_mono

1 stars 0 forks source link

Connect person to word/phrase in text view (after properties updates) #1684

Open edstratford opened 1 year ago

edstratford commented 1 year ago

In the discourse hierarchy view, allow user to add properties to word/phrase/clause, etc. (button in the popup window)

Allow to link person if

  1. discourse row (represented by that position in the discourse hierarchy) is a word that is a NAME (definition below) AND word is not in parent phrase that is composed of that word and sibling phrase that has one child that is a NAME.
  2. discourse row is a phrase that is composed of two children - A. first child is a word that is a NAME B. second child is a phrase with one child that is a word that is NAME and one other child that is word
  3. discourse row is a phrase with one child that is a word that is NAME AND the immediately preceding sibling to the phrase IS NOT a word that is a name.

If one of three conditions are met, present options for person according to the following conditions for each of the situations above:

For situation 1 above: return to user list of person rows (displayed PN, relation, relation PN) according to code elsewhere) where person.name_uuid = dw.uuid from NAME definition

For situation 2: return to user list of person rows (displayed according to code elsewhere) where person.name_uuid = dw.uuid from NAME definition of first child. AND person.name_relation_uuid = dw.uuid from NAME definition of child of phrase AND sorted with results where person.relation matches the dw.uuid of the other word in the phrase (dw.word that is son = 's.' in person.relation, etc. - see relation list below)

For situation 3: return to user list of person rows where person.relation_name = dw.uuid from NAME definition of child of phrase AND sorted with results where person.relation matches the dw.uuid of the other word in the phrase (dw.word that is son = 's.' in person.relation, etc. - see relation list below)

SORT results to show any person that already appears in the same archive as that text - if there is an archive linked in the link table...

When user selects which person - write this to item_proeprties.

definition for NAME: word is NAME if this query brings back a non-null result: SELECT dw.uuid FROM text_discourse td INNER JOIN dictionary_spelling ds ON ds.uuid = td.spelling_uuid INNER JOIN dictionary_form df ON df.uuid = ds.reference_uuid INNER JOIN dictionary_word dw ON dw.uuid = df.reference_uuid AND dw.type = 'PN' WHERE td.uuid = ;

LIST OF RELATIONS: person.relation. dw.uuid 'f.' 095760d8-d4c4-458d-d1b5-66d7d6133458, 6a7f8c8f-9793-f862-dd00-a41cc9d696d2 's.' 095760d8-d4c4-458d-d1b5-66d7d6133458 'm.' 095760d8-d4c4-458d-d1b5-66d7d6133458, 6a7f8c8f-9793-f862-dd00-a41cc9d696d2 'w.' 746362cd-da86-42e1-bd6d-ae3e39741aed, 573fec48-d75f-4a48-802b-a3aa5fea14e4 'd.' 6a7f8c8f-9793-f862-dd00-a41cc9d696d2 'h.' 746362cd-da86-42e1-bd6d-ae3e39741aed, 'slv.' 62908455-3f84-6c50-610b-95dee68ad05d 'kṣr' 6a7ef62f-dbf5-8be3-256a-99209f91d818

This list is incomplete -- still figuring out how to include brother and sister as these normally go through the parent...