SharedInv-Analysis.ipynbOpen in CoCalc
Jupyter notebook Inv-Analysis.ipynb

Table of Contents

%%javascript
$.getScript('https://kmahelona.github.io/ipython_notebook_goodies/ipython_notebook_toc.js')
$('head').append('<style>table {font-family: "Doulos SIL"; font-size=5em;}')
(not running untrusted Javascript)
from IPython.display import display
from IPython.display import HTML
from IPython.display import Image

import csv
import collections
import matplotlib
import random
def get_inventories(aggregated, consonants):
    with open(aggregated) as f:
        aggregated_data = [i for i in csv.DictReader(f, delimiter='\t')]

    with open(consonants) as f:
        segments = [segment for segment in csv.DictReader(f, delimiter='\t')]

    inventories = []
    for inventory in aggregated_data:
        inventory_consonants = int(inventory['Consonants'])
        if inventory_consonants <= 14 and 'dialect' not in inventory['LanguageName']:
            # Get rid of ugly language labels
            lang_name = inventory['LanguageName']
            
            if 'Maxakali' in lang_name:
                continue
                
            if lang_name.isupper() or lang_name.islower():
                inventory['LanguageName'] = inventory['LanguageName'].title()

            # Map the genus to actual language family name
            try:
                inventory['LanguageFamilyRoot'] = genus_to_family[inventory['LanguageFamilyGenus']]
            except KeyError:
                # If the language is unclassified, we'll have to skip it 😢
                continue

            inventory['Segments'] = []
            for segment in segments:
                if inventory['InventoryID'] == segment['InventoryID']:
                    inventory['Segments'].append(segment['Phoneme'])

            for key in ['Phonemes', 'Tones', 'Population', 'Trump', 'Country', 'Vowels']:
                del inventory[key]

            if inventory_consonants != len(inventory['Segments']):
                print('Invalid inv: {}'.format(inventory))
            else:
                inventories.append(inventory)

    else:
        return inventories


def get_features_dict(features_file, phonemes_file):
    with open(phonemes_file) as f:
        phonemes = [i for i in csv.DictReader(f, delimiter='\t')]

    phoneme_classes = {i['Phoneme']: i['CombinedClass'] for i in phonemes}
    
    with open(features_file) as f:
        features = [i for i in csv.DictReader(f, delimiter='\t')]

    features_d = {}

    # NOTE: if we need non-present features, disable deep copy
    for segment in features:
        # Only act on consonants
        if segment['syllabic'] == '+':
            continue
        else:
            segment_copy = {}
            for feature in segment:
                if segment[feature] == '0':
                    segment_copy[feature] = None
                elif segment[feature] == '+':
                    segment_copy[feature] = True
                elif segment[feature] == '-':
                    segment_copy[feature] = False
                elif segment[feature] == '+,-' or segment[feature] == '-,+':
                    segment_copy[feature] = True
                    segment_copy['complex'] = True
            
            try:
                segment_copy['class'] = phoneme_classes[segment['segment']]
            except KeyError:
                segment_copy['class'] = 'c-d-c'
            features_d[segment['segment']] = segment_copy
    
    else:
        return features_d

    
def get_genus_map(family_file, genus_file):
    # Initialise families and genera
    with open(family_file) as f:
        families = [i for i in csv.DictReader(f)]

    with open(genus_file) as f:
        genera = [i for i in csv.DictReader(f)]

    # Map a genus to a family, since the source data provides an ID instead of a pretty name
    families_map = {family['pk']: family['name'] for family in families}
    genus_to_family = {genus['name']: families_map[genus['family_pk']] for genus in genera}
    
    return genus_to_family
        
    
def is_voiced(segment):
    return features_d[segment]['periodicGlottalSource']


def is_plosive(segment):
    is_consonantal = features_d[segment]['consonantal'] is True
    is_not_sonorant = features_d[segment]['sonorant'] is False
    is_not_continuant = features_d[segment]['continuant'] is False
    is_not_strident = features_d[segment]['strident'] is None or features_d[segment]['strident'] is False
    is_not_delayed_release = features_d[segment]['delayedRelease'] is None or features_d[segment]['delayedRelease'] is False
    
    return is_consonantal and is_not_sonorant and is_not_continuant and is_not_strident and is_not_delayed_release


def is_affricate(segment):
    is_consonantal = features_d[segment]['consonantal'] is True
    is_not_sonorant = features_d[segment]['sonorant'] is False
    is_not_continuant = features_d[segment]['continuant'] is False
    is_strident = features_d[segment]['strident'] is True
    
    return is_consonantal and is_not_sonorant and is_not_continuant and is_strident


def is_fricative(segment):
    is_syllabic = features_d[segment]['syllabic'] is False
    is_not_sonorant = features_d[segment]['sonorant'] is False
    is_continuant = features_d[segment]['continuant'] is True
    
    return is_syllabic and is_not_sonorant and is_continuant


def is_nasal(segment):
    is_consonantal = features_d[segment]['consonantal'] is True
    is_nasal = features_d[segment]['nasal'] is True
    is_continuant = features_d[segment]['continuant'] is False
    
    return is_consonantal and is_nasal and is_continuant


def is_liquid(segment):
    is_consonantal = features_d[segment]['consonantal'] is True
    is_continuant = features_d[segment]['continuant'] is True
    is_sonorant = features_d[segment]['sonorant'] is True
    is_not_strident = features_d[segment]['strident'] is False or features_d[segment]['strident'] is None 
    has_lateral_feature = features_d[segment]['lateral'] is not None
    
    return is_consonantal and is_continuant and is_not_strident and is_sonorant and has_lateral_feature


def is_rothic(segment):
    is_consonantal = features_d[segment]['consonantal'] is True
    is_not_lateral = features_d[segment]['lateral'] is False
    
    return is_consonantal and is_liquid(segment) and is_not_lateral

def sanity_checks():
    plosives = 'p b t d ʈ ɖ c ɟ k ɡ q ɢ ʔ'.split()
    fricatives = 'ɸ β f v θ ð s z ʃ ʒ ʂ ʐ ç ʝ x ɣ χ ʁ ħ ʕ h ɦ'.split()
    laterals = 'l̪  l ɭ ʎ ʟ'.split()
    nasals = ' m ɱ n̪ n ɳ ɲ ŋ ɴ'.split()
    voiced = 'b d ɖ ɟ ɡ ɢ β v ð z ʒ ʐ ʝ ɣ ʁ ʕ'.split()
    voiceless = 'p t ʈ c k q ʔ ɸ f θ s ʃ ʂ ç x χ'.split()
    
    for plosive in plosives:
        assert is_plosive(plosive)
        assert not is_affricate(plosive)
        assert not is_nasal(plosive)
        assert not is_liquid(plosive)
    
    for fricative in fricatives:
        assert is_fricative(fricative)
        assert not is_affricate(fricative)
        assert not is_plosive(fricative)
        assert not is_nasal(fricative)
        assert not is_liquid(fricative)

    for lateral in laterals:
        assert is_liquid(lateral)
    
    for nasal in nasals:
        assert is_nasal(nasal)
        assert not is_fricative(nasal)
        assert not is_affricate(nasal)
        assert not is_plosive(nasal)
        assert not is_liquid(nasal)
    
    assert not is_plosive('t̠ʃ') and is_affricate('t̠ʃ')
    assert is_liquid('r')
    assert is_rothic('r')
    
    for c in voiced:
        assert is_voiced(c), c
    
    for c in voiceless:
        assert not is_voiced(c), c

features_d = get_features_dict('phoible-segments-features.tsv', 'phoible-phonemes.tsv')
genus_to_family = get_genus_map('family.csv', 'genus.csv')
inventories = get_inventories('phoible-aggregated.tsv', 'phoible-consonants.tsv')

# Make sure we won't make phonological errors 😉
sanity_checks()

Here we'll filter out the inventories that are possibly duplicates. The criterion will be multiple occurences of an identifier made of the language code and the language name concatenated in lower case with stripped spaces. The inventory we'll keep is the one with a PHOIBLE or SAPHON inventory preferably.

def get_canonical_name(inventory):
    code = inventory['LanguageCode']
    name = inventory['LanguageName']
    name = name.replace(' ', '')
    name = name.lower()
    return '{}{}'.format(code, name)


def filter_inventories(inventories):
    codes = [get_canonical_name(i) for i in inventories]
    dupes = [item for item, count in collections.Counter(codes).items() if count > 1]
    dupe_sources = {}

    for code in dupes:
        for inventory in inventories:
            inventory_id = get_canonical_name(inventory)
            if inventory_id == code:
                try:
                    dupe_sources[inventory_id].append(inventory['Source'])
                except KeyError:
                    dupe_sources[inventory_id] = [inventory['Source']]

    filtered_inventories = []
    for inventory in inventories:
        inventory_id = get_canonical_name(inventory)

        if inventory_id in dupes:
            source = inventory['Source']
            if source != 'PH' and 'PH' in dupe_sources[inventory_id]:
                continue
            elif source != 'SAPHON' and 'SAPHON' in dupe_sources[inventory_id]:
                continue
            elif source != 'UPSID' and 'UPSID' in dupe_sources[inventory_id]:
                continue
            else:
                filtered_inventories.append(inventory)
        else:
            filtered_inventories.append(inventory)

    return filtered_inventories


inventories = filter_inventories(inventories)[:160]
# aleatori: inventories = random.sample(inventories, 160)
inventories.sort(key=lambda k: k['LanguageFamilyRoot']+k['LanguageFamilyGenus'])

Família, genus, llengua i segments

html_table = ['<table>']

total_segments = 0
# Build the header
html_table.append('<tr>')
for header in ['Familia', 'Genus', 'Area', 'Llengua', '#', 'Segments']:
    html_table.append('<td><b>{}</b></td>'.format(header))
else:
    html_table.append('</tr>')

# Add the actual payload
for inventory in inventories:
    html_table.append('<tr>')
    for attribute in ['LanguageFamilyRoot', 'LanguageFamilyGenus', 'Area', 'LanguageName']: 
        html_table.append('<td>{}</td>'.format(inventory[attribute]))
    else:
        html_table.append('<td>{}</td>'.format(len(inventory['Segments'])))
        total_segments += len(inventory['Segments'])
        html_table.append('<td>')
        html_table.append('  '.join(sorted(inventory['Segments'])))
        html_table.append('</font></td>')
        html_table.append('</tr>')

else:
    html_table.append('</table>')

    
print('Número de llengües: {}'.format(len(inventories)))
print('Mitjana de fonemes per llengua {}'.format(total_segments / len(inventories)))
# Construct the table and display it
html_table = ''.join(html_table)
html_table = HTML(html_table)
display(html_table)
Número de llengües: 160 Mitjana de fonemes per llengua 12.00625
FamiliaGenusAreaLlengua#Segments
AinuAinuAsiaAinu11h j k m n p s t t̠ʃ w ɾ
AlgicAlgonquianAmericaShawnee13j k kː l m n p t t̠ʃ w ʃ ʔ θ
AlgicAlgonquianAmericaBlackfoot13h j k l m n p s t̠ʃ t̪ w x ʔ
ArauanArauanAmericaJamamadí12b d h k m n s t w ɟ ɸ ɾ
AustralianNorthern DalyPacificMalakmalak14j k l l̠ m n n̠ p r t t̠ w ŋ ɹ
AustralianPama-NyunganPacificBandjalang12b d d̠ʒ j l m n n̠ r w ŋ ɡ
AustralianPama-NyunganPacificDyirbal13b d j l m n r w ŋ ɟ ɡ ɲ ɻ
AustralianPama-NyunganPacificGugu-Yalandyi13*R̪ c j k l̪ m n̪ p t̪ w ŋ ɲ ɻ
AustralianPama-NyunganPacificWik-Munkan13j k l m n n̠ p r t t̠ w ŋ ʔ
AustralianPama-NyunganPacificYidiny13b d j l m n r w ŋ ɟ ɡ ɲ ɻ
AustralianTiwianPacificTiwi14j k l m n n̪ p t t̪ w ŋ ɣ ɻ ɾ
AustronesianCentral Malayo-PolynesianAsiaTetun14b d̪ f h k l̪ m n̪ p r̪ s̪ t̪ w ʔ
AustronesianCentral Malayo-PolynesianAsiaSouthern Nuautl12h j k l m n p r s t w ʔ
AustronesianCentral Malayo-PolynesianAsiaSelaru14b d f h j k l m n r s t w ʔ
AustronesianCentral Malayo-PolynesianAsiaLeti10d k l m n p r s t β
AustronesianOceanicPacificMaori10f h k m n p t w ŋ ɾ
AustronesianOceanicAmericaHawaiian8h k l̪ m n̪ p w ʔ
AustronesianOceanicPacificPohnpeian14j k l̪ m mʷ n̪ p pʷ r s t̪ w ŋ ʈʂ
AustronesianOceanicPacificRoro9b h k m n̪ p t̪ ɾ̪ ʔ
AustronesianOceanicPacificTigak12b k m n p r s t ŋ ɡ ɮ β
AustronesianOceanicPacificManam13b d k l m n p s t z ŋ ɡ ɾ
AustronesianOceanicPacificSeimat11h k l m n p s t̪ w x ŋ
AustronesianOceanicPacificTongan; Tonga12f h k m n̪ p s t̪ v ŋ ɺ ʔ
AustronesianOceanicPacificTinputz12h j k l m n p s t w ʔ β
AustronesianOceanicPacificBariai12b d k l m n p r s t ŋ ɡ
AustronesianOceanicPacificNorth Marquesan12f h k m n p r s t v ç ʔ
AustronesianPalauanPacificPalauan10b d̪ k l m r s t̪ ŋ ʔ
AustronesianSouth Halmahera - West New GuineaAsiaIrarutu12k m mb n̪ n̪d̪ s̪ t̪ w ŋɡ ɸ ɾ̪ ʝ
AustronesianSouth Halmahera - West New GuineaAsiaBiak14b d f j k l m n p r s t w β
Baining-TaulilBainingPacificBaining14k l m mb n nd p s t w ŋ ŋɡ ɣ ɾ
BarbacoanBarbacoanAmericaAwa Pit14j k l m n p s t̪ w z ŋ ɬ ʃ ʒ
BorderBorderPacificWaris13*R̪ j k l̪ mb n̪d̪ p s̪ t̪ w x ŋɡ β
BorderBorderPacificImonda13b d f h k l m n p r s t ɡ
BorderBorderPacificAmanab14b f h j k m n p r s t w ŋ ɡ
Cacua-NukakCacua-NukakAmericaCacua12h k l m n p t t̠ʃ w ŋ ʍ ʔ
Cacua-NukakCacua-NukakAmericaNukak12b c d h k p t w ɟ ɡ ɾ ʔ
CahuapananCahuapananAmericaShawi14h j k m n p s t t̠ʃ w ɾ ʃ ʔ β
CaribanCaribanAmericaAkawaio13*R̪ b d̪ j k m n̪ p s̪ t̪ w z̪ ɡ
CaribanCaribanAmericaAkurio10j k m n p t t̠ʃ w ɾ ʔ
CaribanCaribanAmericaApalaí12j k m n p s t w z ɾ ʃ ʔ
CaribanCaribanAmericaArára, Pará11j k l m n p t t̠ʃ w ŋ ɾ
CaribanCaribanAmericaCarijona14b d d̠ʒ h k m n s t t̠ʃ w ɡ ɲ ɾ
CaribanCaribanAmericaIkpeng12j k l m n p t t̠ʃ w ŋ ɡ ɾ
CaribanCaribanAmericaIngarikó10j k m n p s t w ɾ ʔ
CaribanCaribanAmericaKaxuiâna12h j k m n p s t t̠ʃ w ɾ ʔ
CaribanCaribanAmericaKuikúro-Kalapálo14dʲ h k l m n p s t ts w ŋ ɣ ɲ
CaribanCaribanAmericaMacushi10j k m n p s t w ɾ ʔ
CaribanCaribanAmericaMapoyo12h j k m n p s t w ɲ ɾ ʔ
CaribanCaribanAmericaYekwana12h j k m n s t t̠ʃ w ɲ ɾ ʔ
CaribanCaribanAmericaPémono12h j k m n p s t w ɲ ɾ ʔ
CaribanCaribanAmericaTrió10h j k m n p s t w ɾ
CaribanCaribanAmericaWaiwai14h j k m n s t t̠ʃ w ɲ ɸ ɺ ɾ ʃ
CaribanCaribanAmericaYabarana11h j k m n p s t w ɲ ɾ
Chapacura-WanhamChapacura-WanhamAmericaWari; Wari'; Wariʔ; Oro Nao14h hʷ k kʷ m mˀ n nˀ p t̠ʃ t̺ w ɾ ʔ
Chapacura-WanhamChapacura-WanhamAmericaOro Win12j k m n p s t t̪ʙ w ɾ ʔ β
ChibchanMotilonAmericaBarí10b d h k m n r s t ɲ
ChiquitoChiquitoAmericaBésɨro14c k m n p s t t̠ʃ ɲ ɾ ʂ ʃ ʔ β
East BougainvilleEast BougainvillePacificNasioi8b k m n̪ p t̪ ɾ̪ ʔ
East StricklandEast StricklandPacificSamo12b d f h j k l m s t w ɡ
Eastern SudanicNiloticAfricaSebei14c j k l̪ m n̪ p r̪ s̪ t̪ w ŋ ɲ ɾ̪
Eastern SudanicNiloticAfricaSabaot13b j k l m n r s t t̠ʃ w ŋ ɲ
Eastern SudanicNiloticAfricaEndo13c j k l m n p r s t w ŋ ɲ
Eastern SudanicNiloticAfricaNandi13c j k l m n p s t w ŋ ɲ ɾ
Eastern SudanicNiloticAfricaKipsigis14h kʰ l m n p r s tʰ t̠ʃ w ç ŋ ɲ
ElemanEleman ProperPacificTaoripi8f h k l̪ m p s̪ t̪
IroquoianNorthern IroquoianAmericaOneida10h j k l n s t t̠ʃ ɰ ʔ
IroquoianNorthern IroquoianAmericaSeneca11b d̪z̪ h j k m n̪ s̪ t̪ w ʔ
IroquoianNorthern IroquoianAmericaHuron11h j k n r s t w x ʔ θ
IroquoianSouthern IroquoianAmericaCherokee11d dz h j l m n w ɡ ʃ ʔ
JabutíJabutíAmericaArikapú11h j k m n p t t̠ʃ w ɾ ʔ
JabutíJabutíAmericaJabutí14bz d̠ʒ h j k m n p ps t t̠ʃ w ɾ β
JivaroanJivaroanAmericaAguaruna12h k m n p s t ts t̠ʃ ɾ ʃ ʔ
JivaroanJivaroanAmericaShuar13h j k m n p s t ts t̠ʃ w ɾ ʃ
KatukinanKatukinanAmericaKatukína12b d d̠ʒ h k l m n p t t̠ʃ ɲ
KiwaianKiwaianPacificSouthern Kiwai12*R̪ b d̪ k m n̪ p s̪ t̪ w ɡ ʔ
KuotKuotPacificKuot13b d f k l m n p r s t ŋ ɡ
Macro-GeBororoAmericaBororo13*R̪ b d̠ʒ d̪ j k m n̪ p t̠ʃ t̪ w ɡ
Macro-GeGe-KaingangAmericaApinaye13k mb nd p s̪ t t̠ʃ v ŋɡ ɲɟ ɽ ʒ ʔ
Macro-GeGe-KaingangAmericaCanela13h j k m n p t t̠ʃ w ŋ ɲ ɾ ʔ
Macro-GeGe-KaingangAmericaGavião do Pará11h j k kʰ m n p t t̠ʃ w ɾ
Macro-GeGe-KaingangAmericaKrahô12h j k kʰ l m n p t ts w ŋ
Macro-GeGe-KaingangAmericaKrinkati-Timbira11h j k kʰ m n p t t̠ʃ w ɾ
Macro-GeGe-KaingangAmericaPanará11h j k m n p s t w ɾ ʔ
Macro-GeGe-KaingangAmericaSuyá13d̠ʒ k m n p s t t̠ʃ w ŋ ɣ ɲ ɾ
Macro-GeKarajáAmericaKarajá9b d h k l w ɗ ɾ θ
Macro-GeMaxakalíAmericaMaxakali10h k mb nd n̠d̠ʒ p t t̠ʃ ŋɡ ʔ
Macro-GeRikbaktsaAmericaRikbaktsa14b d h j k m n p t t̠ʃ w ɽ ɾ ʃ
Mixe-ZoqueMixe-ZoqueAmericaMixe14d̪ j k m n p s̪ ts͇ t̪ v ɡ ʃ ʒ ʔ
MuraMuraAmericaPiraha8b h k p s̪ t̪ ɡ ʔ
MuskogeanMuskogeanAmericaAlabama14b h j k l̪ m n̪ p s t̠ʃ t̪ w ɬ̪ ɸ
NambikuaranNambikuaranAmericaSabane13h j k l m n p s t w ɓ ɗ ʔ
Niger-CongoBantoidAfricaNɔmaa (NɔmaáNdɛ́)14c f h j k l m n p s t w ŋ ɲ
Niger-CongoBantoidAfricaKikamba13j k l m n s t w ð ŋ ɥ ɲ β
Niger-CongoCross RiverAfricaEfik13b d f j k kp m n s t w ŋ ɲ
Niger-CongoGurAfricaBiali14b d f h j k l m n p s t w ɾ
Niger-CongoGurAfricaWaama13b c d f j k kp m n p s t w
Niger-CongoGurAfricaNateni13b c d f h j k kp p s t w ɟ
Niger-CongoKruAfricaKlao11b cç d̪ f kp p s̪ t̪ w ɟʝ ɡb
NimboranNimboranAsiaNimboran12*R̪ b d̪ h k m n̪ p s̪ t̪ ŋ ɡ
PanoanPanoanAmericaAmahuaca14h j k m n̪ p s̪ t̠ʃ t̪ w x ɾ̪ ʔ θ
PanoanPanoanAmericaShanenawa14f h j k m n p s t ts t̠ʃ w ɾ ʂ
PuinavePuinaveAmericaPuinave8h k m n p s t ʔ
SenagiSenagiAsiaDera11b d̪ j k m n̪ p t̪ w ŋ ɡ
SentaniSentaniAsiaSentani10d̪ f h j k m n̪ p t̪ w
SepikRamPacificAwtuw11d j kʰ l m n pʰ tʰ w ŋ ɾ
SepikUpper SepikPacificIwam11*R h j k m n p s t w ŋ
SepikUpper SepikPacificAbau9h j k m n p s w ɾ
SepikYellow RiverPacificNamia9j k l m n p r t w
Sino-TibetanChineseAsiaFuzhou14k kʰ l̪ m n̪ p pʰ s̪ t̪ t̪s̪ t̪s̪ʰ t̪ʰ x ŋ
Sino-TibetanKuki-ChinAsiaAo14cç j k l m n p s t w z ŋ ɭ͓ ʔ
SiouanSiouanAmericaBiloxi12c d h j k m n p s t w x
SiouanSiouanAmericaCrow10h k p s̪ t̠ʃ t̪ w x ɹ ʃ
SkouKrisaPacificIsaka9b d j k p s t w ɸ
SkouWestern SkouPacificVanimo12b d d̠ l m n n̠ p s t ɦ β
SkouWestern SkouAsiaSkou13b f h j k l m n p r t w ɟ
TaushiroTaushiroAmericaTaushiro12h j k kʷ n t t̠ʃ w x ɲ ɾ ʔ
Teberan-PawaianTeberanPacificDadibi13h j k kʰ m n p pʰ s t tʰ w ɾ
TorricelliWapei-PaleiPacificYil12j k l m n p r s t w ŋ ɡ
TorricelliWapei-PaleiPacificNingil14j k l m n p r s t w ŋ ɡ ɸ ʔ
TorricelliWapei-PaleiPacificAu10j k m n p s t w ɣ ɾ
Trans-New GuineaAnganPacificAngaatiha12j k m n p t t̠ʃ w ŋ ɲ ɺ ʔ
Trans-New GuineaAsmat-KamoroAsiaAsmat11f k m n p s t t̠ʃ w ɾ ʝ
Trans-New GuineaBinandereanPacificSuena13b d̪ d̪z̪ j k m n̪ p s̪ t̪ w ɡ ɾ̪
Trans-New GuineaBinandereanPacificOrokaiva12b d dz h k m n p s t ŋ ɡ
Trans-New GuineaBinandereanPacificBaruga14b d d̠ʒ j k m n s t ɡ ɣ ɸ ɾ β
Trans-New GuineaBinandereanPacificBinandere11b d j k m n p t ɡ ɾ β
Trans-New GuineaChimbuPacificChuave12b d f j k m n s t w ɡ ɾ
Trans-New GuineaChimbuPacificGolin13b d j k l m n p r s t w ɡ
Trans-New GuineaDaniAsiaDani12h j k kʷ l̪ m n̪ p s̪ t̪ w ʔ
Trans-New GuineaEastern HighlandsPacificAuyana11j k m mː n nː p t w ɾ ʔ
Trans-New GuineaEastern HighlandsPacificGadsup9d j k m n̪ p t ʔ β
Trans-New GuineaEastern HighlandsPacificYagaria14b d h j k m n p s t v ɡ ʔ ʟ
Trans-New GuineaEastern HighlandsPacificBinumarien11j k m n p r s t w ɸ ʔ
Trans-New GuineaFasuPacificFasu11h j k m n p s t w ɸ ɾ
Trans-New GuineaFinisterre-HuonPacificWantoat14k kʷ m mb n̪ n̪d̪ n̪z̪ p s̪ t̪ ŋ ŋɡ ŋɡʷ ŋʷ
Trans-New GuineaFinisterre-HuonPacificNankina14b d dz j k m n p t ts w ŋ ɡ β
Trans-New GuineaKoiarianPacificKoiari11b d f h k m n t ð ɡ ɾ
Trans-New GuineaMadangPacificUsan14b d j m mb n nd p s t w ŋɡ ɡ ʔ
Trans-New GuineaMadangPacificNgomba9bv d dz j k p t w ɡ
Trans-New GuineaOkPacificMianmin13b d f h j k m n s t w ŋ ɡ
Trans-New GuineaOkPacificFaiwol12b d f j k l m n s t w ɡ
Trans-New GuineaWissel Lakes-KemandogaAsiaEkari10b d j k m n p t w ɡˡ
TucanoanTucanoanAmericaBarasano11b d h j k p s t w ɡ ɾ
TucanoanTucanoanAmericaCubeo11b d d̠ k p t t̠ʃ x ð ɺ̪ β
TupianArikemAmericaKaritiana; Karitiâna11h k m n p s t w ŋ ɲ ɾ
TupianTupi-GuaraníAmericaAche11d̠ʒ k m mb n̪d̪ p t̠ʃ t̪ ŋɡ ɺ̪ β
TupianTupi-GuaraníAmericaGuajajara14h k kʷ m n p ts t̪ w z ŋ ŋʷ ɾ ʔ
TupianTupi-GuaraníAmericaKaiabi14j k kʷ m n p s t w ŋ ɡ ɸ ɾ ʔ
TupianTupi-GuaraníAmericaKokama-Kokamilla11j k m n p t ts t̠ʃ w x ɾ
Uto-AztecanNumicAmericaComanche12h j k kʷ m n p s t̪ t̪s̪ w ʔ
Uto-AztecanNumicAmericaNorthern Paiute14h j k kʷ m n p s t ts t̠ʃ w ŋ ʔ
Uto-AztecanTarahumaranAmericaWarihio12h j k m n p s t t̠ʃ w ɾ ʔ
WaoraniWaoraniAmericaAuca11b d k m n p t w ŋ ɡ ɲ
WaoraniWaoraniAmericaWaorani12b d j k m n p t w ŋ ɡ ɲ
West BougainvilleWest BougainvillePacificRotokas6k p t ɡ β ᴅ
YanomamYanomamAmericaShiriana13h j k m n̪ p s̪ t̠ʃ t̪ t̪ʰ w ɾ̪ ʃ
YanomamYanomamAmericaSanuma; Sanumá11h k l m n p s t ts tʰ w
YarebanYarebanPacificYareba13b d dz j k m n s t w ɡ ɸ ɾ
YawaYawaAsiaYawa14b d d̠ʒ j k m n nʲ p s sʲ t w ɾ
ZaparoanZaparoanAmericaArabela11h j k m n̪ p r̪ s̪ t̪ w ʃ
inventories.sort(key=lambda k: k['LanguageName'])

