cldf-clts / pyclts

Apache License 2.0
11 stars 2 forks source link

Modify diacritic order for vowels #32

Closed cormacanderson closed 4 years ago

cormacanderson commented 4 years ago

As discussed here https://github.com/cldf-clts/clts/issues/74 the current write order poses some problems for readability in certain instances, with diacritics on top of a length mark. I would thus propose to change the write order to the following, with duration last.

    _write_order = dict(
        pre=[],
        post=[
            'tongue_root', 'raising', 'centrality', 'rounding',
            'voicing', 'breathiness', 'creakiness',
            'syllabicity',  'frication', 'relative_articulation', 'nasalization', 'tone', 'articulation', 'rhotacization',
            'pharyngealization', 'glottalization', 'velarization', 'duration'])
    _name_order = [
        'duration', 'rhotacization', 'pharyngealization',
        'glottalization', 'velarization', 'syllabicity',
        'relative_articulation',
        'tongue_root', 'raising', 'rounding',
        'articulation', 'nasalization', 'voicing', 'creakiness',
        'breathiness', 'roundedness', 'height', 'frication', 'centrality',
        'tone']
LinguList commented 4 years ago

@cormacanderson, is the order now fine, or should we still add this?

cormacanderson commented 4 years ago

I added issues to pyclts re the write order on both consonants and vowels but don't have time to check now if implemented or not. Basically duration should be last on vowels, so that diacritics do not attach to the length mark. On consonants, we should have secondary articulation features together, before aspiration and breathiness. I can check in an hour or so if you don't have time either.

LinguList commented 4 years ago

We leave this open until we release the real pyclts code (not pre-release) and ignore it for now.

cormacanderson commented 4 years ago

I checked and the write order for vowels does not appear to have been changed. I can do that now and put in a PR? I would change this: https://github.com/cldf-clts/pyclts/blob/dfddc2836bf66c83408e5c8a55b1f8f19d56551f/src/pyclts/models.py#L356-L363 for this:

 _write_order = dict(
        pre=[],
        post=[
            'tongue_root',
            'raising',
            'centrality',
            'rounding',
            'voicing',
            'breathiness',
            'creakiness',
            'syllabicity',
            'nasalization',
            'frication',
            'relative_articulation',
            'tone',
            'articulation',
            'rhotacization',
            'pharyngealization',
            'glottalization',
            'velarization',
            'duration'])

That should sort out the aberrant behaviour of some diacritics being found under the length mark.

LinguList commented 4 years ago

More changes are needed, as it will have consequences, so it is better I do it later.