clld / glottolog3

glottolog2 re-implemented as CLLD app
MIT License
110 stars 27 forks source link

Make sure automatic assignments are labeled as such #75

Closed xrotwang closed 6 years ago

xrotwang commented 6 years ago

@d97hah reports:

But it turns out from the nort3046 .ini that it is: haspelmath:ross_dusner_2013<trigger "not 2 and not description and not for and not i and not modal and not na and not tense and not the and mofu">

(I've subsequently fixed nort3046 .ini so if you look at that file in master now, it won't be there anymore)

But the "not 2 and not description and not for and not i and not modal and not na and not tense and not the and mofu" doesn't show up on http://glottolog.org/resource/reference/id/401496 nor does it have the warning flag on http://glottolog.org/resource/languoid/id/nort3046

I recall having observed it on either entries too, i.e., that the warning flag is not there in spite of actually being a computerized assignment, so there's probably a glitch somewhere more generally.

xrotwang commented 6 years ago

Can't reproduce. Just checking one instance https://github.com/clld/glottolog/blob/master/languoids/tree/afro1255/chad1250/bium1280/nort3156/musg1255/koto1264/koto1265/afad1236/md.ini#L78 revealed no problem.

d97hah commented 6 years ago

This one can "computerized assignment"

http://glottolog.org/resource/reference/id/11618

But no warning sign is shown in the ref list

http://glottolog.org/resource/languoid/id/mapo1245

2017-11-22 10:04 GMT+01:00 Robert Forkel notifications@github.com:

Closed #75 https://github.com/clld/glottolog3/issues/75.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/clld/glottolog3/issues/75#event-1353615081, or mute the thread https://github.com/notifications/unsubscribe-auth/ADUDyM00GHMrc5pOJZBoZxUDPbAGVyivks5s4-OngaJpZM4PsVbY .

xflr6 commented 6 years ago

I think I have traced this to this import code, which does not do what the second comment line says: https://github.com/clld/glottolog3/blob/171477191a22b8c36608c6b28bb8fb909dff49f1/glottolog3/initdb.py#L388-L392 reflangs is the list of language ids to which a reference is linked: https://github.com/clld/glottolog3/blob/171477191a22b8c36608c6b28bb8fb909dff49f1/glottolog3/initdb.py#L379-L380 https://github.com/clld/glottolog3/blob/171477191a22b8c36608c6b28bb8fb909dff49f1/glottolog3/initdb.py#L89-L90 Namely all those linked in the (sources, glottolog) section of an md.ini: https://github.com/clld/glottolog/blob/f97257cd4a57e24d1629b2335fd95b331897d3d2/pyglottolog/languoids/languoid.py#L224-L228

Now the if reflangs branch above (skipping the ca_language_trigger field) triggers as soon as the reference is linked to any languoid, which can be different from the ca one as is in this case (yaba1248):

[sources]
glottolog = 
        **sala:4118**<trigger "zukunft">

@xrotwang: crucially, the check should not include fields with <trigger ...>, right (i.e., they are automatic)? Second question: Is the 'linked to any languoud' part intended?

With this tight condition almost none of the entries actually have ca_language_trigger populated:

SELECT count(*) AS ca, count(ca_language_trigger) AS populated
FROM source JOIN ref USING (pk)
WHERE language_note  ~ '\(computerized assignment from "'

ca    |populated |
------|----------|
64216 |687       |

Note that there would be a warning sign also on the detail page of 11618 if the ca_language_trigger field was populated (cf. e.g. 100020).

xflr6 commented 6 years ago

On second look, the 'linked to any languoid' part seems to be just a side effect of having triggered assignments in our md.ini files (should do the right thing again now that we removed those in #195), to be verified.