Sistemes secundaris

sistemes_secundaris = [
'Awtu, Aspiració',
'Auyana, Allargament',
'Comanche, Labialització',
'Dadibi, Aspiració',
'Dani, Labialització',
'ekari, Alliberament lateral',
'fuzhou, Aspiració',
'gaviao do para, Aspiració',
'guajajara, Labialització',
'kayabi, Labialització',
'kitsijis, Aspiració',
'karajo, Aspiració',
'krinkati-tinbira, Aspiració',
'kuikura-kalapalo, Palatalització',
'northern paiute, Labialització',
'pompeian, Labialització',
'sanuma, Aspiració',
'shawnee, Llargada',
'shirihana, Aspiració',
'wantoat, Labialització',
'wariwari, Labialització / Glotalitzacio',
'yawa, Palatalització']

langs_with_aspiration = 0
langs_with_labialitzation = 0
langs_with_palatalitzation = 0
langs_with_glotalization = 0
langs_with_duration = 0
langs_with_lateralrelease = 0

html_table = ['<table>']
html_table.append('<tr><td>Llengua</td><td>Sistema secundari</td>')

for s in sistemes_secundaris:
    if 'Labialització' in s:
        langs_with_labialitzation += 1
    if 'Aspiració' in s:
        langs_with_aspiration += 1
    if 'Palatalitzaci' in s:
        langs_with_palatalitzation += 1
    if 'Llargada' in s:
        langs_with_duration += 1
    if 'Glotalitzacio' in s:
        langs_with_glotalization += 1
    if 'Alliberament' in s:
        langs_with_lateralrelease += 1

    html_table.append('<tr>')
    for attr in s.split(','):
        html_table.append('<td>{}</td>'.format(attr.title()))
    
else:
    html_table.append('</table></font>')

display(HTML(''.join(html_table)))

print('Labialitzacio: {} {:.2%}'.format(langs_with_labialitzation, langs_with_labialitzation / len(inventories)))
print('Aspiracio: {} {:.2%}'.format(langs_with_aspiration, langs_with_aspiration / len(inventories)))
print('Palatalitzacio: {} {:.2%}'.format(langs_with_palatalitzation, langs_with_palatalitzation / len(inventories)))
print('Duracio: {} {:.2%}'.format(langs_with_duration, langs_with_duration / len(inventories)))
print('Glotalitzacio: {} {:.2%}'.format(langs_with_glotalization, langs_with_glotalization / len(inventories)))
print('Alliberament lateral: {} {:.2%}'.format(langs_with_lateralrelease, langs_with_lateralrelease / len(inventories)))
LlenguaSistema secundari
Awtu Aspiració
Auyana Allargament
Comanche Labialització
Dadibi Aspiració
Dani Labialització
Ekari Alliberament Lateral
Fuzhou Aspiració
Gaviao Do Para Aspiració
Guajajara Labialització
Kayabi Labialització
Kitsijis Aspiració
Karajo Aspiració
Krinkati-Tinbira Aspiració
Kuikura-Kalapalo Palatalització
Northern Paiute Labialització
Pompeian Labialització
Sanuma Aspiració
Shawnee Llargada
Shirihana Aspiració
Wantoat Labialització
Wariwari Labialització / Glotalitzacio
Yawa Palatalització
Labialitzacio: 8 5.00% Aspiracio: 9 5.62% Palatalitzacio: 2 1.25% Duracio: 1 0.62% Glotalitzacio: 1 0.62% Alliberament lateral: 1 0.62%

Presència de fonemes

all_consonants = []
for inventory in inventories:
    for consonant in inventory['Segments']:
        all_consonants.append(consonant)

all_consonants = sorted(all_consonants)
all_consonants_count = []
counted = []
for consonant in all_consonants:
    if consonant not in counted:
        counted.append(consonant)
        count = all_consonants.count(consonant)
        all_consonants_count.append([consonant, count,
                                     '{:.2%}'.format(count / len(inventories))])

all_consonants_count.sort(key=lambda f: f[1], reverse=True)
all_consonants_uniq = [c[0] for c in all_consonants_count]

html_table = ['<table>']
html_table.append('<tr><td>Fonema</td><td>Ocurrències</td><td>Percentatge</td></tr>')

for consonant in all_consonants_count:
    html_table.append('<tr>')
    for attribute in consonant:
        html_table.append('<td>{}</td>'.format(attribute))
    
    html_table.append('</tr>')
else:
    html_table.append('</table></font>')

display(HTML(''.join(html_table)))
FonemaOcurrènciesPercentatge
k15194.38%
m14389.38%
p13282.50%
w12578.12%
n11773.12%
t11471.25%
j10867.50%
s8855.00%
h8251.25%
b5936.88%
ɾ5936.88%
ʔ5836.25%
ŋ5333.12%
l4930.63%
d4729.38%
t̠ʃ4326.88%
ɡ4226.25%
3723.12%
r2817.50%
ɲ2817.50%
2616.25%
f2515.62%
2113.12%
β1811.25%
ʃ148.75%
116.88%
x116.88%
ɸ116.88%
c106.25%
106.25%
ts106.25%
d̠ʒ95.62%
85.00%
mb85.00%
ŋɡ85.00%
74.38%
ɾ̪74.38%
*R̪63.75%
ɟ63.75%
ɣ63.75%
dz53.12%
v53.12%
z53.12%
kp42.50%
nd42.50%
42.50%
n̪d̪42.50%
42.50%
ɻ42.50%
θ42.50%
31.88%
31.88%
ð31.88%
ɺ31.88%
ʒ31.88%
21.25%
21.25%
d̪z̪21.25%
21.25%
t̪s̪21.25%
t̪ʰ21.25%
ç21.25%
ŋʷ21.25%
ɗ21.25%
ɹ21.25%
ɺ̪21.25%
ɽ21.25%
ʂ21.25%
ʝ21.25%
*R10.62%
bv10.62%
bz10.62%
10.62%
10.62%
10.62%
10.62%
10.62%
10.62%
10.62%
10.62%
10.62%
10.62%
n̠d̠ʒ10.62%
n̪z̪10.62%
ps10.62%
10.62%
10.62%
ts͇10.62%
t̪s̪ʰ10.62%
t̪ʙ10.62%
10.62%
10.62%
ŋɡʷ10.62%
ɓ10.62%
ɟʝ10.62%
ɡb10.62%
ɡˡ10.62%
ɥ10.62%
ɦ10.62%
ɬ10.62%
ɬ̪10.62%
ɭ͓10.62%
ɮ10.62%
ɰ10.62%
ɲɟ10.62%
ʈʂ10.62%
ʍ10.62%
ʟ10.62%
10.62%
print(len(all_consonants_uniq))
109
  • hem de mirar obstruents, quantes d'elles són sordes i sonores
  • de les obstruents quantes oclusives i sordes i sonores
  • presència d'africades i les seves qualitats
  • nasals

Obstruents

langs_with_obstruents = []
for inventory in inventories:
    obstruents_voiced = []
    obstruents_voiceless = []

    for segment in inventory['Segments']:
        if features_d[segment]['sonorant'] is False:
            if is_voiced(segment):
                obstruents_voiced.append(segment)
            else:
                obstruents_voiceless.append(segment)

    else:
        langs_with_obstruents.append({inventory['LanguageName']: [obstruents_voiced, obstruents_voiceless]})

html_table = ['<font face="Doulos SIL" size=4em><table>']
html_table.append('<tr><td>Llengua</td><td>obstruents sonores</td><td>obstruents sordes</td><td>total (sonores + sordes)</td>')
for lang in langs_with_obstruents:
    for inv in lang:
        voiced_inv = lang[inv][0]
        voiceless_inv = lang[inv][1]
        joined_inv = list(voiced_inv + voiceless_inv)
        
        html_table.append('<tr>')
        html_table.append('<td>{}</td>'.format(inv))
        html_table.append('<td>{}</td>'.format(' '.join(voiced_inv)))
        html_table.append('<td>{}</td>'.format(' '.join(voiceless_inv)))
        html_table.append('<td>{}</td>'.format("{} ({} + {})".format(len(joined_inv),
                                                                     len(voiced_inv),
                                                                     len(voiceless_inv))))

        #for item in sorted(lang[inv]):
        #    html_table.append('<td>{}</td>'.format(item))
        html_table.append('</tr>')
else:
    html_table.append('</table></font>')

display(HTML(''.join(html_table)))
Llenguaobstruents sonoresobstruents sordestotal (sonores + sordes)
Abauh k p s4 (0 + 4)
Acheβ d̠ʒt̠ʃ k p t̪6 (2 + 4)
Aguarunaʃ h k ts p s t t̠ʃ ʔ9 (0 + 9)
Ainuh k p s t̠ʃ t6 (0 + 6)
Akawaiod̪ z̪ ɡ bs̪ k p t̪8 (4 + 4)
Akurioʔ t̠ʃ k p t5 (0 + 5)
Alabamabk ɬ̪ p s t̪ h ɸ t̠ʃ9 (1 + 8)
Amahuacaʔ s̪ t̠ʃ θ h k p t̪ x9 (0 + 9)
Amanabɡ bh k f p s t8 (2 + 6)
Angaatihaʔ k p t̠ʃ t5 (0 + 5)
Aoɭ͓ zcç k p s t ʔ8 (2 + 6)
Apalaízʃ k p s t ʔ7 (1 + 6)
Apinayeʒ vʔ s̪ k p t̠ʃ t8 (2 + 6)
Arabelaʃ s̪ h k p t̪6 (0 + 6)
Arára, Parák p t̠ʃ t4 (0 + 4)
Arikapút̠ʃ h k p t ʔ6 (0 + 6)
Asmatʝf k p s t̠ʃ t7 (1 + 6)
Auɣk p s t5 (1 + 4)
Aucaɡ b dk p t6 (3 + 3)
Auyanaʔ k p t4 (0 + 4)
Awa Pitʒ zʃ ɬ k p s t̪8 (2 + 6)
Awtuwdpʰ tʰ kʰ4 (1 + 3)
Bainingɣk p s t5 (1 + 4)
Bandjalangɡ b d d̠ʒ4 (4 + 0)
Barasanoɡ b dk p s t h8 (3 + 5)
Bariaiɡ b dk p s t7 (3 + 4)
Baríb dh k s t6 (2 + 4)
Barugaβ d̠ʒ ɡ ɣ b dk s t ɸ10 (6 + 4)
Bésɨroβʃ ʂ t̠ʃ c k p s t ʔ10 (1 + 9)
Biakβ b df k p s t8 (3 + 5)
Bialib dk f p s t h8 (2 + 6)
Biloxidc p h k s t x8 (1 + 7)
Binandereβ ɡ b dk p t7 (4 + 3)
Binumarienk t p s ʔ ɸ6 (0 + 6)
Blackfootʔ t̪ t̠ʃ h k p s x8 (0 + 8)
Bororoɡ b d̪ d̠ʒp t̪ t̠ʃ k8 (4 + 4)
Cacuaʍ ʔ k p t̠ʃ t h7 (0 + 7)
Canelaʔ t̠ʃ h k p t6 (0 + 6)
Carijonad̠ʒ ɡ b dt̠ʃ h k s t9 (4 + 5)
Cherokeeɡ d dzʃ h ʔ6 (3 + 3)
Chuaveɡ b df k s t7 (3 + 4)
Comancheh k p s t̪ ʔ kʷ t̪s̪8 (0 + 8)
Crowʃ s̪ t̠ʃ t̪ h k p x8 (0 + 8)
Cubeod̠ β b d ðp x k t̠ʃ t10 (5 + 5)
Dadibikʰ pʰ h k tʰ p s t8 (0 + 8)
Daniʔ s̪ kʷ h k p t̪7 (0 + 7)
Deraɡ b d̪k p t̪6 (3 + 3)
Dyirbalɡ b ɟ d4 (4 + 0)
Efikb df k s kp t7 (2 + 5)
Ekariɡˡ b dk p t6 (3 + 3)
Endoc k p s t5 (0 + 5)
Faiwolɡ b df k s t7 (3 + 4)
Fasuɸ h k p s t6 (0 + 6)
Fuzhous̪ kʰ t̪ t̪ʰ t̪s̪ pʰ k p x t̪s̪ʰ10 (0 + 10)
Gadsupd βk t p ʔ6 (2 + 4)
Gavião do Parákʰ t̠ʃ h k p t6 (0 + 6)
Golinɡ b dk p s t7 (3 + 4)
Guajajarazʔ ts kʷ t̪ h k p8 (1 + 7)
Gugu-Yalandyic k p t̪4 (0 + 4)
Hawaiiank p ʔ h4 (0 + 4)
Huronh k s x ʔ θ t7 (0 + 7)
Ikpengɡk p t t̠ʃ5 (1 + 4)
Imondaɡ b df h k p s t9 (3 + 6)
Ingarikók p s t ʔ5 (0 + 5)
Irarutuʝk s̪ t̪ ɸ5 (1 + 4)
Isakab dk p s t ɸ7 (2 + 5)
Iwamh p s t k5 (0 + 5)
Jabutíβ d̠ʒ bzps t̠ʃ h k p t9 (3 + 6)
Jamamadíb d ɟh k s t ɸ8 (3 + 5)
Kaiabiɡʔ kʷ k p s t ɸ8 (1 + 7)
Karajáɗ b dθ h k6 (3 + 3)
Karitiana; Karitiânak p s t h5 (0 + 5)
Katukínab d d̠ʒh k p t̠ʃ t8 (3 + 5)
Kaxuiânah k p s t t̠ʃ ʔ7 (0 + 7)
Kikambaβ ðk s t5 (2 + 3)
Kipsigistʰ kʰ t̠ʃ ç h p s7 (0 + 7)
Klaoɡb d̪ ɟʝ bcç s̪ t̪ f p kp10 (4 + 6)
Koiariɡ b d ðf h k t8 (4 + 4)
Kokama-Kokamillak ts p x t̠ʃ t6 (0 + 6)
Krahôts kʰ h k p t6 (0 + 6)
Krinkati-Timbirakʰ t̠ʃ h k p t6 (0 + 6)
Kuikúro-Kalapálodʲ ɣts h k p s t8 (2 + 6)
Kuotɡ b df k p s t8 (3 + 5)
Letiβ dk p s t6 (2 + 4)
Macushiʔ k p s t5 (0 + 5)
Malakmalakk p t t̠4 (0 + 4)
Manamɡ b d zp k s t8 (4 + 4)
Maorif h k p t5 (0 + 5)
Mapoyoh k p s t ʔ6 (0 + 6)
Maxakalik p t̠ʃ t h ʔ6 (0 + 6)
Mianminɡ b df h k s t8 (3 + 5)
Mixed̪ ʒ ɡ vʃ ts͇ ʔ s̪ k p t̪11 (4 + 7)
Namiak p t3 (0 + 3)
Nandic k p s t5 (0 + 5)
Nankinaɡ b d β dzk ts p t9 (5 + 4)
Nasioibp k t̪ ʔ5 (1 + 4)
Nateniɟ b dc f h k p s kp t11 (3 + 8)
Ngombaɡ bv dz dk p t7 (4 + 3)
Nimboranɡ b d̪s̪ k p t̪ h8 (3 + 5)
Ningilɡʔ k p s t ɸ7 (1 + 6)
North Marquesanvʔ ç f h k p s t9 (1 + 8)
Northern Paiuteʔ ts kʷ t̠ʃ h p s t k9 (0 + 9)
Nukakɟ ɡ b dʔ c h k p t10 (4 + 6)
Nɔmaa (NɔmaáNdɛ́)c f k p s t h7 (0 + 7)
Oneidaʔ h k s t̠ʃ t6 (0 + 6)
Oro Winβk p s t ʔ6 (1 + 5)
Orokaivaɡ b d dzh k p s t9 (4 + 5)
Palauand̪ bʔ t̪ k s6 (2 + 4)
Panaráh k p s t ʔ6 (0 + 6)
Pémonoh p s t k ʔ6 (0 + 6)
Pirahaɡ bs̪ k p t̪ ʔ h8 (2 + 6)
Pohnpeianpʷ k p s t̪ ʈʂ6 (0 + 6)
Puinaveh k p s ʔ t6 (0 + 6)
Rikbaktsab dʃ t̠ʃ h k p t8 (2 + 6)
Rorobh k p t̪ ʔ6 (1 + 5)
Rotokasɡ βk p t5 (2 + 3)
Sabaneɗ ɓk s p h ʔ t8 (2 + 6)
Sabaotbk s t̠ʃ t5 (1 + 4)
Samoɡ b df h k s t8 (3 + 5)
Sanuma; Sanumátʰ ts h k p s t7 (0 + 7)
Sebeis̪ c p t̪ k5 (0 + 5)
Seimatt̪ h k p s x6 (0 + 6)
Selarub df k s t h ʔ8 (2 + 6)
Senecab d̪z̪h k s̪ t̪ ʔ7 (2 + 5)
Sentanif h k p t̪6 (1 + 5)
Shanenawaʂ f h k ts p s t̠ʃ t9 (0 + 9)
Shawiβʃ h k p s ʔ t̠ʃ t9 (1 + 8)
Shawneeʃ p k kː t̠ʃ t θ ʔ8 (0 + 8)
Shirianaʃ s̪ t̠ʃ t̪ʰ h k p t̪8 (0 + 8)
Shuarʃ ts t̠ʃ k p s t h8 (0 + 8)
Skouɟ bf h k p t7 (2 + 5)
Southern Kiwaiɡ b d̪s̪ k p t̪ ʔ8 (3 + 5)
Southern Nuautlh k p s t ʔ6 (0 + 6)
Suenaɡ b d̪ d̪z̪s̪ k p t̪8 (4 + 4)
Suyád̠ʒ ɣt̠ʃ k p s t7 (2 + 5)
Taoripif k p t̪ h s̪6 (0 + 6)
Taushiroh k kʷ ʔ x t̠ʃ t7 (0 + 7)
Tetunb d̪s̪ k f p t̪ ʔ h9 (2 + 7)
Tigakɡ b ɮ βp k s t8 (4 + 4)
Tinputzβʔ h k p s t7 (1 + 6)
Tiwiɣk p t̪ t5 (1 + 4)
Tongan; Tongavf h k p s t̪ ʔ8 (1 + 7)
Trióh k p s t5 (0 + 5)
Usanɡ b dp s t ʔ7 (3 + 4)
Vanimod̠ β b d ɦp s t8 (5 + 3)
Waamab dc k f p s kp t9 (2 + 7)
Waiwaiʃ h k s t ɸ t̠ʃ7 (0 + 7)
Wantoatt̪ s̪ kʷ k p5 (0 + 5)
Waoraniɡ b dk p t6 (3 + 3)
Wari; Wari'; Wariʔ; Oro Naot̺ h k hʷ p kʷ ʔ t̠ʃ8 (0 + 8)
Warihioʔ h k p s t̠ʃ t7 (0 + 7)
Warisβs̪ k p t̪ x6 (1 + 5)
Wik-Munkanp t k t̠ ʔ5 (0 + 5)
Yabaranah k p s t5 (0 + 5)
Yagariaɡ b d vh k p s t ʔ10 (4 + 6)
Yarebaɡ b d dzk s t ɸ8 (4 + 4)
Yawab d d̠ʒsʲ k p s t8 (3 + 5)
Yekwanaʔ t̠ʃ h k s t6 (0 + 6)
Yidinyɡ b d ɟ4 (4 + 0)
Yilɡk p s t5 (1 + 4)

Oclusives

langs_with_plosives = []
more_voiceless_plosives = 0
for inventory in inventories:
    plosives_voiced = []
    plosives_voiceless = []

    for segment in inventory['Segments']:
        if is_plosive(segment):
            if is_voiced(segment):
                plosives_voiced.append(segment)
            else:
                plosives_voiceless.append(segment)

    else:
        langs_with_plosives.append({inventory['LanguageName']: [plosives_voiced, plosives_voiceless]})

html_table = ['<table>']
html_table.append('<tr><td>Llengua</td><td>plosives sonores</td><td>plosives sordes</td><td>total (sonores + sordes)</td>')
for lang in langs_with_plosives:
    for inv in lang:
        voiced_inv = lang[inv][0]
        voiceless_inv = lang[inv][1]
        joined_inv = list(voiced_inv + voiceless_inv)
        
        if len(voiceless_inv) > len(voiced_inv):
            more_voiceless_plosives += 1
        
        html_table.append('<tr>')
        html_table.append('<td>{}</td>'.format(inv))
        html_table.append('<td>{}</td>'.format(' '.join(voiced_inv)))
        html_table.append('<td>{}</td>'.format(' '.join(voiceless_inv)))
        html_table.append('<td>{}</td>'.format("{} ({} + {})".format(len(joined_inv),
                                                                     len(voiced_inv),
                                                                     len(voiceless_inv))))

        #for item in sorted(lang[inv]):
        #    html_table.append('<td>{}</td>'.format(item))
        html_table.append('</tr>')
else:
    html_table.append('</table></font>')

display(HTML(''.join(html_table)))

print('El nombre d’oclusives sordes és normalment major o igual al d’oclusives sonores: {:.2%} ({} / {})'.format(more_voiceless_plosives / len(langs_with_plosives),
                                           more_voiceless_plosives, len(langs_with_plosives)))
Llenguaplosives sonoresplosives sordestotal (sonores + sordes)
Abauk p2 (0 + 2)
Achek p t̪3 (0 + 3)
Aguarunak p t ʔ4 (0 + 4)
Ainuk p t3 (0 + 3)
Akawaiod̪ ɡ bk p t̪6 (3 + 3)
Akurioʔ k p t4 (0 + 4)
Alabamabk p t̪4 (1 + 3)
Amahuacaʔ k p t̪4 (0 + 4)
Amanabɡ bk p t5 (2 + 3)
Angaatihaʔ k p t4 (0 + 4)
Aok p t ʔ4 (0 + 4)
Apalaík p t ʔ4 (0 + 4)
Apinayeʔ k p t4 (0 + 4)
Arabelak p t̪3 (0 + 3)
Arára, Parák p t3 (0 + 3)
Arikapúk p t ʔ4 (0 + 4)
Asmatk p t3 (0 + 3)
Auk p t3 (0 + 3)
Aucaɡ b dk p t6 (3 + 3)
Auyanaʔ k p t4 (0 + 4)
Awa Pitk p t̪3 (0 + 3)
Awtuwdpʰ tʰ kʰ4 (1 + 3)
Bainingk p t3 (0 + 3)
Bandjalangɡ b d3 (3 + 0)
Barasanoɡ b dk p t6 (3 + 3)
Bariaiɡ b dk p t6 (3 + 3)
Baríb dk t4 (2 + 2)
Barugaɡ b dk t5 (3 + 2)
Bésɨroc k p t ʔ5 (0 + 5)
Biakb dk p t5 (2 + 3)
Bialib dk p t5 (2 + 3)
Biloxidc p k t5 (1 + 4)
Binandereɡ b dk p t6 (3 + 3)
Binumarienk t p ʔ4 (0 + 4)
Blackfootʔ t̪ k p4 (0 + 4)
Bororoɡ b d̪p t̪ k6 (3 + 3)
Cacuaʔ k p t4 (0 + 4)
Canelaʔ k p t4 (0 + 4)
Carijonaɡ b dk t5 (3 + 2)
Cherokeeɡ dʔ3 (2 + 1)
Chuaveɡ b dk t5 (3 + 2)
Comanchek p t̪ ʔ kʷ5 (0 + 5)
Crowt̪ k p3 (0 + 3)
Cubeod̠ b dp k t6 (3 + 3)
Dadibikʰ pʰ k tʰ p t6 (0 + 6)
Daniʔ kʷ k p t̪5 (0 + 5)
Deraɡ b d̪k p t̪6 (3 + 3)
Dyirbalɡ b ɟ d4 (4 + 0)
Efikb dk kp t5 (2 + 3)
Ekariɡˡ b dk p t6 (3 + 3)
Endoc k p t4 (0 + 4)
Faiwolɡ b dk t5 (3 + 2)
Fasuk p t3 (0 + 3)
Fuzhoukʰ t̪ t̪ʰ pʰ k p6 (0 + 6)
Gadsupdk t p ʔ5 (1 + 4)
Gavião do Parákʰ k p t4 (0 + 4)
Golinɡ b dk p t6 (3 + 3)
Guajajaraʔ kʷ t̪ k p5 (0 + 5)
Gugu-Yalandyic k p t̪4 (0 + 4)
Hawaiiank p ʔ3 (0 + 3)
Huronk ʔ t3 (0 + 3)
Ikpengɡk p t4 (1 + 3)
Imondaɡ b dk p t6 (3 + 3)
Ingarikók p t ʔ4 (0 + 4)
Irarutuk t̪2 (0 + 2)
Isakab dk p t5 (2 + 3)
Iwamp t k3 (0 + 3)
Jabutík p t3 (0 + 3)
Jamamadíb d ɟk t5 (3 + 2)
Kaiabiɡʔ kʷ k p t6 (1 + 5)
Karajáɗ b dk4 (3 + 1)
Karitiana; Karitiânak p t3 (0 + 3)
Katukínab dk p t5 (2 + 3)
Kaxuiânak p t ʔ4 (0 + 4)
Kikambak t2 (0 + 2)
Kipsigistʰ kʰ p3 (0 + 3)
Klaoɡb d̪ bt̪ p kp6 (3 + 3)
Koiariɡ b dk t5 (3 + 2)
Kokama-Kokamillak p t3 (0 + 3)
Krahôkʰ k p t4 (0 + 4)
Krinkati-Timbirakʰ k p t4 (0 + 4)
Kuikúro-Kalapálok p t4 (1 + 3)
Kuotɡ b dk p t6 (3 + 3)
Letidk p t4 (1 + 3)
Macushiʔ k p t4 (0 + 4)
Malakmalakk p t t̠4 (0 + 4)
Manamɡ b dp k t6 (3 + 3)
Maorik p t3 (0 + 3)
Mapoyok p t ʔ4 (0 + 4)
Maxakalik p t ʔ4 (0 + 4)
Mianminɡ b dk t5 (3 + 2)
Mixed̪ ɡʔ k p t̪6 (2 + 4)
Namiak p t3 (0 + 3)
Nandic k p t4 (0 + 4)
Nankinaɡ b dk p t6 (3 + 3)
Nasioibp k t̪ ʔ5 (1 + 4)
Nateniɟ b dc k p kp t8 (3 + 5)
Ngombaɡ dk p t5 (2 + 3)
Nimboranɡ b d̪k p t̪6 (3 + 3)
Ningilɡʔ k p t5 (1 + 4)
North Marquesanʔ k p t4 (0 + 4)
Northern Paiuteʔ kʷ p t k5 (0 + 5)
Nukakɟ ɡ b dʔ c k p t9 (4 + 5)
Nɔmaa (NɔmaáNdɛ́)c k p t4 (0 + 4)
Oneidaʔ k t3 (0 + 3)
Oro Wink p t ʔ4 (0 + 4)
Orokaivaɡ b dk p t6 (3 + 3)
Palauand̪ bʔ t̪ k5 (2 + 3)
Panarák p t ʔ4 (0 + 4)
Pémonop t k ʔ4 (0 + 4)
Pirahaɡ bk p t̪ ʔ6 (2 + 4)
Pohnpeianpʷ k p t̪4 (0 + 4)
Puinavek p ʔ t4 (0 + 4)
Rikbaktsab dk p t5 (2 + 3)
Rorobk p t̪ ʔ5 (1 + 4)
Rotokasɡk p t4 (1 + 3)
Sabaneɗ ɓk p ʔ t6 (2 + 4)
Sabaotbk t3 (1 + 2)
Samoɡ b dk t5 (3 + 2)
Sanuma; Sanumátʰ k p t4 (0 + 4)
Sebeic p t̪ k4 (0 + 4)
Seimatt̪ k p3 (0 + 3)
Selarub dk t ʔ5 (2 + 3)
Senecabk t̪ ʔ4 (1 + 3)
Sentanik p t̪4 (1 + 3)
Shanenawak p t3 (0 + 3)
Shawik p ʔ t4 (0 + 4)
Shawneep k kː t ʔ5 (0 + 5)
Shirianat̪ʰ k p t̪4 (0 + 4)
Shuark p t3 (0 + 3)
Skouɟ bk p t5 (2 + 3)
Southern Kiwaiɡ b d̪k p t̪ ʔ7 (3 + 4)
Southern Nuautlk p t ʔ4 (0 + 4)
Suenaɡ b d̪k p t̪6 (3 + 3)
Suyák p t3 (0 + 3)
Taoripik p t̪3 (0 + 3)
Taushirok kʷ ʔ t4 (0 + 4)
Tetunb d̪k p t̪ ʔ6 (2 + 4)
Tigakɡ bp k t5 (2 + 3)
Tinputzʔ k p t4 (0 + 4)
Tiwik p t̪ t4 (0 + 4)
Tongan; Tongak p t̪ ʔ4 (0 + 4)
Triók p t3 (0 + 3)
Usanɡ b dp t ʔ6 (3 + 3)
Vanimod̠ b dp t5 (3 + 2)
Waamab dc k p kp t7 (2 + 5)
Waiwaik t2 (0 + 2)
Wantoatt̪ kʷ k p4 (0 + 4)
Waoraniɡ b dk p t6 (3 + 3)
Wari; Wari'; Wariʔ; Oro Naot̺ k p kʷ ʔ5 (0 + 5)
Warihioʔ k p t4 (0 + 4)
Warisk p t̪3 (0 + 3)
Wik-Munkanp t k t̠ ʔ5 (0 + 5)
Yabaranak p t3 (0 + 3)
Yagariaɡ b dk p t ʔ7 (3 + 4)
Yarebaɡ b dk t5 (3 + 2)
Yawab dk p t5 (2 + 3)
Yekwanaʔ k t3 (0 + 3)
Yidinyɡ b d ɟ4 (4 + 0)
Yilɡk p t4 (1 + 3)
El nombre d’oclusives sordes és normalment major o igual al d’oclusives sonores: 77.50% (124 / 160)

Fricatives

langs_with_fricatives = []
for inventory in inventories:
    fricatives_voiced = []
    fricatives_voiceless = []

    for segment in inventory['Segments']:
        if is_fricative(segment):
            if is_voiced(segment):
                fricatives_voiced.append(segment)
            else:
                fricatives_voiceless.append(segment)

    else:
        langs_with_fricatives.append({inventory['LanguageName']: [fricatives_voiced, fricatives_voiceless]})

html_table = ['<font face="Doulos SIL" size=4em><table>']
html_table.append('<tr><td>Llengua</td><td>fricatives sonores</td><td>fricatives sordes</td><td>total (sonores + sordes)</td>')
for lang in langs_with_fricatives:
    for inv in lang:
        voiced_inv = lang[inv][0]
        voiceless_inv = lang[inv][1]
        joined_inv = list(voiced_inv + voiceless_inv)
        
        html_table.append('<tr>')
        html_table.append('<td>{}</td>'.format(inv))
        html_table.append('<td>{}</td>'.format(' '.join(voiced_inv)))
        html_table.append('<td>{}</td>'.format(' '.join(voiceless_inv)))
        html_table.append('<td>{}</td>'.format("{} ({} + {})".format(len(joined_inv),
                                                                     len(voiced_inv),
                                                                     len(voiceless_inv))))

        #for item in sorted(lang[inv]):
        #    html_table.append('<td>{}</td>'.format(item))
        html_table.append('</tr>')
else:
    html_table.append('</table></font>')

display(HTML(''.join(html_table)))
Llenguafricatives sonoresfricatives sordestotal (sonores + sordes)
Abauh s2 (0 + 2)
Acheβ1 (1 + 0)
Aguarunaʃ h s3 (0 + 3)
Ainuh s2 (0 + 2)
Akawaio2 (1 + 1)
Akurio0 (0 + 0)
Alabamaɬ̪ s h ɸ4 (0 + 4)
Amahuacas̪ θ h x4 (0 + 4)
Amanabh f s3 (0 + 3)
Angaatiha0 (0 + 0)
Aoɭ͓ zs3 (2 + 1)
Apalaízʃ s3 (1 + 2)
Apinayeʒ v3 (2 + 1)
Arabelaʃ s̪ h3 (0 + 3)
Arára, Pará0 (0 + 0)
Arikapúh1 (0 + 1)
Asmatʝf s3 (1 + 2)
Auɣs2 (1 + 1)
Auca0 (0 + 0)
Auyana0 (0 + 0)
Awa Pitʒ zʃ ɬ s5 (2 + 3)
Awtuw0 (0 + 0)
Bainingɣs2 (1 + 1)
Bandjalang0 (0 + 0)
Barasanos h2 (0 + 2)
Bariais1 (0 + 1)
Baríh s2 (0 + 2)
Barugaβ ɣs ɸ4 (2 + 2)
Bésɨroβʃ ʂ s4 (1 + 3)
Biakβf s3 (1 + 2)
Bialif s h3 (0 + 3)
Biloxih s x3 (0 + 3)
Binandereβ1 (1 + 0)
Binumariens ɸ2 (0 + 2)
Blackfooth s x3 (0 + 3)
Bororo0 (0 + 0)
Cacuaʍ h2 (0 + 2)
Canelah1 (0 + 1)
Carijonah s2 (0 + 2)
Cherokeeʃ h2 (0 + 2)
Chuavef s2 (0 + 2)
Comancheh s2 (0 + 2)
Crowʃ s̪ h x4 (0 + 4)
Cubeoβ ðx3 (2 + 1)
Dadibih s2 (0 + 2)
Danis̪ h2 (0 + 2)
Dera0 (0 + 0)
Dyirbal0 (0 + 0)
Efikf s2 (0 + 2)
Ekari0 (0 + 0)
Endos1 (0 + 1)
Faiwolf s2 (0 + 2)
Fasuɸ h s3 (0 + 3)
Fuzhous̪ x2 (0 + 2)
Gadsupβ1 (1 + 0)
Gavião do Paráh1 (0 + 1)
Golins1 (0 + 1)
Guajajarazh2 (1 + 1)
Gugu-Yalandyi0 (0 + 0)
Hawaiianh1 (0 + 1)
Huronh s x θ4 (0 + 4)
Ikpeng0 (0 + 0)
Imondaf h s3 (0 + 3)
Ingarikós1 (0 + 1)
Irarutuʝs̪ ɸ3 (1 + 2)
Isakas ɸ2 (0 + 2)
Iwamh s2 (0 + 2)
Jabutíβ bzps h4 (2 + 2)
Jamamadíh s ɸ3 (0 + 3)
Kaiabis ɸ2 (0 + 2)
Karajáθ h2 (0 + 2)
Karitiana; Karitiânas h2 (0 + 2)
Katukínah1 (0 + 1)
Kaxuiânah s2 (0 + 2)
Kikambaβ ðs3 (2 + 1)
Kipsigisç h s3 (0 + 3)
Klaos̪ f2 (0 + 2)
Koiariðf h3 (1 + 2)
Kokama-Kokamillax1 (0 + 1)
Krahôh1 (0 + 1)
Krinkati-Timbirah1 (0 + 1)
Kuikúro-Kalapáloɣh s3 (1 + 2)
Kuotf s2 (0 + 2)
Letiβs2 (1 + 1)
Macushis1 (0 + 1)
Malakmalak0 (0 + 0)
Manamzs2 (1 + 1)
Maorif h2 (0 + 2)
Mapoyoh s2 (0 + 2)
Maxakalih1 (0 + 1)
Mianminf h s3 (0 + 3)
Mixeʒ vʃ s̪4 (2 + 2)
Namia0 (0 + 0)
Nandis1 (0 + 1)
Nankinaβ1 (1 + 0)
Nasioi0 (0 + 0)
Natenif h s3 (0 + 3)
Ngomba0 (0 + 0)
Nimborans̪ h2 (0 + 2)
Ningils ɸ2 (0 + 2)
North Marquesanvç f h s5 (1 + 4)
Northern Paiuteh s2 (0 + 2)
Nukakh1 (0 + 1)
Nɔmaa (NɔmaáNdɛ́)f s h3 (0 + 3)
Oneidah s2 (0 + 2)
Oro Winβs2 (1 + 1)
Orokaivah s2 (0 + 2)
Palauans1 (0 + 1)
Panaráh s2 (0 + 2)
Pémonoh s2 (0 + 2)
Pirahas̪ h2 (0 + 2)
Pohnpeians1 (0 + 1)
Puinaveh s2 (0 + 2)
Rikbaktsaʃ h2 (0 + 2)
Roroh1 (0 + 1)
Rotokasβ1 (1 + 0)
Sabanes h2 (0 + 2)
Sabaots1 (0 + 1)
Samof h s3 (0 + 3)
Sanuma; Sanumáh s2 (0 + 2)
Sebei1 (0 + 1)
Seimath s x3 (0 + 3)
Selaruf s h3 (0 + 3)
Senecah s̪2 (0 + 2)
Sentanif h2 (0 + 2)
Shanenawaʂ f h s4 (0 + 4)
Shawiβʃ h s4 (1 + 3)
Shawneeʃ θ2 (0 + 2)
Shirianaʃ s̪ h3 (0 + 3)
Shuarʃ s h3 (0 + 3)
Skouf h2 (0 + 2)
Southern Kiwai1 (0 + 1)
Southern Nuautlh s2 (0 + 2)
Suena1 (0 + 1)
Suyáɣs2 (1 + 1)
Taoripif h s̪3 (0 + 3)
Taushiroh x2 (0 + 2)
Tetuns̪ f h3 (0 + 3)
Tigakɮ βs3 (2 + 1)
Tinputzβh s3 (1 + 2)
Tiwiɣ1 (1 + 0)
Tongan; Tongavf h s4 (1 + 3)
Trióh s2 (0 + 2)
Usans1 (0 + 1)
Vanimoβ ɦs3 (2 + 1)
Waamaf s2 (0 + 2)
Waiwaiʃ h s ɸ4 (0 + 4)
Wantoat1 (0 + 1)
Waorani0 (0 + 0)
Wari; Wari'; Wariʔ; Oro Naoh hʷ2 (0 + 2)
Warihioh s2 (0 + 2)
Warisβs̪ x3 (1 + 2)
Wik-Munkan0 (0 + 0)
Yabaranah s2 (0 + 2)
Yagariavh s3 (1 + 2)
Yarebas ɸ2 (0 + 2)
Yawasʲ s2 (0 + 2)
Yekwanah s2 (0 + 2)
Yidiny0 (0 + 0)
Yils1 (0 + 1)

Nasals

langs_with_nasals = []
for inventory in inventories:
    nasals = []
    for segment in inventory['Segments']:
        try:
            if is_nasal(segment):
                nasals.append(segment)
        except KeyError:
            pass
    else:
        langs_with_nasals.append({inventory['LanguageName']: sorted(nasals)})

html_table = ['<font face="Doulos SIL" size=4em><table>']
html_table.append('<tr><td>Llengua</td><td>no. de nasals</td><td colspan=0>Nasals</td></tr>')
for lang in langs_with_nasals:
    for inv in sorted(lang):
        html_table.append('<tr>')
        html_table.append('<td>{}</td>'.format(inv))
        html_table.append('<td>{}</td>'.format(len(lang[inv])))
        for item in sorted(lang[inv]):
            html_table.append('<td>{}</td>'.format(item))
        html_table.append('</tr>')
else:
    html_table.append('</table></font>')

display(HTML(''.join(html_table)))
Llenguano. de nasalsNasals
Abau2mn
Ache4mmbn̪d̪ŋɡ
Aguaruna2mn
Ainu2mn
Akawaio2m
Akurio2mn
Alabama2m
Amahuaca2m
Amanab3mnŋ
Angaatiha4mnŋɲ
Ao3mnŋ
Apalaí2mn
Apinaye4mbndŋɡɲɟ
Arabela2m
Arára, Pará3mnŋ
Arikapú2mn
Asmat2mn
Au2mn
Auca4mnŋɲ
Auyana4mn
Awa Pit3mnŋ
Awtuw3mnŋ
Baining6mmbnndŋŋɡ
Bandjalang4mnŋ
Barasano0
Bariai3mnŋ
Barí3mnɲ
Baruga2mn
Bésɨro3mnɲ
Biak2mn
Biali2mn
Biloxi2mn
Binandere2mn
Binumarien2mn
Blackfoot2mn
Bororo2m
Cacua3mnŋ
Canela4mnŋɲ
Carijona3mnɲ
Cherokee2mn
Chuave2mn
Comanche2mn
Crow0
Cubeo0
Dadibi2mn
Dani2m
Dera3mŋ
Dyirbal4mnŋɲ
Efik4mnŋɲ
Ekari2mn
Endo4mnŋɲ
Faiwol2mn
Fasu2mn
Fuzhou3mŋ
Gadsup2m
Gavião do Pará2mn
Golin2mn
Guajajara4mnŋŋʷ
Gugu-Yalandyi4mŋɲ
Hawaiian2m
Huron1n
Ikpeng3mnŋ
Imonda2mn
Ingarikó2mn
Irarutu5mmbn̪d̪ŋɡ
Isaka0
Iwam3mnŋ
Jabutí2mn
Jamamadí2mn
Kaiabi3mnŋ
Karajá0
Karitiana; Karitiâna4mnŋɲ
Katukína3mnɲ
Kaxuiâna2mn
Kikamba4mnŋɲ
Kipsigis4mnŋɲ
Klao0
Koiari2mn
Kokama-Kokamilla2mn
Krahô3mnŋ
Krinkati-Timbira2mn
Kuikúro-Kalapálo4mnŋɲ
Kuot3mnŋ
Leti2mn
Macushi2mn
Malakmalak4mnŋ
Manam3mnŋ
Maori3mnŋ
Mapoyo3mnɲ
Maxakali4mbndn̠d̠ʒŋɡ
Mianmin3mnŋ
Mixe2mn
Namia2mn
Nandi4mnŋɲ
Nankina3mnŋ
Nasioi2m
Nateni0
Ngomba0
Nimboran3mŋ
Ningil3mnŋ
North Marquesan2mn
Northern Paiute3mnŋ
Nukak0
Nɔmaa (NɔmaáNdɛ́)4mnŋɲ
Oneida1n
Oro Win2mn
Orokaiva3mnŋ
Palauan2mŋ
Panará2mn
Pémono3mnɲ
Piraha0
Pohnpeian4mŋ
Puinave2mn
Rikbaktsa2mn
Roro2m
Rotokas0
Sabane2mn
Sabaot4mnŋɲ
Samo1m
Sanuma; Sanumá2mn
Sebei4mŋɲ
Seimat3mnŋ
Selaru2mn
Seneca2m
Sentani2m
Shanenawa2mn
Shawi2mn
Shawnee2mn
Shiriana2m
Shuar2mn
Skou2mn
Southern Kiwai2m
Southern Nuautl2mn
Suena2m
Suyá4mnŋɲ
Taoripi1m
Taushiro2nɲ
Tetun2m
Tigak3mnŋ
Tinputz2mn
Tiwi4mnŋ
Tongan; Tonga3mŋ
Trió2mn
Usan5mmbnndŋɡ
Vanimo3mn
Waama2mn
Waiwai3mnɲ
Wantoat8mmbn̪d̪ŋŋɡŋɡʷŋʷ
Waorani4mnŋɲ
Wari; Wari'; Wariʔ; Oro Nao4mn
Warihio2mn
Waris3mbn̪d̪ŋɡ
Wik-Munkan4mnŋ
Yabarana3mnɲ
Yagaria2mn
Yareba2mn
Yawa3mn
Yekwana3mnɲ
Yidiny4mnŋɲ
Yil3mnŋ

Líquides

Codi per comprovar els universals

  • Gairebé totes les llengües tenen almenys una líquida.
  • Les lengües amb dues o més líquides generalment tenen una lateral i el contrast lateral/no lateral.
langs_with_liquides = []
at_least_one_liquid = 0
at_least_two_liquid = 0
has_laterality_contrast = 0
for inventory in inventories:
    liquides = []
    laterality = []
    for segment in inventory['Segments']:
        try:
            if is_liquid(segment):
                laterality.append(features_d[segment]['lateral'])
                liquides.append(segment)
        except KeyError:
            pass
        
    else:
        if len(liquides) >= 1:
            at_least_one_liquid += 1
        
        if len(liquides) >= 2:
            at_least_two_liquid += 1
            if laterality.count(True) > 0 and laterality.count(False) > 0:
                has_laterality_contrast += 1
            
        langs_with_liquides.append({inventory['LanguageName']: sorted(liquides)})

html_table = ['<font face="Doulos SIL" size=4em><table>']
html_table.append('<tr><td>Llengua</td><td>Numero de liquides</td><td colspan=0>Liquides</td></tr>')
for lang in langs_with_liquides:
    for inv in sorted(lang):
        html_table.append('<tr>')
        html_table.append('<td>{}</td>'.format(inv))
        html_table.append('<td>{}</td>'.format(len(lang[inv])))
        for item in sorted(lang[inv]):
            html_table.append('<td>{}</td>'.format(item))
        html_table.append('</tr>')
else:
    html_table.append('</table></font>')

display(HTML(''.join(html_table)))

print("Tenen almenys, una líquida: {:2%} ({} / {})".format(at_least_one_liquid / len(inventories),
                                                         at_least_one_liquid,
                                                         len(inventories)))

print('{} {} {:.2%} ({} / {})'.format('Les lengües amb dues o més líquides generalment',
                                      'tenen una lateral i lateralitat contrastiva',
                                       has_laterality_contrast / at_least_two_liquid,
                                       has_laterality_contrast, at_least_two_liquid))
LlenguaNumero de liquidesLiquides
Abau1ɾ
Ache1ɺ̪
Aguaruna1ɾ
Ainu1ɾ
Akawaio1*R̪
Akurio1ɾ
Alabama1
Amahuaca1ɾ̪
Amanab1r
Angaatiha1ɺ
Ao1l
Apalaí1ɾ
Apinaye1ɽ
Arabela1
Arára, Pará2lɾ
Arikapú1ɾ
Asmat1ɾ
Au1ɾ
Auca0
Auyana1ɾ
Awa Pit1l
Awtuw2lɾ
Baining2lɾ
Bandjalang2lr
Barasano1ɾ
Bariai2lr
Barí1r
Baruga1ɾ
Bésɨro1ɾ
Biak2lr
Biali2lɾ
Biloxi0
Binandere1ɾ
Binumarien1r
Blackfoot1l
Bororo1*R̪
Cacua1l
Canela1ɾ
Carijona1ɾ
Cherokee1l
Chuave1ɾ
Comanche0
Crow0
Cubeo1ɺ̪
Dadibi1ɾ
Dani1
Dera0
Dyirbal3lrɻ
Efik0
Ekari0
Endo2lr
Faiwol1l
Fasu1ɾ
Fuzhou1
Gadsup0
Gavião do Pará1ɾ
Golin2lr
Guajajara1ɾ
Gugu-Yalandyi3*R̪ɻ
Hawaiian1
Huron1r
Ikpeng2lɾ
Imonda2lr
Ingarikó1ɾ
Irarutu1ɾ̪
Isaka0
Iwam1*R
Jabutí1ɾ
Jamamadí1ɾ
Kaiabi1ɾ
Karajá2lɾ
Karitiana; Karitiâna1ɾ
Katukína1l
Kaxuiâna1ɾ
Kikamba1l
Kipsigis2lr
Klao0
Koiari1ɾ
Kokama-Kokamilla1ɾ
Krahô1l
Krinkati-Timbira1ɾ
Kuikúro-Kalapálo1l
Kuot2lr
Leti2lr
Macushi1ɾ
Malakmalak3lr
Manam2lɾ
Maori1ɾ
Mapoyo1ɾ
Maxakali0
Mianmin0
Mixe0
Namia2lr
Nandi2lɾ
Nankina0
Nasioi1ɾ̪
Nateni0
Ngomba0
Nimboran1*R̪
Ningil2lr
North Marquesan1r
Northern Paiute0
Nukak1ɾ
Nɔmaa (NɔmaáNdɛ́)1l
Oneida1l
Oro Win2t̪ʙɾ
Orokaiva0
Palauan2lr
Panará1ɾ
Pémono1ɾ
Piraha0
Pohnpeian2r
Puinave0
Rikbaktsa2ɽɾ
Roro1ɾ̪
Rotokas1
Sabane1l
Sabaot2lr
Samo1l
Sanuma; Sanumá1l
Sebei3ɾ̪
Seimat1l
Selaru2lr
Seneca0
Sentani0
Shanenawa1ɾ
Shawi1ɾ
Shawnee1l
Shiriana1ɾ̪
Shuar1ɾ
Skou2lr
Southern Kiwai1*R̪
Southern Nuautl2lr
Suena1ɾ̪
Suyá1ɾ
Taoripi1
Taushiro1ɾ
Tetun2
Tigak1r
Tinputz1l
Tiwi3lɻɾ
Tongan; Tonga1ɺ
Trió1ɾ
Usan0
Vanimo1l
Waama0
Waiwai2ɺɾ
Wantoat0
Waorani0
Wari; Wari'; Wariʔ; Oro Nao1ɾ
Warihio1ɾ
Waris2*R̪
Wik-Munkan2lr
Yabarana1ɾ
Yagaria1ʟ
Yareba1ɾ
Yawa1ɾ
Yekwana1ɾ
Yidiny3lrɻ
Yil2lr
Tenen almenys, una líquida: 83.750000% (134 / 160) Les lengües amb dues o més líquides generalment tenen una lateral i lateralitat contrastiva 94.74% (36 / 38)

Comprovació dels universals de jerarquies

Totes les consonants

langs_hierarchy = []
for inventory in inventories:
    subsystems = []

    dentoalveolars = [segment for segment in inventory['Segments'] if features_d[segment]['coronal'] and not features_d[segment]['dorsal']]
    subsystems.append(dentoalveolars)

    labials = [segment for segment in inventory['Segments'] if features_d[segment]['labial']]
    subsystems.append(labials)

    velars = [segment for segment in inventory['Segments'] if features_d[segment]['dorsal'] and features_d[segment]['high'] and not features_d[segment]['continuant']]
    subsystems.append(velars)

    palatals = [segment for segment in inventory['Segments'] if features_d[segment]['coronal'] is True and features_d[segment]['dorsal'] is True]
    subsystems.append(palatals)
    
    langs_hierarchy.append({inventory['LanguageName']: subsystems})


html_table = ['<table>']

# Build header
html_table.append('<tr>')
for header in ['Llengua', 'Alveolars', 'Labials', 'Velars',
               'Palatals', 'Jerarquia (a &gt; l &gt; v  &gt; p)']:
    
    html_table.append('<td>{}</td>'.format(header))
    
else:
    html_table.append('<tr>')

# Add contents
for lang in langs_hierarchy:
    for inv in lang:
        if len(lang[inv][0]) == 0 and len(lang[inv][1]) == 0 and len(lang[inv][2]) == 0 and  len(lang[inv][3]) == 0:
            continue

        html_table.append('<tr>')
        html_table.append('<td>{}</td>'.format(inv))
        
        for item in lang[inv]:
            html_table.append('<td>{} [ {} ]</td>'.format(len(item), ' '.join(item)))
        
        follows_hierarchy = len(lang[inv][0]) >= len(lang[inv][1]) and len(lang[inv][1]) >= len(lang[inv][2])
        html_table.append('<td>{}<td>'.format("si" if follows_hierarchy else "no"))

    else:
        html_table.append('</tr>')
else:
    html_table.append('</table></font>')

display(HTML(''.join(html_table)))
LlenguaAlveolarsLabialsVelarsPalatalsJerarquia (a > l > v > p)
Abau3 [ n s ɾ ]3 [ m p w ]1 [ k ]0 [ ]si
Ache5 [ d̠ʒ t̠ʃ ɺ̪ n̪d̪ t̪ ]4 [ β mb m p ]2 [ ŋɡ k ]0 [ ]si
Aguaruna7 [ ʃ ɾ ts s t n t̠ʃ ]2 [ m p ]1 [ k ]0 [ ]si
Ainu5 [ n s t̠ʃ t ɾ ]3 [ m p w ]1 [ k ]0 [ ]si
Akawaio6 [ d̪ *R̪ s̪ z̪ n̪ t̪ ]4 [ b m p w ]2 [ ɡ k ]0 [ ]si
Akurio4 [ t̠ʃ n t ɾ ]3 [ m p w ]1 [ k ]0 [ ]si
Alabama6 [ n̪ l̪ ɬ̪ s t̪ t̠ʃ ]5 [ b m p w ɸ ]1 [ k ]0 [ ]si
Amahuaca6 [ s̪ t̠ʃ ɾ̪ θ n̪ t̪ ]3 [ m p w ]1 [ k ]0 [ ]si
Amanab4 [ n s r t ]5 [ b f m p w ]3 [ ɡ k ŋ ]0 [ ]no
Angaatiha4 [ n t̠ʃ t ɺ ]3 [ m p w ]3 [ ɲ ŋ k ]1 [ ɲ ]si
Ao6 [ l s n t ɭ͓ z ]3 [ w m p ]3 [ cç k ŋ ]1 [ cç ]si
Apalaí6 [ ʃ n s t z ɾ ]3 [ m p w ]1 [ k ]0 [ ]si
Apinaye6 [ ʒ nd s̪ t̠ʃ t ɽ ]3 [ mb p v ]3 [ ɲɟ ŋɡ k ]1 [ ɲɟ ]si
Arabela5 [ ʃ s̪ n̪ t̪ r̪ ]3 [ m p w ]1 [ k ]0 [ ]si
Arára, Pará5 [ l n ɾ t̠ʃ t ]3 [ m p w ]2 [ ŋ k ]0 [ ]si
Arikapú4 [ t̠ʃ n t ɾ ]3 [ m p w ]1 [ k ]0 [ ]si
Asmat5 [ n s t̠ʃ t ɾ ]4 [ f m p w ]1 [ k ]1 [ ʝ ]si
Au4 [ n s t ɾ ]3 [ m p w ]1 [ k ]0 [ ]si
Auca3 [ d n t ]4 [ b m p w ]4 [ ŋ ɲ ɡ k ]1 [ ɲ ]no
Auyana4 [ n t nː ɾ ]4 [ m p w mː ]1 [ k ]0 [ ]si
Awa Pit8 [ ʃ ɬ ʒ l n s t̪ z ]3 [ m p w ]2 [ ŋ k ]0 [ ]si
Awtuw5 [ d l tʰ n ɾ ]3 [ pʰ m w ]2 [ ŋ kʰ ]0 [ ]si
Baining6 [ nd l n s t ɾ ]4 [ mb m p w ]3 [ ŋɡ ŋ k ]0 [ ]si
Bandjalang6 [ d n̠ l n r d̠ʒ ]3 [ b m w ]2 [ ɡ ŋ ]0 [ ]si
Barasano4 [ d s t ɾ ]3 [ b p w ]2 [ ɡ k ]0 [ ]si
Bariai6 [ d l n s r t ]3 [ b m p ]3 [ ɡ k ŋ ]0 [ ]si
Barí5 [ d n s r t ]2 [ b m ]2 [ ɲ k ]1 [ ɲ ]si
Baruga6 [ d̠ʒ d n s t ɾ ]4 [ β b m ɸ ]2 [ ɡ k ]0 [ ]si
Bésɨro7 [ ʃ ʂ t̠ʃ n s t ɾ ]3 [ β m p ]3 [ c k ɲ ]2 [ c ɲ ]si
Biak6 [ d l n s r t ]6 [ β b f m p w ]1 [ k ]0 [ ]si
Biali6 [ d l n s t ɾ ]5 [ b f m p w ]1 [ k ]0 [ ]si
Biloxi4 [ d n s t ]3 [ p m w ]2 [ c k ]1 [ c ]si
Binandere4 [ d n t ɾ ]4 [ β b m p ]2 [ ɡ k ]0 [ ]si
Binumarien4 [ t s r n ]4 [ m p w ɸ ]1 [ k ]0 [ ]si
Blackfoot5 [ t̪ t̠ʃ l n s ]3 [ m p w ]1 [ k ]0 [ ]si
Bororo6 [ n̪ d̪ *R̪ t̪ d̠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m p v ]2 [ ɡ k ]0 [ ]si
Namia4 [ l n r t ]3 [ m p w ]1 [ k ]0 [ ]si
Nandi5 [ l n s t ɾ ]3 [ m p w ]4 [ ŋ c k ɲ ]2 [ c ɲ ]no
Nankina5 [ d ts n dz t ]5 [ b m p β w ]3 [ ɡ k ŋ ]0 [ ]si
Nasioi3 [ n̪ ɾ̪ t̪ ]3 [ b p m ]1 [ k ]0 [ ]si
Nateni3 [ d s t ]5 [ b f p kp w ]4 [ c ɟ k kp ]2 [ c ɟ ]no
Ngomba3 [ dz d t ]3 [ bv p w ]2 [ ɡ k ]0 [ ]si
Nimboran5 [ n̪ d̪ s̪ *R̪ t̪ ]3 [ b m p ]3 [ ɡ k ŋ ]0 [ ]si
Ningil5 [ l n s r t ]4 [ m p w ɸ ]3 [ ŋ ɡ k ]0 [ ]si
North Marquesan4 [ n s r t ]4 [ f m p v ]1 [ k ]1 [ ç ]si
Northern Paiute5 [ ts t̠ʃ n s t ]4 [ kʷ m p w ]3 [ kʷ ŋ k ]0 [ ]si
Nukak3 [ d t ɾ ]3 [ b p w ]4 [ ɟ ɡ c k ]2 [ ɟ c ]no
Nɔmaa (NɔmaáNdɛ́)4 [ l n s t ]4 [ f m p w ]4 [ ŋ c k ɲ ]2 [ c ɲ ]si
Oneida5 [ l n s t̠ʃ t ]0 [ ]1 [ k ]0 [ ]no
Oro Win5 [ n s t t̪ʙ ɾ ]5 [ m p β w t̪ʙ ]1 [ k ]0 [ ]si
Orokaiva5 [ d n s dz t ]3 [ b m p ]3 [ ɡ k ŋ ]0 [ ]si
Palauan5 [ d̪ t̪ l s r ]2 [ b m ]2 [ ŋ k ]0 [ ]si
Panará4 [ n s t ɾ ]3 [ m p w ]1 [ k ]0 [ ]si
Pémono4 [ n s t ɾ ]3 [ m p w ]2 [ ɲ k ]1 [ ɲ ]si
Piraha2 [ s̪ t̪ ]2 [ b p ]2 [ ɡ k ]0 [ ]si
Pohnpeian6 [ n̪ l̪ s r t̪ ʈʂ ]5 [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Wari; Wari'; Wariʔ; Oro Nao5 [ t̺ nˀ n t̠ʃ ɾ ]6 [ mˀ m hʷ p kʷ w ]2 [ k kʷ ]0 [ ]no
Warihio5 [ n s t̠ʃ t ɾ ]3 [ m p w ]1 [ k ]0 [ ]si
Waris5 [ *R̪ s̪ n̪d̪ l̪ t̪ ]4 [ β mb p w ]2 [ ŋɡ k ]0 [ ]si
Wik-Munkan6 [ n̠ l n r t t̠ ]3 [ m p w ]2 [ ŋ k ]0 [ ]si
Yabarana4 [ n s t ɾ ]3 [ m p w ]2 [ k ɲ ]1 [ ɲ ]si
Yagaria4 [ d n s t ]4 [ b m p v ]2 [ ɡ k ]0 [ ]si
Yareba6 [ d n s dz t ɾ ]4 [ b m w ɸ ]2 [ ɡ k ]0 [ ]si
Yawa6 [ d n d̠ʒ s ɾ t ]4 [ b m p w ]2 [ k nʲ ]2 [ sʲ nʲ ]si
Yekwana5 [ t̠ʃ n s t ɾ ]2 [ m w ]2 [ k ɲ ]1 [ ɲ ]si
Yidiny5 [ d l n r ɻ ]3 [ b m w ]4 [ ɡ ŋ ɲ ɟ ]2 [ ɲ ɟ ]no
Yil5 [ l n s r t ]3 [ m p w ]3 [ ŋ ɡ k ]0 [ ]si

Oclusives

Jerarquia de les oclusives

langs_plosive_hierarchy = []
for inventory in inventories:
    subsystems = []

    dentoalveolars = [segment for segment in inventory['Segments'] if is_plosive(segment) and features_d[segment]['coronal'] and not features_d[segment]['dorsal']]
    subsystems.append(dentoalveolars)

    labials = [segment for segment in inventory['Segments'] if is_plosive(segment) and features_d[segment]['labial']]
    subsystems.append(labials)

    velars = [segment for segment in inventory['Segments'] if is_plosive(segment) and features_d[segment]['dorsal'] and features_d[segment]['high'] and not features_d[segment]['continuant']]
    subsystems.append(velars)

    palatals = [segment for segment in inventory['Segments'] if is_plosive(segment) and features_d[segment]['coronal'] is True and features_d[segment]['dorsal'] is True]
    subsystems.append(palatals)
    
    langs_plosive_hierarchy.append({inventory['LanguageName']: subsystems})


html_table = ['<table>']

# Build header
html_table.append('<tr>')
for header in ['Llengua', 'Oclusives alveolars', 'Oclusives labials', 'Oclusives Velars',
               'Oclusives Palatals', 'Jerarquia oclusives (a &gt; l &gt; v  &gt; p)']:
    
    html_table.append('<td>{}</td>'.format(header))
    
else:
    html_table.append('<tr>')

# Add contents
followers = 0

for lang in langs_plosive_hierarchy:
    for inv in lang:
        if len(lang[inv][0]) == 0 and len(lang[inv][1]) == 0 and len(lang[inv][2]) == 0 and  len(lang[inv][3]) == 0:
            continue
        html_table.append('<tr>')
        html_table.append('<td>{}</td>'.format(inv))
        
        for item in lang[inv]:
            html_table.append('<td>{} [ {} ]</td>'.format(len(item), ' '.join(item)))
        
        follows_hierarchy = len(lang[inv][0]) >= len(lang[inv][1]) and len(lang[inv][1]) >= len(lang[inv][2])
        if follows_hierarchy:
            followers +=1 
            
        html_table.append('<td>{}<td>'.format("si" if follows_hierarchy else "no"))

    else:
        html_table.append('</tr>')
else:
    html_table.append('</table></font>')

display(HTML(''.join(html_table)))
print('Followers: {:.2%} ({} / {})'.format(followers / len(inventories), followers, len(inventories)))
LlenguaOclusives alveolarsOclusives labialsOclusives VelarsOclusives PalatalsJerarquia oclusives (a > l > v > p)
Abau0 [ ]1 [ p ]1 [ k ]0 [ ]no
Ache1 [ t̪ ]1 [ p ]1 [ k ]0 [ ]si
Aguaruna1 [ t ]1 [ p ]1 [ k ]0 [ ]si
Ainu1 [ t ]1 [ p ]1 [ k ]0 [ ]si
Akawaio2 [ d̪ t̪ ]2 [ b p ]2 [ ɡ k ]0 [ ]si
Akurio1 [ t ]1 [ p ]1 [ k ]0 [ ]si
Alabama1 [ t̪ ]2 [ b p ]1 [ k ]0 [ ]no
Amahuaca1 [ t̪ ]1 [ p ]1 [ k ]0 [ ]si
Amanab1 [ t ]2 [ b p ]2 [ ɡ k ]0 [ ]no
Angaatiha1 [ t ]1 [ p ]1 [ k ]0 [ ]si
Ao1 [ t ]1 [ p ]1 [ k ]0 [ ]si
Apalaí1 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d t ]3 [ b p kp ]3 [ c k kp ]1 [ c ]no
Waiwai1 [ t ]0 [ ]1 [ k ]0 [ ]no
Wantoat1 [ t̪ ]2 [ kʷ p ]2 [ kʷ k ]0 [ ]no
Waorani2 [ d t ]2 [ b p ]2 [ ɡ k ]0 [ ]si
Wari; Wari'; Wariʔ; Oro Nao1 [ t̺ ]2 [ p kʷ ]2 [ k kʷ ]0 [ ]no
Warihio1 [ t ]1 [ p ]1 [ k ]0 [ ]si
Waris1 [ t̪ ]1 [ p ]1 [ k ]0 [ ]si
Wik-Munkan2 [ t t̠ ]1 [ p ]1 [ k ]0 [ ]si
Yabarana1 [ t ]1 [ p ]1 [ k ]0 [ ]si
Yagaria2 [ d t ]2 [ b p ]2 [ ɡ k ]0 [ ]si
Yareba2 [ d t ]1 [ b ]2 [ ɡ k ]0 [ ]no
Yawa2 [ d t ]2 [ b p ]1 [ k ]0 [ ]si
Yekwana1 [ t ]0 [ ]1 [ k ]0 [ ]no
Yidiny1 [ d ]1 [ b ]2 [ ɡ ɟ ]1 [ ɟ ]no
Yil1 [ t ]1 [ p ]2 [ ɡ k ]0 [ ]no
Followers: 63.75% (102 / 160)

Jerarquia de les africades

langs_affricate_hierarchy = []
for inventory in inventories:
    subsystems = []
    
    palatals = [segment for segment in inventory['Segments'] if is_affricate(segment) and not features_d[segment]['anterior'] and features_d[segment]['coronal'] and not features_d[segment]['dorsal']]
    subsystems.append(palatals)

    dentoalveolars = [segment for segment in inventory['Segments'] if is_affricate(segment) and features_d[segment]['anterior'] and features_d[segment]['coronal'] and not features_d[segment]['dorsal']]
    subsystems.append(dentoalveolars)

    labials = [segment for segment in inventory['Segments'] if is_affricate(segment) and features_d[segment]['labial']]
    subsystems.append(labials)

    velars = [segment for segment in inventory['Segments'] if is_affricate(segment) and features_d[segment]['dorsal'] and features_d[segment]['high'] and not features_d[segment]['continuant']]
    subsystems.append(velars)
    
    langs_affricate_hierarchy.append({inventory['LanguageName']: subsystems})


html_table = ['<table>']

# Build header
html_table.append('<tr>')
for header in ['Llengua', 'Africades palatals', 'Africades dentoalveolars', 'Africades Velars',
               'Africades labials', 'Africades (p &gt; d &gt; v  &gt; l)']:
    
    html_table.append('<td>{}</td>'.format(header))
    
else:
    html_table.append('<tr>')

# Add contents
followers = 0
candidates = 0
for lang in langs_affricate_hierarchy:
    for inv in lang:
        if len(lang[inv][0]) == 0 and len(lang[inv][1]) == 0 and len(lang[inv][2]) == 0 and  len(lang[inv][3]) == 0:
            continue
        else:
            candidates += 1
            
        html_table.append('<tr>')
        html_table.append('<td>{}</td>'.format(inv))
        
        for item in lang[inv]:
            html_table.append('<td>{} [ {} ]</td>'.format(len(item), ' '.join(item)))
            
        follows_hierarchy = len(lang[inv][0]) >= len(lang[inv][1]) and len(lang[inv][1]) >= len(lang[inv][2])
        if follows_hierarchy:
            followers +=1
            
        html_table.append('<td>{}<td>'.format("si" if follows_hierarchy else "no"))

    else:
        html_table.append('</tr>')
else:
    html_table.append('</table></font>')

display(HTML(''.join(html_table)))
print('Followers: {:.2%} ({} / {})'.format(followers / candidates, followers, candidates))
LlenguaAfricades palatalsAfricades dentoalveolarsAfricades VelarsAfricades labialsAfricades (p > d > v > l)
Ache2 [ d̠ʒ t̠ʃ ]0 [ ]0 [ ]0 [ ]si
Aguaruna1 [ t̠ʃ ]1 [ ts ]0 [ ]0 [ ]si
Ainu1 [ t̠ʃ ]0 [ ]0 [ ]0 [ ]si
Akurio1 [ t̠ʃ ]0 [ ]0 [ ]0 [ ]si
Alabama1 [ t̠ʃ ]0 [ ]0 [ ]0 [ ]si
Amahuaca1 [ t̠ʃ ]0 [ ]0 [ ]0 [ ]si
Angaatiha1 [ t̠ʃ ]0 [ ]0 [ ]0 [ ]si
Apinaye1 [ t̠ʃ ]0 [ ]0 [ ]0 [ ]si
Arára, Pará1 [ t̠ʃ ]0 [ ]0 [ ]0 [ ]si
Arikapú1 [ t̠ʃ ]0 [ ]0 [ ]0 [ ]si
Asmat1 [ t̠ʃ ]0 [ ]0 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is_fricative(segment) and features_d[segment]['coronal'] and not features_d[segment]['dorsal']]
    subsystems.append(dentoalveolars)

    labials = [segment for segment in inventory['Segments'] if is_fricative(segment) and features_d[segment]['labial']]
    subsystems.append(labials)
    
    palatals = [segment for segment in inventory['Segments'] if is_fricative(segment) and features_d[segment]['coronal'] is True and features_d[segment]['dorsal'] is True]
    subsystems.append(palatals)

    velars = [segment for segment in inventory['Segments'] if is_fricative(segment) and features_d[segment]['dorsal'] and features_d[segment]['high'] and not features_d[segment]['continuant']]
    subsystems.append(velars)
    
    langs_fricative_hierarchy.append({inventory['LanguageName']: subsystems})


html_table = ['<table>']

# Build header
html_table.append('<tr>')
for header in ['Llengua', 'fricatives alveolars', 'fricatives labials', 'fricatives palatals',
               'fricatives velars', 'Jerarquia fricatives (a &gt; l &gt; p  &gt; v)']:
    
    html_table.append('<td>{}</td>'.format(header))
    
else:
    html_table.append('<tr>')

# Add contents
followers = 0
for lang in langs_fricative_hierarchy:
    for inv in lang:
        if len(lang[inv][0]) == 0 and len(lang[inv][1]) == 0 and len(lang[inv][2]) == 0 and  len(lang[inv][3]) == 0:
            continue
        html_table.append('<tr>')
        html_table.append('<td>{}</td>'.format(inv))
        
        for item in lang[inv]:
            html_table.append('<td>{} [ {} ]</td>'.format(len(item), ' '.join(item)))
        
        follows_hierarchy = len(lang[inv][0]) >= len(lang[inv][1]) and len(lang[inv][1]) >= len(lang[inv][2])
        
        if follows_hierarchy:
            followers += 1
            
        html_table.append('<td>{}<td>'.format("si" if follows_hierarchy else "no"))

    else:
        html_table.append('</tr>')
else:
    html_table.append('</table></font>')

display(HTML(''.join(html_table)))
print('Followers: {:.2%} ({} / {})'.format(followers / len(inventories), followers, len(inventories)))
Llenguafricatives alveolarsfricatives labialsfricatives palatalsfricatives velarsJerarquia fricatives (a > l > p > v)
Abau1 [ s ]0 [ ]0 [ ]0 [ ]si
Ache0 [ ]1 [ β ]0 [ ]0 [ ]no
Aguaruna2 [ ʃ s ]0 [ ]0 [ ]0 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]1 [ v ]0 [ ]0 [ ]si
Yareba1 [ s ]1 [ ɸ ]0 [ ]0 [ ]si
Yawa1 [ s ]0 [ ]1 [ sʲ ]0 [ ]no
Yekwana1 [ s ]0 [ ]0 [ ]0 [ ]si
Yil1 [ s ]0 [ ]0 [ ]0 [ ]si
Followers: 68.75% (110 / 160)

Jerarquia de les nasals

# • Nasals:  Dento-alveolar > Labial > Velar > Palatal > Retroflexa.
langs_nasal_hierarchy = []
for inventory in inventories:
    subsystems = []

    dentoalveolars = [segment for segment in inventory['Segments'] if is_nasal(segment) and features_d[segment]['coronal'] and not features_d[segment]['dorsal']]
    subsystems.append(dentoalveolars)

    labials = [segment for segment in inventory['Segments'] if is_nasal(segment) and features_d[segment]['labial']]
    subsystems.append(labials)
    
    velars = [segment for segment in inventory['Segments'] if is_nasal(segment) and features_d[segment]['dorsal'] and features_d[segment]['high'] and not features_d[segment]['continuant'] and features_d[segment]['coronal'] is False ]
    subsystems.append(velars)
    
    palatals = [segment for segment in inventory['Segments'] if is_nasal(segment) and features_d[segment]['coronal'] is True and features_d[segment]['coronal'] is True and features_d[segment]['dorsal'] is True]
    subsystems.append(palatals)
    
    langs_nasal_hierarchy.append({inventory['LanguageName']: subsystems})


html_table = ['<table>']

# Build header
html_table.append('<tr>')
for header in ['Llengua', 'nasals alveolars', 'nasals labials', 'nasals velars',
               'nasals palatals', 'Jerarquia nasals (a &gt; l &gt; p  &gt; v)']:
    
    html_table.append('<td>{}</td>'.format(header))
    
else:
    html_table.append('<tr>')

candidates = 0
followers = 0
# Add contents
for lang in langs_nasal_hierarchy:
    candidates += 1
    
    for inv in lang:
        if len(lang[inv][0]) == 0 and len(lang[inv][1]) == 0 and len(lang[inv][2]) == 0 and  len(lang[inv][3]) == 0:
            continue
        html_table.append('<tr>')
        html_table.append('<td>{}</td>'.format(inv))
        
        for item in lang[inv]:
            html_table.append('<td>{} [ {} ]</td>'.format(len(item), ' '.join(item)))
        
        follows_hierarchy = len(lang[inv][0]) >= len(lang[inv][1]) and len(lang[inv][1]) >= len(lang[inv][2])
        html_table.append('<td>{}<td>'.format("si" if follows_hierarchy else "no"))
        

    else:
        if follows_hierarchy:
            followers += 1
        html_table.append('</tr>')
else:
    html_table.append('</table></font>')

display(HTML(''.join(html_table)))
print('Followers: {:.2%} ({} / {})'.format(followers / candidates, followers, candidates))
Llenguanasals alveolarsnasals labialsnasals velarsnasals palatalsJerarquia nasals (a > l > p > v)
Abau1 [ n ]1 [ m ]0 [ ]0 [ ]si
Ache1 [ n̪d̪ ]2 [ mb m ]1 [ ŋɡ ]0 [ ]no
Aguaruna1 [ n ]1 [ m ]0 [ ]0 [ ]si
Ainu1 [ n ]1 [ m ]0 [ ]0 [ ]si
Akawaio1 [ n̪ ]1 [ m ]0 [ ]0 [ ]si
Akurio1 [ n ]1 [ m ]0 [ ]0 [ ]si
Alabama1 [ n̪ ]1 [ m ]0 [ ]0 [ ]si
Amahuaca1 [ n̪ ]1 [ m ]0 [ ]0 [ ]si
Amanab1 [ n ]1 [ m ]1 [ ŋ ]0 [ ]si
Angaatiha1 [ n ]1 [ m ]1 [ ŋ ]1 [ ɲ ]si
Ao1 [ n ]1 [ m ]1 [ ŋ ]0 [ ]si
Apalaí1 [ n ]1 [ m ]0 [ ]0 [ ]si
Apinaye1 [ nd ]1 [ mb ]1 [ ŋɡ ]1 [ ɲɟ ]si
Arabela1 [ n̪ ]1 [ m ]0 [ ]0 [ ]si
Arára, Pará1 [ n ]1 [ m ]1 [ ŋ ]0 [ ]si
Arikapú1 [ n ]1 [ m ]0 [ ]0 [ ]si
Asmat1 [ n ]1 [ m ]0 [ ]0 [ ]si
Au1 [ n ]1 [ m ]0 [ ]0 [ ]si
Auca1 [ n ]1 [ m ]1 [ ŋ ]1 [ ɲ ]si
Auyana2 [ n nː ]2 [ m mː ]0 [ ]0 [ ]si
Awa Pit1 [ n ]1 [ m ]1 [ ŋ ]0 [ ]si
Awtuw1 [ n ]1 [ m ]1 [ ŋ ]0 [ ]si
Baining2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 [ n ]1 [ m ]0 [ ]0 [ ]si
Waiwai1 [ n ]1 [ m ]0 [ ]1 [ ɲ ]si
Wantoat2 [ n̪ n̪d̪ ]4 [ ŋʷ ŋɡʷ mb m ]4 [ ŋʷ ŋɡʷ ŋɡ ŋ ]0 [ ]no
Waorani1 [ n ]1 [ m ]1 [ ŋ ]1 [ ɲ ]si
Wari; Wari'; Wariʔ; Oro Nao2 [ nˀ n ]2 [ mˀ m ]0 [ ]0 [ ]si
Warihio1 [ n ]1 [ m ]0 [ ]0 [ ]si
Waris1 [ n̪d̪ ]1 [ mb ]1 [ ŋɡ ]0 [ ]si
Wik-Munkan2 [ n̠ n ]1 [ m ]1 [ ŋ ]0 [ ]si
Yabarana1 [ n ]1 [ m ]0 [ ]1 [ ɲ ]si
Yagaria1 [ n ]1 [ m ]0 [ ]0 [ ]si
Yareba1 [ n ]1 [ m ]0 [ ]0 [ ]si
Yawa1 [ n ]1 [ m ]0 [ ]1 [ nʲ ]si
Yekwana1 [ n ]1 [ m ]0 [ ]1 [ ɲ ]si
Yidiny1 [ n ]1 [ m ]1 [ ŋ ]1 [ ɲ ]si
Yil1 [ n ]1 [ m ]1 [ ŋ ]0 [ ]si
Followers: 95.62% (153 / 160)

Comprovació de més universals

Presència o absència de /p t k/

ptk_in_language = 0
langs_with_ptk = []
langs_without_ptk = []
for inventory in inventories:
    inventory_segments = inventory['Segments']
    if 'p' in inventory_segments and 't' in inventory_segments and 'k' in inventory_segments:
        ptk_in_language += 1
        langs_with_ptk.append(inventory['LanguageName'])
    else:
        langs_without_ptk.append(inventory['LanguageName'])

print('Llengües amb /p t k/: {:.2%} ({} de {})'.format(ptk_in_language / len(inventories),
                                                       ptk_in_language,
                                                       len(inventories)))
Llengües amb /p t k/: 58.13% (93 de 160)
africades = []
for inventory in inventories:
    for segment in inventory['Segments']:
        try:
            if features_d[segment]['continuant'] is False \
            and features_d[segment]['sonorant'] is False \
            and features_d[segment]['continuant'] is False \
            and (features_d[segment]['strident'] is True or features_d[segment]['strident']):
            
                africades.append(segment)
        except KeyError:
            pass

africades = collections.Counter(africades)

html_table = ['<font face="Doulos SIL" size=4em><table>']
html_table.append('<tr><td>Fonema</td><td>Ocurrències</td>')
for k, v in africades.items():
    for inv in lang:
        html_table.append('<tr>')
        html_table.append('<td>{}</td><td>{}</td>'.format(k, v))

else:
    html_table.append('</table></font>')

display(HTML(''.join(html_table)))
FonemaOcurrències
ts10
t̠ʃ43
d̠ʒ9
dz5
t̪s̪2
ʈʂ1
d̪z̪2
ts͇1
t̪s̪ʰ1

Comprovació de l'universal "Si només té una africada, generalment és /t̠ʃ/"

followers = 0
possible_followers = 0
for inventory in inventories:
    affricates = [s for s in inventory['Segments'] if is_affricate(s)]
    if len(affricates) == 1:
        possible_followers += 1
        if affricates[0] == 't̠ʃ':
            followers += 1

else:
    print('Segueixen l\'universal {:.2%} ({} de {})'.format(followers / possible_followers,
                                                            followers,
                                                            possible_followers))
Segueixen l'universal 66.67% (32 de 48)

Comprovació de l'universal "El nombre d’africades és menor que el d’oclusives simples."

followers = 0
possible_followers = 0
for inventory in inventories:
    affricates = [s for s in inventory['Segments'] if is_affricate(s)]
    plosives = [s for s in inventory['Segments'] if is_plosive(s)]
    possible_followers += 1
    
    if len(affricates) < len(plosives):
        followers += 1

else:
    print('Segueixen l\'universal {:.2%} ({} de {})'.format(followers / possible_followers,
                                                            followers,
                                                            possible_followers))
Segueixen l'universal 100.00% (160 de 160)

Comprovació de l'universal "Si una llengua té una sola fricativa, generalment és / s / i si no és aquesta sol ser /f/."

followers_1st_part = 0
followers_2nd_part = 0
candidates = 0

for inventory in inventories:
    fricatives = [s for s in inventory['Segments'] if is_fricative(s)]
    
    if len(fricatives) == 1:
        candidates += 1
        if fricatives[0] == 's':
            followers_1st_part += 1
        elif fricatives[0] == 'f':
            followers_2nd_part += 1

else:
    print('Segueixen l\'universal primera part {:.2%} ({} de {})'.format(followers_1st_part / candidates,
                                                            followers_1st_part,
                                                            candidates))
    print('Segueixen l\'universal primera part {:.2%} ({} de {})'.format(followers_2nd_part / candidates,
                                                        followers_2nd_part,
                                                        candidates))
    print('Segueixen l\'universal (total) {:.2%} ({} de {})'.format((followers_1st_part + followers_2nd_part) / candidates,
                                                        (followers_1st_part + followers_2nd_part),
                                                        candidates))
Segueixen l'universal primera part 34.38% (11 de 32) Segueixen l'universal primera part 0.00% (0 de 32) Segueixen l'universal (total) 34.38% (11 de 32)

Comprovació de l'universal "El nombre de fricatives sordes generalment és més gran que el de sonores…"

followers = 0
non_followers = []
candidates = len(langs_with_fricatives)
for lang in langs_with_fricatives:
    for _, v in lang.items():
        if len(v[0]) > 0 or len(v[1]) > 0:
            if len(v[1]) > len(v[0]):
                followers += 1
            else:
                non_followers.append(lang)

else:
    print('Segueixen l\'universal {:.2%} ({} de {})'.format(followers / candidates,
                                                        followers,
                                                        candidates))
    print("No el segueixen:",  non_followers)
Segueixen l'universal 73.12% (117 de 160) No el segueixen: [{'Ache': [['β'], []]}, {'Akawaio': [['z̪'], ['s̪']]}, {'Ao': [['ɭ͓', 'z'], ['s']]}, {'Apinaye': [['ʒ', 'v'], ['s̪']]}, {'Au': [['ɣ'], ['s']]}, {'Baining': [['ɣ'], ['s']]}, {'Baruga': [['β', 'ɣ'], ['s', 'ɸ']]}, {'Binandere': [['β'], []]}, {'Cubeo': [['β', 'ð'], ['x']]}, {'Gadsup': [['β'], []]}, {'Guajajara': [['z'], ['h']]}, {'Jabutí': [['β', 'bz'], ['ps', 'h']]}, {'Kikamba': [['β', 'ð'], ['s']]}, {'Leti': [['β'], ['s']]}, {'Manam': [['z'], ['s']]}, {'Mixe': [['ʒ', 'v'], ['ʃ', 's̪']]}, {'Nankina': [['β'], []]}, {'Oro Win': [['β'], ['s']]}, {'Rotokas': [['β'], []]}, {'Suyá': [['ɣ'], ['s']]}, {'Tigak': [['ɮ', 'β'], ['s']]}, {'Tiwi': [['ɣ'], []]}, {'Vanimo': [['β', 'ɦ'], ['s']]}]

Comprovació de l'universal "El nombre de fricatives improbablement és major que el d’oclusives."

candidates = 0
followers = []
for inventory in inventories:
    fricatives = [s for s in inventory['Segments'] if is_fricative(s)]
    plosives = [s for s in inventory['Segments'] if is_plosive(s)]
    
    if len(fricatives) > 0 or len(plosives) > 0:
        candidates += 1
        if len(fricatives) > len(plosives):
            followers.append(inventory['LanguageName'])
else:
    print('Segueixen l\'universal {:.2%} ({} de {})'.format(len(followers) / candidates,
                                                        len(followers),
                                                        candidates))
    print('Llengües amb més fricatives que oclusives: {}'.format(', '.join(followers)))
Segueixen l'universal 5.62% (9 de 160) Llengües amb més fricatives que oclusives: Awa Pit, Crow, Huron, Irarutu, Jabutí, Kikamba, North Marquesan, Shanenawa, Waiwai

Comprovació dels universals sobre nasals

  1. Preferència per l’articulació dento-alveolar.
  2. Preferència per la sonoritat.
  3. Gairebé totes les llengües tenen almenys una nasal, generalment / n / Si hi ha una segona nasal generalment és /m / però també pot ser / ŋ /
  4. La presència de les nasals complexes implica la de les simples i la presència de nasals sordes implica la de les sonores.

Comprovació de 1

candidates = 0
followers = []
at_least_one_dentoalveolar = 0
not_at_least_one_dentoalveolar = []

for inventory in inventories:
    nasals = [s for s in inventory['Segments'] if is_nasal(s)]
    if len(nasals) == 0:
        continue
    
    candidates += 1
    dentoalveolar = [s for s in nasals if features_d[s]['coronal'] and not features_d[s]['dorsal']]
    not_dentoalveolar = [s for s in nasals if not (features_d[s]['coronal'] and not features_d[s]['dorsal'])]

    """
    print(inventory['LanguageName'])
    print("\tnasals:", nasals)
    print("\tdento:", dentoalveolar)
    print("\tno dento:", not_dentoalveolar)
    """
    
    if len(dentoalveolar) > 0:
        at_least_one_dentoalveolar += 1
    else:
        not_at_least_one_dentoalveolar.append(inventory)
    
    if len(dentoalveolar) >= len(not_dentoalveolar):
        followers.append(inventory['LanguageName'])


print('Tenen, almenys, una nasal dentoalveolar: {:.2%} ({} de {})'.format(at_least_one_dentoalveolar / candidates,
                                                       at_least_one_dentoalveolar,
                                                       candidates))

print('Tenen tantes o més dentoalveolars que no dentoalveolars {:.2%} ({} de {})'.format(len(followers) / candidates,
                                                                                         len(followers),
                                                                                        candidates))    
Tenen, almenys, una nasal dentoalveolar: 97.99% (146 de 149) Tenen tantes o més dentoalveolars que no dentoalveolars 55.70% (83 de 149)

Comprovació de 2

candidates = 0
followers = []
not_followers = []

for inventory in inventories:
    nasals = [s for s in inventory['Segments'] if is_nasal(s)]
    if len(nasals) == 0:
        continue
    
    candidates += 1
    voiced = [s for s in nasals if features_d[s]['periodicGlottalSource']]
    voiceless = [s for s in nasals if not features_d[s]['periodicGlottalSource']]

    if len(voiced) > len(voiceless):
        followers.append(inventory['LanguageName'])
    else:
        not_followers.append(inventory['LanguageName'])


print('Tenen més nasals sonores que sordes: {:.2%} ({} de {})'.format(len(followers) / candidates, len(followers), candidates))
Tenen més nasals sonores que sordes: 100.00% (149 de 149)
candidates = 0
followers_1 = []
followers_2 = []
followers_3 = []
non_followers = []

for inventory in inventories:
    nasals = [s for s in inventory['Segments'] if is_nasal(s)]
    if len(nasals) == 0:
        continue
    
    candidates += 1
    
    if len(nasals) >= 1 and 'n' in nasals:
        followers_1.append(inventory)
    else:
        non_followers.append(inventory)

    if len(nasals) >= 2 and 'n' in nasals and 'ŋ' in nasals:
        followers_2.append(inventory)
        
    elif len(nasals) >= 2 and 'n' in nasals and 'm' in nasals:
        followers_3.append(inventory)
        
    else:
        non_followers.append(inventory)
    
print('Tenen almenys una nasal, /n/. {:.2%} ({} de {})'.format(len(followers_1) / candidates, len(followers_1), candidates))
print('Tenen almenys dues nasals: n i ŋ. {:.2%} ({} de {})'.format(len(followers_2) / candidates, len(followers_2), candidates))
print('Tenen almenys dues nasals: n i m. {:.2%} ({} de {})'.format(len(followers_3) / candidates, len(followers_3), candidates))
Tenen almenys una nasal, /n/. 78.52% (117 de 149) Tenen almenys dues nasals: n i ŋ. 29.53% (44 de 149) Tenen almenys dues nasals: n i m. 46.98% (70 de 149)

Ultra-mega-taula

ZOMG

html_table = ['<font face="Doulos SIL" size=4em><table>']
html_table.append('<tr><td>')

for consonant in all_consonants_uniq:
    html_table.append('<td>{}</td>'.format(consonant))

for inventory in inventories:
    html_table.append('<tr>')
    html_table.append('<td>{}</td>'.format(inventory['LanguageName']))

    count = 0
    for consonant in all_consonants_uniq:
        if consonant in inventory['Segments']:
            html_table.append('<td>X</td>')
            count += 1
        else:
            html_table.append('<td> </td>')
    else:
        html_table.append('<td>{}</td>'.format(count))
        html_table.append('</tr>')
        assert count == len(inventory['Segments'])

html_table.append('</table></font>')  
display(HTML(''.join(html_table)))
kmpwntjshbɾʔŋldt̠ʃɡrɲfβʃxɸctsd̠ʒmbŋɡɾ̪*R̪ɟɣdzvzkpndn̪d̪ɻθðɺʒd̪z̪t̪s̪t̪ʰçŋʷɗɹɺ̪ɽʂʝ*Rbvbzn̠d̠ʒn̪z̪psts͇t̪s̪ʰt̪ʙŋɡʷɓɟʝɡbɡˡɥɦɬɬ̪ɭ͓ɮɰɲɟʈʂʍʟ
AbauXXXXX XXX X 9
AcheXXX X X X X XX X X 11
AguarunaXXX XX XX XX X X X 12
AinuXXXXXXXXX X X 11
AkawaioXXXX X X XX X X X X X 13
AkurioXXXXXXX XX X 10
AlabamaXXXX XXXX X X X X X X 14
AmahuacaXXXX X X X X X X X X X X 14
AmanabXXXXXXXXXX X X X X 14
AngaatihaXXXXXXX XX X X X 12
AoXXXXXXXX XXX X X X 14
ApalaíXXXXXXXX XX X X 12
ApinayeX X X X X X XX X X X X X 13
ArabelaXXXX X X X X X X X 11
Arára, ParáXXXXXXX X XX X 11
ArikapúXXXXXXX X XX X 11
AsmatXXXXXX X X X X X 11
AuXXXXXXXX X X 10
AucaXXXXXX X X X X X 11
AuyanaXXXXXXX XX X X 11
Awa PitXXXXX XX XX X X X X X 14
Awtuw X XX X X XXX X X X 11
BainingXXXXXX X X XX XX X X 14
Bandjalang X XX X X XXX X X X X 12
BarasanoX XX XXXXXX X X 11
BariaiXXX XX X X XXX X X 12
BaríXX XX XXX X XX 10
BarugaXX XXXX XX X X X X X X 14
BésɨroXXX XX X XX X X XX X X 14
BiakXXXXXXXX X XX X X X 14
BialiXXXXXXXXXXX XX X 14
BiloxiXXXXXXXXX X X X 12
BinandereXXX XXX XX X X X 11
BinumarienXXXXXXXX X X X 11
BlackfootXXXXX XXX X X X X X 13
BororoXXXX X X XXX X X X X 13
CacuaXXXXXX X XXX X X 12
CanelaXXXXXXX X XXX X X 13
CarijonaXX XXX XXXX XXX X X 14
Cherokee X XX X X X XX X X X 11
ChuaveXX XXXXX XX X X X 12
ComancheXXXXX XXX X X X X 12
CrowX XX X X X X X X X 10
CubeoX X X X XX X X X X X 11
DadibiXXXXXXXXX X X X X 13
DaniXXXX X X X X X X X X 12
DeraXXXX X X X XX X X 11
Dyirbal X XX X X XXX X XX X X 13
EfikXX XXXXX X X X X X X 13
EkariXXXXXXX X X X 10
EndoXXXXXXXX XX XX X 13
FaiwolXX XXXXX X XX X X 12
FasuXXXXXXXXX X X 11
FuzhouXXX X X X X X X X X XX X 14
GadsupXXX XX X X X X 9
Gavião do ParáXXXXXXX X X X X 11
GolinXXXXXXXX X XX X X 13
GuajajaraXXXXX X XXX X X X X X 14
Gugu-YalandyiXXXX X X X XX XX X X 13
HawaiianXXXX X X X X 8
HuronX XXXXXX X X X X 11
IkpengXXXXXXX X XX XX 12
ImondaXXX XX XXX XX X X X 13
IngarikóXXXXXXXX XX 10
IrarutuXX X X X X X XX X X X 12
IsakaX XX XXX X X X 9
IwamXXXXXXXXX X X 11
JabutíXXXXXXX X X X X X X X 14
JamamadíXX XXX XXXX X X X 12
KaiabiXXXXXXXX XXX X X X 14
KarajáX X XXX XX X X 9
Karitiana; KaritiânaXXXXXX XX X X X 11
KatukínaXXX XX XX XXX X X 12
KaxuiânaXXXXXXXXX XX X 12
KikambaXX XXXXX XX X X X X 13
Kipsigis XXXX XX XX X XX X X X 14
Klao XX X X XX X X X XX 11
KoiariXX XX XXX X X X X 11
Kokama-KokamillaXXXXXXX X X X X 11
KrahôXXXXXXX X XX X X 12
Krinkati-TimbiraXXXXXXX X X X X 11
Kuikúro-KalapáloXXXXXX XX XX X X X X 14
KuotXXX XX X X XXX X X X 13
LetiXXX XX X XX X X 10
MacushiXXXXXXXX XX 10
MalakmalakXXXXXXX XX X X X X X 14
ManamXXX XX X XX XXX X X 13
MaoriXXXXXX X X X X 10
MapoyoXXXXXXXXX XX X 12
MaxakaliX X X X X X XX X X 10
MianminXX XXXXXXX X X X X 13
MixeXXX X X X XX X XX X X X 14
NamiaXXXXXXX X X 9
NandiXXXXXXXX X XX X X 13
NankinaXXXXXXX X X X X X X X 14
NasioiXXX X X X X X 8
NateniX XX XXXXX X X X X X 13
NgombaX XX XX X X X X 9
NimboranXXX XX X XX X X X X 12
NingilXXXXXXXX XXX X X X 14
North MarquesanXXX XX XX X X X X X 12
Northern PaiuteXXXXXXXXX XX X X X 14
NukakX XX X XXXX X X X X 12
Nɔmaa (NɔmaáNdɛ́)XXXXXXXXX XX X X X 14
OneidaX XXXXX X X X X 10
Oro WinXXXXXXXX XX X X 12
OrokaivaXXX XX XXX X X X X 12
PalauanXX X X XXX XX X 10
PanaráXXXXXXXXX XX 11
PémonoXXXXXXXXX XX X 12
PirahaX X XX X XX X 8
PohnpeianXXXX XX X XX X X X X X 14
PuinaveXXX XX XX X 8
RikbaktsaXXXXXXX XXX XX X X 14
RoroXXX XX X X X X 9
RotokasX X X X X X6
SabaneXXXXXXXXX X X X X 13
SabaotXX XXXXX X XX X XX 13
SamoXX X XXXXX XX X X 12
Sanuma; SanumáXXXXXX XX X X X 11
SebeiXXXX X X X XX X XX X X 14
SeimatXXXXX XX XX X X 11
SelaruXX XXXXXXX X XX X X 14
SenecaXX X X XX X X X X X 11
SentaniXXXX X X X XX X 10
ShanenawaXXXXXXXXX X X X X X 14
ShawiXXXXXXXXX XX X XX 14
ShawneeXXXXXXX X X X X X X 13
ShirianaXXXX X X X X X X X X X 13
ShuarXXXXXXXXX X X X X 13
SkouXXXXXXX XX X X X X 13
Southern KiwaiXXXX X X XX X X X X 12
Southern NuautlXXXXXXXXX X X X 12
SuenaXXXX X X XX X X X X X 13
SuyáXXXXXX X X X X X X X 13
TaoripiXXX X X XX X 8
TaushiroX XXXX X XX X X X X 12
TetunXXXX XX X X XXX X X X 14
TigakXXX XX X X X X X X X 12
TinputzXXXXXXXXX X X X 12
TiwiXXXXXXX X XX X X X X 14
Tongan; TongaXXX XX XX X XX X X 12
TrióXXXXXXXXX X 10
Usan XXXXXXX X X X X XX X 14
Vanimo XX XX X X XX X X X X 12
WaamaXXXXXXXX X X X X X 13
WaiwaiXX XXXXXX X X X X X X 14
WantoatXXX X X X X XXX X X X X 14
WaoraniXXXXXXX X X X X X 12
Wari; Wari'; Wariʔ; Oro NaoXXXXX X XX X X X X X X 14
WarihioXXXXXXXXX XX X 12
WarisX XX X X XX X X XX X X 13
Wik-MunkanXXXXXXX XXX X X X 13
YabaranaXXXXXXXXX X X 11
YagariaXXX XXXXXX X X X X X 14
YarebaXX XXXXX XX X X X X 13
YawaXXXXXXXX XX X X X X 14
YekwanaXX XXXXXX XX X X 12
Yidiny X XX X X XXX X XX X X 13
YilXXXXXXXX XX X X 12
family_tree = []
for inventory in inventories:
    family = inventory['LanguageFamilyRoot']
    genus = inventory['LanguageFamilyGenus']
    name = inventory['LanguageName']
    
    print('{}\t{}\t{}'.format(family, genus, name))
Sepik Upper Sepik Abau Tupian Tupi-Guaraní Ache Jivaroan Jivaroan Aguaruna Ainu Ainu Ainu Cariban Cariban Akawaio Cariban Cariban Akurio Muskogean Muskogean Alabama Panoan Panoan Amahuaca Border Border Amanab Trans-New Guinea Angan Angaatiha Sino-Tibetan Kuki-Chin Ao Cariban Cariban Apalaí Macro-Ge Ge-Kaingang Apinaye Zaparoan Zaparoan Arabela Cariban Cariban Arára, Pará Jabutí Jabutí Arikapú Trans-New Guinea Asmat-Kamoro Asmat Torricelli Wapei-Palei Au Waorani Waorani Auca Trans-New Guinea Eastern Highlands Auyana Barbacoan Barbacoan Awa Pit Sepik Ram Awtuw Baining-Taulil Baining Baining Australian Pama-Nyungan Bandjalang Tucanoan Tucanoan Barasano Austronesian Oceanic Bariai Chibchan Motilon Barí Trans-New Guinea Binanderean Baruga Chiquito Chiquito Bésɨro Austronesian South Halmahera - West New Guinea Biak Niger-Congo Gur Biali Siouan Siouan Biloxi Trans-New Guinea Binanderean Binandere Trans-New Guinea Eastern Highlands Binumarien Algic Algonquian Blackfoot Macro-Ge Bororo Bororo Cacua-Nukak Cacua-Nukak Cacua Macro-Ge Ge-Kaingang Canela Cariban Cariban Carijona Iroquoian Southern Iroquoian Cherokee Trans-New Guinea Chimbu Chuave Uto-Aztecan Numic Comanche Siouan Siouan Crow Tucanoan Tucanoan Cubeo Teberan-Pawaian Teberan Dadibi Trans-New Guinea Dani Dani Senagi Senagi Dera Australian Pama-Nyungan Dyirbal Niger-Congo Cross River Efik Trans-New Guinea Wissel Lakes-Kemandoga Ekari Eastern Sudanic Nilotic Endo Trans-New Guinea Ok Faiwol Trans-New Guinea Fasu Fasu Sino-Tibetan Chinese Fuzhou Trans-New Guinea Eastern Highlands Gadsup Macro-Ge Ge-Kaingang Gavião do Pará Trans-New Guinea Chimbu Golin Tupian Tupi-Guaraní Guajajara Australian Pama-Nyungan Gugu-Yalandyi Austronesian Oceanic Hawaiian Iroquoian Northern Iroquoian Huron Cariban Cariban Ikpeng Border Border Imonda Cariban Cariban Ingarikó Austronesian South Halmahera - West New Guinea Irarutu Skou Krisa Isaka Sepik Upper Sepik Iwam Jabutí Jabutí Jabutí Arauan Arauan Jamamadí Tupian Tupi-Guaraní Kaiabi Macro-Ge Karajá Karajá Tupian Arikem Karitiana; Karitiâna Katukinan Katukinan Katukína Cariban Cariban Kaxuiâna Niger-Congo Bantoid Kikamba Eastern Sudanic Nilotic Kipsigis Niger-Congo Kru Klao Trans-New Guinea Koiarian Koiari Tupian Tupi-Guaraní Kokama-Kokamilla Macro-Ge Ge-Kaingang Krahô Macro-Ge Ge-Kaingang Krinkati-Timbira Cariban Cariban Kuikúro-Kalapálo Kuot Kuot Kuot Austronesian Central Malayo-Polynesian Leti Cariban Cariban Macushi Australian Northern Daly Malakmalak Austronesian Oceanic Manam Austronesian Oceanic Maori Cariban Cariban Mapoyo Macro-Ge Maxakalí Maxakali Trans-New Guinea Ok Mianmin Mixe-Zoque Mixe-Zoque Mixe Sepik Yellow River Namia Eastern Sudanic Nilotic Nandi Trans-New Guinea Finisterre-Huon Nankina East Bougainville East Bougainville Nasioi Niger-Congo Gur Nateni Trans-New Guinea Madang Ngomba Nimboran Nimboran Nimboran Torricelli Wapei-Palei Ningil Austronesian Oceanic North Marquesan Uto-Aztecan Numic Northern Paiute Cacua-Nukak Cacua-Nukak Nukak Niger-Congo Bantoid Nɔmaa (NɔmaáNdɛ́) Iroquoian Northern Iroquoian Oneida Chapacura-Wanham Chapacura-Wanham Oro Win Trans-New Guinea Binanderean Orokaiva Austronesian Palauan Palauan Macro-Ge Ge-Kaingang Panará Cariban Cariban Pémono Mura Mura Piraha Austronesian Oceanic Pohnpeian Puinave Puinave Puinave Macro-Ge Rikbaktsa Rikbaktsa Austronesian Oceanic Roro West Bougainville West Bougainville Rotokas Nambikuaran Nambikuaran Sabane Eastern Sudanic Nilotic Sabaot East Strickland East Strickland Samo Yanomam Yanomam Sanuma; Sanumá Eastern Sudanic Nilotic Sebei Austronesian Oceanic Seimat Austronesian Central Malayo-Polynesian Selaru Iroquoian Northern Iroquoian Seneca Sentani Sentani Sentani Panoan Panoan Shanenawa Cahuapanan Cahuapanan Shawi Algic Algonquian Shawnee Yanomam Yanomam Shiriana Jivaroan Jivaroan Shuar Skou Western Skou Skou Kiwaian Kiwaian Southern Kiwai Austronesian Central Malayo-Polynesian Southern Nuautl Trans-New Guinea Binanderean Suena Macro-Ge Ge-Kaingang Suyá Eleman Eleman Proper Taoripi Taushiro Taushiro Taushiro Austronesian Central Malayo-Polynesian Tetun Austronesian Oceanic Tigak Austronesian Oceanic Tinputz Australian Tiwian Tiwi Austronesian Oceanic Tongan; Tonga Cariban Cariban Trió Trans-New Guinea Madang Usan Skou Western Skou Vanimo Niger-Congo Gur Waama Cariban Cariban Waiwai Trans-New Guinea Finisterre-Huon Wantoat Waorani Waorani Waorani Chapacura-Wanham Chapacura-Wanham Wari; Wari'; Wariʔ; Oro Nao Uto-Aztecan Tarahumaran Warihio Border Border Waris Australian Pama-Nyungan Wik-Munkan Cariban Cariban Yabarana Trans-New Guinea Eastern Highlands Yagaria Yareban Yareban Yareba Yawa Yawa Yawa Cariban Cariban Yekwana Australian Pama-Nyungan Yidiny Torricelli Wapei-Palei Yil
print('{"type": "FeatureCollection", "features": [')

for inventory in inventories:
    lon, lat = inventory['Longitude'], inventory['Latitude']
    if lon == 'NULL':
        continue
    else:
        lon = lon.replace(':', '.')
        lat = lat.replace(':', '.')

        print('\t{"type": "Feature", "geometry": {"type": "Point",', end='')
        print('"coordinates": ', end='')
        coords = '[{:.3f}, {:.3f}]'.format(float(lon), float(lat))
        print(coords, end='')
        print('}, "properties": {}},')

print('], "properties": {}}')
{"type": "FeatureCollection", "features": [ {"type": "Feature", "geometry": {"type": "Point","coordinates": [141.100, -4.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-55.150, -25.200]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-78.000, -5.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [143.000, 43.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-61.250, 6.300]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-55.400, 3.120]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-94.350, 30.450]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-73.000, -10.300]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [141.100, -3.300]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [146.200, -7.100]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [94.400, 26.350]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-54.450, 1.150]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-47.360, -6.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-75.000, -2.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-53.000, -3.370]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-62.480, -12.250]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [139.100, -5.350]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [142.050, -3.300]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-76.250, -1.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [145.450, -6.350]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-78.050, 1.200]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [141.550, -3.300]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [151.450, -4.200]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [153.000, -28.200]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-70.200, 0.250]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [148.450, -5.350]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-73.100, 8.500]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-60.000, -18.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [136.000, -1.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [1.100, 11.200]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-88.400, 30.300]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [147.550, -8.100]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [146.050, -6.150]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-113.300, 50.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-56.000, -16.450]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-69.550, 1.100]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-45.100, -6.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-72.000, 1.150]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-83.000, 35.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [145.050, -6.150]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-98.300, 34.100]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-107.000, 45.200]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-70.300, 1.300]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [144.350, -6.300]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [139.000, -4.100]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [140.550, -3.300]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [145.300, -17.350]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [8.300, 4.550]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [136.000, -3.450]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [35.350, 1.050]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [141.400, -5.300]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [143.100, -6.250]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [119.300, 26.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [146.000, -6.200]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-49.000, -4.450]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [144.500, -6.150]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-46.200, -5.150]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [145.300, -16.050]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-157.000, 20.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-77.300, 44.200]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-53.250, -11.230]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [141.100, -3.150]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-61.250, 6.300]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [133.300, -3.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [141.200, -2.450]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [141.550, -4.150]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-64.400, -12.030]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-66.150, -7.200]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-57.250, -10.550]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-50.250, -11.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-64.100, -9.200]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-70.200, -8.100]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-55.450, 2.100]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [38.000, -1.300]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-8.350, 5.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [147.300, -9.300]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-74.400, -5.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-47.450, -8.050]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-46.450, -5.500]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-53.150, -12.150]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [151.300, -3.050]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [127.400, -8.100]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-59.150, 4.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [130.450, -13.200]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [145.050, -4.050]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [176.300, -38.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-66.500, 6.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-40.500, -16.550]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [141.300, -4.400]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-96.000, 17.150]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [141.450, -3.500]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [146.300, -5.550]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [155.400, -6.300]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [1.300, 10.200]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [145.400, -5.150]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [140.100, -2.050]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [142.150, -3.300]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-140.300, -8.400]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-118.000, 41.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-71.250, 2.500]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [10.550, 4.350]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-79.550, 43.150]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-64.000, -10.400]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [134.300, 7.100]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-53.000, -10.350]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-62.000, -7.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [158.000, 7.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-68.000, 4.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-58.050, -11.080]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [146.300, -8.400]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [155.050, -6.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-60.200, -12.580]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [34.450, 1.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [142.100, -6.050]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-64.300, 4.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [34.350, 1.200]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [144.100, -1.300]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [130.550, -8.150]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-94.250, 36.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [140.300, -2.350]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-71.450, -9.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-76.550, -5.400]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-96.550, 34.500]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-62.300, 3.450]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-78.000, -2.300]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [140.550, -2.350]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [143.150, -8.350]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [129.050, -3.150]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [147.300, -7.450]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-53.000, -11.300]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [146.150, -8.050]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-75.320, -3.120]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [125.050, -9.200]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [150.550, -2.450]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [155.000, -5.400]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [131.000, -11.400]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-175.150, -21.100]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-56.100, 2.280]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [145.200, -4.500]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [141.200, -2.400]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [1.400, 10.350]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-59.120, 1.230]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [146.300, -6.100]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-76.250, -1.000]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-65.200, -11.150]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-108.500, 27.500]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [141.050, -3.100]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [141.500, -13.400]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-66.150, 5.200]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [145.250, -6.250]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [148.350, -9.300]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [136.150, -1.450]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [-64.300, 5.300]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [146.150, -17.200]}, "properties": {}}, {"type": "Feature", "geometry": {"type": "Point","coordinates": [142.100, -3.250]}, "properties": {}}, ], "properties": {}}
def get_upsid(aggregated, consonants):
    with open(aggregated) as f:
        aggregated_data = [i for i in csv.DictReader(f, delimiter='\t')]

    with open(consonants) as f:
        segments = [segment for segment in csv.DictReader(f, delimiter='\t')]

    inventories = []
    for inventory in aggregated_data:
            inventory['Segments'] = []
            
            if inventory['Source'] == 'UPSID':
                for segment in segments:
                    if inventory['InventoryID'] == segment['InventoryID']:
                        inventory['Segments'].append(segment['Phoneme'])

                for key in ['Phonemes', 'Tones', 'Population', 'Trump', 'Country', 'Vowels']:
                    del inventory[key]

                inventories.append(inventory)

    else:
        return inventories

upsid_inv = get_upsid('phoible-aggregated.tsv', 'phoible-consonants.tsv')

candidates = 0
followers = 0
for inv in upsid_inv:
    candidates += 1
    
    try:
        voiced_fric = [i for i in inv['Segments'] if is_fricative(i) and features_d[i]['periodicGlottalSource']]
        voiceless_fric = [i for i in inv['Segments'] if is_fricative(i) and features_d[i]['periodicGlottalSource'] is False]
    except KeyError:
        pass
    
    if len(voiced_fric) < len(voiceless_fric):
        followers += 1
    

print('UPSID: el nombre de fricatives sonores és menor que el de sordes: segueixen l\'universal {:.2%} ({} de {})'.format(followers / candidates, followers, candidates))

candidates = 0
followers = 0
for inv in upsid_inv:
    candidates += 1
    
    try:
        fric = [i for i in inv['Segments'] if is_fricative(i)]
        affric = [i for i in inv['Segments'] if is_affricate(i)]
        plosiv = [i for i in inv['Segments'] if is_plosive(i)]

    except KeyError:
        pass
    
    if len(fric) < (len(plosiv) + len(affric)):
        followers += 1

print('UPSID: el nombre de fricatives improbablement es major que oclusives i africades junts: segueixen l\'universal {:.2%} ({} de {})'.format(followers / candidates, followers, candidates))

candidates = 0
followers = 0
for inv in upsid_inv:
    candidates += 1
    
    try:
        liquid = [i for i in inv['Segments'] if is_fricative(i)]

    except KeyError:
        pass
    
    if len(liquid) > 0:
        followers += 1

print('UPSID: Gairebé totes les llengües tenen almenys una líquida: segueixen l\'universal {:.2%} ({} de {})'.format(followers / candidates, followers, candidates))

candidates = 0
followers = 0
non_followers = []
for inv in upsid_inv:    
    try:
        laterals = [i for i in inv['Segments'] if features_d[i]['lateral']]
    except KeyError:
        pass
    
    if len(laterals) > 0:
        candidates += 1
        
        for lateral in laterals:
            f = features_d[lateral]
            if f['periodicGlottalSource'] and f['approximant']:
                followers += 1
                break
        else:
            if inv['LanguageName'] not in non_followers:
                non_followers.append(inv['LanguageName'])

print('UPSID: Una llengua amb una o més laterals té una aproximant lateral sonora.: segueixen l\'universal {:.2%} ({} de {})'.format(followers / candidates, followers, candidates))
print('       no el segueixen', ', '.join(non_followers))
UPSID: el nombre de fricatives sonores és menor que el de sordes: segueixen l'universal 76.05% (343 de 451) UPSID: el nombre de fricatives improbablement es major que oclusives i africades junts: segueixen l'universal 91.57% (413 de 451) UPSID: Gairebé totes les llengües tenen almenys una líquida: segueixen l'universal 93.13% (420 de 451) UPSID: Una llengua amb una o més laterals té una aproximant lateral sonora.: segueixen l'universal 97.10% (368 de 379) no el segueixen AHTNA, CHUKCHI, EKARI, KABARDIAN, !XU, LUSHOOTSEED, TSESHAHT, TIGAK, TLINGIT, WAHGI, WINTU


langs_lateral_hierarchy = []
for inventory in inventories:
    subsystems = []

    dentoalveolars = [segment for segment in inventory['Segments'] if features_d[segment]['lateral'] and features_d[segment]['coronal'] and not features_d[segment]['dorsal']]
    subsystems.append(dentoalveolars)

    retroflex = [segment for segment in inventory['Segments'] if features_d[segment]['lateral'] and not features_d[segment]['anterior'] and not features_d[segment]['dorsal']]
    subsystems.append(retroflex)

    
    palatals = [segment for segment in inventory['Segments'] if features_d[segment]['lateral'] and not features_d[segment]['anterior'] and features_d[segment]['coronal'] and not features_d[segment]['dorsal']]
    subsystems.append(palatals)
    
        
    velars = [segment for segment in inventory['Segments'] if features_d[segment]['lateral'] and features_d[segment]['dorsal'] and features_d[segment]['high'] and not features_d[segment]['continuant'] and features_d[segment]['coronal'] is False ]
    subsystems.append(velars)
    
    langs_lateral_hierarchy.append({inventory['LanguageName']: subsystems})


html_table = ['<table>']

# Build header
html_table.append('<tr>')
for header in ['Llengua', 'laterals dento', 'laterals retroflex', 'laterals palatal',
               'laterals velar', 'Jerarquia laterals (d &gt; r &gt; p  &gt; v)']:
    
    html_table.append('<td>{}</td>'.format(header))
    
else:
    html_table.append('<tr>')

candidates = 0
followers = 0
# Add contents
for lang in langs_lateral_hierarchy:
    
    candidates += 1
    for inv in lang:
        if len(lang[inv][0]) == 0 and len(lang[inv][1]) == 0 and len(lang[inv][2]) == 0 and  len(lang[inv][3]) == 0:
            continue
        
        html_table.append('<tr>')
        html_table.append('<td>{}</td>'.format(inv))
        
        for item in lang[inv]:
            html_table.append('<td>{} [ {} ]</td>'.format(len(item), ' '.join(item)))
        
        follows_hierarchy = len(lang[inv][0]) >= len(lang[inv][1]) and len(lang[inv][1]) >= len(lang[inv][2])
        html_table.append('<td>{}<td>'.format("si" if follows_hierarchy else "no"))

    else:
        if follows_hierarchy:
            followers += 1
        html_table.append('</tr>')
else:
    html_table.append('</table></font>')

display(HTML(''.join(html_table)))
Llengualaterals dentolaterals retroflexlaterals palatallaterals velarJerarquia laterals (d > r > p > v)
Ache1 [ ɺ̪ ]0 [ ]0 [ ]0 [ ]si
Alabama2 [ l̪ ɬ̪ ]0 [ ]0 [ ]0 [ ]si
Angaatiha1 [ ɺ ]0 [ ]0 [ ]0 [ ]si
Ao2 [ l ɭ͓ ]1 [ ɭ͓ ]1 [ ɭ͓ ]0 [ ]si
Arára, Pará1 [ l ]0 [ ]0 [ ]0 [ ]si
Awa Pit2 [ ɬ l ]0 [ ]0 [ ]0 [ ]si
Awtuw1 [ l ]0 [ ]0 [ ]0 [ ]si
Baining1 [ l ]0 [ ]0 [ ]0 [ ]si
Bandjalang1 [ l ]0 [ ]0 [ ]0 [ ]si
Bariai1 [ l ]0 [ ]0 [ ]0 [ ]si
Biak1 [ l ]0 [ ]0 [ ]0 [ ]si
Biali1 [ l ]0 [ ]0 [ ]0 [ ]si
Blackfoot1 [ l ]0 [ ]0 [ ]0 [ ]si
Cacua1 [ l ]0 [ ]0 [ ]0 [ ]si
Cherokee1 [ l ]0 [ ]0 [ ]0 [ ]si
Cubeo1 [ ɺ̪ ]0 [ ]0 [ ]0 [ ]si
Dani1 [ l̪ ]0 [ ]0 [ ]0 [ ]si
Dyirbal1 [ l ]0 [ ]0 [ ]0 [ ]si
Ekari0 [ ]0 [ ]0 [ ]1 [ ɡˡ ]si
Endo1 [ l ]0 [ ]0 [ ]0 [ ]si
Faiwol1 [ l ]0 [ ]0 [ ]0 [ ]si
Fuzhou1 [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 ]si
Skou1 [ l ]0 [ ]0 [ ]0 [ ]si
Southern Nuautl1 [ l ]0 [ ]0 [ ]0 [ ]si
Taoripi1 [ l̪ ]0 [ ]0 [ ]0 [ ]si
Tetun1 [ l̪ ]0 [ ]0 [ ]0 [ ]si
Tigak1 [ ɮ ]0 [ ]0 [ ]0 [ ]si
Tinputz1 [ l ]0 [ ]0 [ ]0 [ ]si
Tiwi1 [ l ]0 [ ]0 [ ]0 [ ]si
Tongan; Tonga1 [ ɺ ]0 [ ]0 [ ]0 [ ]si
Vanimo1 [ l ]0 [ ]0 [ ]0 [ ]si
Waiwai1 [ ɺ ]0 [ ]0 [ ]0 [ ]si
Waris1 [ l̪ ]0 [ ]0 [ ]0 [ ]si
Wik-Munkan1 [ l ]0 [ ]0 [ ]0 [ ]si
Yidiny1 [ l ]0 [ ]0 [ ]0 [ ]si
Yil1 [ l ]0 [ ]0 [ ]0 [ ]si
langs_rothic_hierarchy = []
for inventory in inventories:
    subsystems = []

    dentoalveolars = [segment for segment in inventory['Segments'] if is_rothic(segment) and features_d[segment]['coronal'] and features_d[segment]['anterior']     and not features_d[segment]['dorsal']]
    subsystems.append(dentoalveolars)

    retroflex =      [segment for segment in inventory['Segments'] if is_rothic(segment) and features_d[segment]['coronal'] and not features_d[segment]['anterior'] and not features_d[segment]['dorsal']]
    subsystems.append(retroflex)
    
    uvulars =        [segment for segment in inventory['Segments'] if is_rothic(segment) and not features_d[segment]['coronal'] and not features_d[segment]['coronal'] and features_d[segment]['dorsal']]
    subsystems.append(uvulars)
    
    langs_rothic_hierarchy.append({inventory['LanguageName']: subsystems})


html_table = ['<table>']

# Build header
html_table.append('<tr>')
for header in ['Llengua', 'rothics dento', 'rothics retroflex', 'rothics uvulars',
               'Jerarquia rothics (d &gt; r &gt; u)']:
    
    html_table.append('<td>{}</td>'.format(header))
    
else:
    html_table.append('<tr>')

candidates = 0
followers = 0
# Add contents
for lang in langs_rothic_hierarchy:
    
    for inv in lang:
        if len(lang[inv][0]) == 0 and len(lang[inv][1]) == 0 and len(lang[inv][2]) == 0:
            continue
            
        candidates += 1

        html_table.append('<tr>')
        html_table.append('<td>{}</td>'.format(inv))
        
        for item in lang[inv]:
            html_table.append('<td>{} [ {} ]</td>'.format(len(item), ' '.join(item)))
        
        follows_hierarchy = len(lang[inv][0]) >= len(lang[inv][1]) and len(lang[inv][1]) >= len(lang[inv][2])
        html_table.append('<td>{}<td>'.format("si" if follows_hierarchy else "no"))

    else:
        if follows_hierarchy:
            followers += 1
        html_table.append('</tr>')
else:
    html_table.append('</table></font>')

display(HTML(''.join(html_table)))

print('Segueixen la jerarquia {:.2%} ({} de {})'.format(followers / candidates, followers, candidates))
Llenguarothics dentorothics retroflexrothics uvularsJerarquia rothics (d > r > u)
Abau1 [ ɾ ]0 [ ]0 [ ]si
Aguaruna1 [ ɾ ]0 [ ]0 [ ]si
Ainu1 [ ɾ ]0 [ ]0 [ ]si
Akawaio1 [ *R̪ ]0 [ ]0 [ ]si
Akurio1 [ ɾ ]0 [ ]0 [ ]si
Amahuaca1 [ ɾ̪ ]0 [ ]0 [ ]si
Amanab1 [ r ]0 [ ]0 [ ]si
Apalaí1 [ ɾ ]0 [ ]0 [ ]si
Apinaye0 [ ]1 [ ɽ ]0 [ ]no
Arabela1 [ r̪ ]0 [ ]0 [ ]si
Arára, Pará1 [ ɾ ]0 [ ]0 [ ]si
Arikapú1 [ ɾ ]0 [ ]0 [ ]si
Asmat1 [ ɾ ]0 [ ]0 [ ]si
Au1 [ ɾ ]0 [ ]0 [ ]si
Auyana1 [ ɾ ]0 [ ]0 [ ]si
Awtuw1 [ ɾ ]0 [ ]0 [ ]si
Baining1 [ ɾ ]0 [ ]0 [ ]si
Bandjalang1 [ r ]0 [ ]0 [ ]si
Barasano1 [ ɾ ]0 [ ]0 [ ]si
Bariai1 [ r ]0 [ ]0 [ ]si
Barí1 [ r ]0 [ ]0 [ ]si
Baruga1 [ ɾ ]0 [ ]0 [ ]si
Bésɨro1 [ ɾ ]0 [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 ]si
Waiwai1 [ ɾ ]0 [ ]0 [ ]si
Wari; Wari'; Wariʔ; Oro Nao1 [ ɾ ]0 [ ]0 [ ]si
Warihio1 [ ɾ ]0 [ ]0 [ ]si
Waris1 [ *R̪ ]0 [ ]0 [ ]si
Wik-Munkan1 [ r ]0 [ ]0 [ ]si
Yabarana1 [ ɾ ]0 [ ]0 [ ]si
Yareba1 [ ɾ ]0 [ ]0 [ ]si
Yawa1 [ ɾ ]0 [ ]0 [ ]si
Yekwana1 [ ɾ ]0 [ ]0 [ ]si
Yidiny1 [ r ]1 [ ɻ ]0 [ ]si
Yil1 [ r ]0 [ ]0 [ ]si
Segueixen la jerarquia 151.43% (159 de 105)
morph = """
Alagwa
Alamblak
Amharic
Apurinã
Arabic (Egyptian)
Arabic (Gulf)
Arabic (Syrian)
Arbore
Bayso
Beja
Berber (Middle Atlas)
Campa (Axininca)
Chinantec (Lealao)
Cree (Plains)
Diyari
Dizi
French
Gaelic (Scots)
Hausa
Hebrew (Modern)
Hindi
Hixkaryana
Iraqw
Kashmiri
Khasi
Khmu'
Kolami
Latvian
Lele
Macushi
Maltese
Maybrat
Miya
Mosetén
Mundari
Ojibwa (Eastern)
Oromo (Harar)
Panjabi
Pashto
Passamaquoddy-Maliseet
Pitta Pitta
Qafar
Rendille
Spanish
Tagalog
Taiap
Tigré
Tiwi
Tunica
Yazgulyam
Abkhaz
Barasano
Defaka
English
German
Godoberi
Grebo
Greek (Modern)
Icelandic
Kannada
Ket
Khoekhoe
Koromfe
Lavukaleve
Mangarrayi
Marathi
Nicobarese (Car)
Oneida
Retuarã
Russian
Seneca
Tamil
Tidore
Ukrainian
Wardaman
Wari
Archi
Bininj Gun-Wok
Burushaski
Dyirbal
Godié
Lak
Marind
Paumarí
Pirahã
Tsez
Wambaya
Zande
Arapesh (Mountain)
Babungo
Chichewa
Diola-Fogny
Fula (Guinean)
Hunzib
Ingush
Juhoan
Kisi
Kongo
Lingala
Luvale
Maung
Mixtec (Chalcatongo)
Ngangityemerri
Nkore-Kiga
Nunggubuyu
Nyamwezi
Nyiha
Shona
Supyire
Swahili
Yimas
Zulu
""".split()

for lang in morph:
    for inventory in inventories:
        if inventory['LanguageName'] == lang:
            print(inventory[L])
    
    
{'Area': 'America', 'LanguageFamilyGenus': 'Cariban', 'Consonants': '10', 'LanguageFamilyRoot': 'Cariban', 'InventoryID': '1877', 'LanguageCode': 'mbc', 'Longitude': '-59:15', 'Segments': ['ʔ', 'k', 'j', 'm', 'n', 'p', 's', 't', 'w', 'ɾ'], 'LanguageName': 'Macushi', 'Latitude': '04:00', 'Source': 'SAPHON'} {'Area': 'Pacific', 'LanguageFamilyGenus': 'Tiwian', 'Consonants': '14', 'LanguageFamilyRoot': 'Australian', 'InventoryID': '1218', 'LanguageCode': 'tiw', 'Longitude': '131:0', 'Segments': ['n̪', 'j', 'k', 'm', 'ɣ', 'n', 'p', 't̪', 't', 'w', 'ɻ', 'ɾ', 'ŋ', 'l'], 'LanguageName': 'Tiwi', 'Latitude': '-11:40', 'Source': 'PH'} {'Area': 'America', 'LanguageFamilyGenus': 'Tucanoan', 'Consonants': '11', 'LanguageFamilyRoot': 'Tucanoan', 'InventoryID': '239', 'LanguageCode': 'bao', 'Longitude': '-70:20', 'Segments': ['ɡ', 'b', 'd', 'k', 'j', 'p', 's', 't', 'w', 'h', 'ɾ'], 'LanguageName': 'Barasano', 'Latitude': '00:25', 'Source': 'UPSID'} {'Area': 'America', 'LanguageFamilyGenus': 'Northern Iroquoian', 'Consonants': '10', 'LanguageFamilyRoot': 'Iroquoian', 'InventoryID': '77', 'LanguageCode': 'one', 'Longitude': '-79:55', 'Segments': ['ʔ', 'h', 'k', 'j', 'l', 'n', 'ɰ', 's', 't̠ʃ', 't'], 'LanguageName': 'Oneida', 'Latitude': '43:15', 'Source': 'SPA'} {'Area': 'America', 'LanguageFamilyGenus': 'Northern Iroquoian', 'Consonants': '11', 'LanguageFamilyRoot': 'Iroquoian', 'InventoryID': '536', 'LanguageCode': 'see', 'Longitude': '-94:25', 'Segments': ['n̪', 'b', 'w', 'h', 'k', 'j', 'm', 's̪', 't̪', 'ʔ', 'd̪z̪'], 'LanguageName': 'Seneca', 'Latitude': '36:0', 'Source': 'UPSID'} {'Area': 'Pacific', 'LanguageFamilyGenus': 'Pama-Nyungan', 'Consonants': '13', 'LanguageFamilyRoot': 'Australian', 'InventoryID': '303', 'LanguageCode': 'dbl', 'Longitude': '145:30', 'Segments': ['ɡ', 'b', 'ŋ', 'j', 'm', 'l', 'n', 'ɲ', 'r', 'w', 'ɻ', 'ɟ', 'd'], 'LanguageName': 'Dyirbal', 'Latitude': '-17:35', 'Source': 'UPSID'}