How to use the lingpy.data.model.Model function in lingpy

To help you get started, we’ve selected a few lingpy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lingpy / lingpy / lingpy / settings.py View on Github external
rcParams['_color'] = Model('color')
                rcParams['combiners'] = '\u0361\u035c'
                rcParams['breaks'] = '.-'
                rcParams['stress'] = "ˈˌ'"
                rcParams['merge_vowels'] = True
                rcParams['basic_orthography'] = 'fuzzy'

                # reset basic model to sca
                rcParams['model'] = rcParams['sca']

            elif keywords[key] in ['evolaemp', 'el', 'asjp']:
                diacritics, vowels, tones = load_dvt(path='el')
                rcParams['asjp'] = Model('asjp_el')
                rcParams['sca'] = Model('sca_el')
                rcParams['dolgo'] = Model('dolgo_el')
                rcParams['art'] = Model('art_el')
                rcParams['jaeger'] = Model('jaeger_el')
                rcParams['diacritics'] = diacritics
                rcParams['vowels'] = vowels
                rcParams['tones'] = tones
                rcParams['_color'] = Model('color_el')
                rcParams['combiners'] = '\u0361\u035c'
                rcParams['breaks'] = '.-'
                rcParams['stress'] = "ˈˌ'"
                rcParams['merge_vowels'] = False
                rcParams['basic_orthography'] = 'asjp'

                # reset the basic model to the asjp model
                rcParams['model'] = rcParams['asjp']

        if key in alias:
            rcParams[alias[key]] = keywords[key]
github lingpy / lingpy / lingpy / settings.py View on Github external
if rval:
        return rcParams[rval]

    for key in keywords:
        if key == "schema":
            if keywords[key] in ["qlc", 'ipa']:
                diacritics, vowels, tones = load_dvt(path='')
                rcParams['asjp'] = Model('asjp')
                rcParams['sca'] = Model('sca')
                rcParams['dolgo'] = Model('dolgo')
                rcParams['art'] = Model('art')
                rcParams['diacritics'] = diacritics
                rcParams['vowels'] = vowels
                rcParams['tones'] = tones
                rcParams['_color'] = Model('color')
                rcParams['combiners'] = '\u0361\u035c'
                rcParams['breaks'] = '.-'
                rcParams['stress'] = "ˈˌ'"
                rcParams['merge_vowels'] = True
                rcParams['basic_orthography'] = 'fuzzy'

                # reset basic model to sca
                rcParams['model'] = rcParams['sca']

            elif keywords[key] in ['evolaemp', 'el', 'asjp']:
                diacritics, vowels, tones = load_dvt(path='el')
                rcParams['asjp'] = Model('asjp_el')
                rcParams['sca'] = Model('sca_el')
                rcParams['dolgo'] = Model('dolgo_el')
                rcParams['art'] = Model('art_el')
                rcParams['jaeger'] = Model('jaeger_el')
github lingpy / lingpy / lingpy / settings.py View on Github external
# collection : {1}
# aligned by : LingPy Version {2} 
# created on : {3}
# parameters : {4}
""")
rcParams.update(alignments)

# dictionary stores basic parameters that are used during a LingPy session
rcParamsUpd = dict(
    schema='qlc',
    asjp=Model('asjp'),
    sca=Model('sca'),
    dolgo=Model('dolgo'),
    _color=Model('color'),
    art=Model('art'),
    cv=Model('cv'),
    jaeger=Model('jaeger'),
    diacritics=diacritics,
    model=Model('sca'),
    vowels=vowels,
    tones=tones,
    figsize=(10, 10),
    combiners='\u0361\u035c',
    breaks='.-',
    stress="ˈˌ'",
    merge_vowels=True,
    unique_sequences=True,
    comment='#',
    restricted_chars='_T',
    scale=0.5,
    factor=0.3,
    gap_weight=0.5,
github lingpy / lingpy / lingpy / settings.py View on Github external
'T': 1,  # Tone
        '_': 1  # break character
    },
    align_stamp="""# MSA
# dataset    : {0}
# collection : {1}
# aligned by : LingPy Version {2} 
# created on : {3}
# parameters : {4}
""")
rcParams.update(alignments)

# dictionary stores basic parameters that are used during a LingPy session
rcParamsUpd = dict(
    schema='qlc',
    asjp=Model('asjp'),
    sca=Model('sca'),
    dolgo=Model('dolgo'),
    _color=Model('color'),
    art=Model('art'),
    cv=Model('cv'),
    jaeger=Model('jaeger'),
    diacritics=diacritics,
    model=Model('sca'),
    vowels=vowels,
    tones=tones,
    figsize=(10, 10),
    combiners='\u0361\u035c',
    breaks='.-',
    stress="ˈˌ'",
    merge_vowels=True,
    unique_sequences=True,
github lingpy / lingpy / lingpy / settings.py View on Github external
rcParams['combiners'] = '\u0361\u035c'
                rcParams['breaks'] = '.-'
                rcParams['stress'] = "ˈˌ'"
                rcParams['merge_vowels'] = True
                rcParams['basic_orthography'] = 'fuzzy'

                # reset basic model to sca
                rcParams['model'] = rcParams['sca']

            elif keywords[key] in ['evolaemp', 'el', 'asjp']:
                diacritics, vowels, tones = load_dvt(path='el')
                rcParams['asjp'] = Model('asjp_el')
                rcParams['sca'] = Model('sca_el')
                rcParams['dolgo'] = Model('dolgo_el')
                rcParams['art'] = Model('art_el')
                rcParams['jaeger'] = Model('jaeger_el')
                rcParams['diacritics'] = diacritics
                rcParams['vowels'] = vowels
                rcParams['tones'] = tones
                rcParams['_color'] = Model('color_el')
                rcParams['combiners'] = '\u0361\u035c'
                rcParams['breaks'] = '.-'
                rcParams['stress'] = "ˈˌ'"
                rcParams['merge_vowels'] = False
                rcParams['basic_orthography'] = 'asjp'

                # reset the basic model to the asjp model
                rcParams['model'] = rcParams['asjp']

        if key in alias:
            rcParams[alias[key]] = keywords[key]
        else:
github lingpy / lingpy / lingpy / settings.py View on Github external
# parameters : {4}
""")
rcParams.update(alignments)

# dictionary stores basic parameters that are used during a LingPy session
rcParamsUpd = dict(
    schema='qlc',
    asjp=Model('asjp'),
    sca=Model('sca'),
    dolgo=Model('dolgo'),
    _color=Model('color'),
    art=Model('art'),
    cv=Model('cv'),
    jaeger=Model('jaeger'),
    diacritics=diacritics,
    model=Model('sca'),
    vowels=vowels,
    tones=tones,
    figsize=(10, 10),
    combiners='\u0361\u035c',
    breaks='.-',
    stress="ˈˌ'",
    merge_vowels=True,
    unique_sequences=True,
    comment='#',
    restricted_chars='_T',
    scale=0.5,
    factor=0.3,
    gap_weight=0.5,
    classes=True,
    sonar=True,
    scorer={},
github lingpy / lingpy / lingpy / settings.py View on Github external
'asjp'
    >>> rc(schema='ipa')
    >>> rc(basic_orthography)
    'fuzzy'

    """
    from lingpy import log

    if rval:
        return rcParams[rval]

    for key in keywords:
        if key == "schema":
            if keywords[key] in ["qlc", 'ipa']:
                diacritics, vowels, tones = load_dvt(path='')
                rcParams['asjp'] = Model('asjp')
                rcParams['sca'] = Model('sca')
                rcParams['dolgo'] = Model('dolgo')
                rcParams['art'] = Model('art')
                rcParams['diacritics'] = diacritics
                rcParams['vowels'] = vowels
                rcParams['tones'] = tones
                rcParams['_color'] = Model('color')
                rcParams['combiners'] = '\u0361\u035c'
                rcParams['breaks'] = '.-'
                rcParams['stress'] = "ˈˌ'"
                rcParams['merge_vowels'] = True
                rcParams['basic_orthography'] = 'fuzzy'

                # reset basic model to sca
                rcParams['model'] = rcParams['sca']
github lingpy / lingpy / lingpy / settings.py View on Github external
# aligned by : LingPy Version {2} 
# created on : {3}
# parameters : {4}
""")
rcParams.update(alignments)

# dictionary stores basic parameters that are used during a LingPy session
rcParamsUpd = dict(
    schema='qlc',
    asjp=Model('asjp'),
    sca=Model('sca'),
    dolgo=Model('dolgo'),
    _color=Model('color'),
    art=Model('art'),
    cv=Model('cv'),
    jaeger=Model('jaeger'),
    diacritics=diacritics,
    model=Model('sca'),
    vowels=vowels,
    tones=tones,
    figsize=(10, 10),
    combiners='\u0361\u035c',
    breaks='.-',
    stress="ˈˌ'",
    merge_vowels=True,
    unique_sequences=True,
    comment='#',
    restricted_chars='_T',
    scale=0.5,
    factor=0.3,
    gap_weight=0.5,
    classes=True,
github lingpy / lingpy / lingpy / settings.py View on Github external
>>> rc(basic_orthography)
    'fuzzy'

    """
    from lingpy import log

    if rval:
        return rcParams[rval]

    for key in keywords:
        if key == "schema":
            if keywords[key] in ["qlc", 'ipa']:
                diacritics, vowels, tones = load_dvt(path='')
                rcParams['asjp'] = Model('asjp')
                rcParams['sca'] = Model('sca')
                rcParams['dolgo'] = Model('dolgo')
                rcParams['art'] = Model('art')
                rcParams['diacritics'] = diacritics
                rcParams['vowels'] = vowels
                rcParams['tones'] = tones
                rcParams['_color'] = Model('color')
                rcParams['combiners'] = '\u0361\u035c'
                rcParams['breaks'] = '.-'
                rcParams['stress'] = "ˈˌ'"
                rcParams['merge_vowels'] = True
                rcParams['basic_orthography'] = 'fuzzy'

                # reset basic model to sca
                rcParams['model'] = rcParams['sca']

            elif keywords[key] in ['evolaemp', 'el', 'asjp']:
                diacritics, vowels, tones = load_dvt(path='el')
github lingpy / lingpy / lingpy / settings.py View on Github external
>>> rc(schema='ipa')
    >>> rc(basic_orthography)
    'fuzzy'

    """
    from lingpy import log

    if rval:
        return rcParams[rval]

    for key in keywords:
        if key == "schema":
            if keywords[key] in ["qlc", 'ipa']:
                diacritics, vowels, tones = load_dvt(path='')
                rcParams['asjp'] = Model('asjp')
                rcParams['sca'] = Model('sca')
                rcParams['dolgo'] = Model('dolgo')
                rcParams['art'] = Model('art')
                rcParams['diacritics'] = diacritics
                rcParams['vowels'] = vowels
                rcParams['tones'] = tones
                rcParams['_color'] = Model('color')
                rcParams['combiners'] = '\u0361\u035c'
                rcParams['breaks'] = '.-'
                rcParams['stress'] = "ˈˌ'"
                rcParams['merge_vowels'] = True
                rcParams['basic_orthography'] = 'fuzzy'

                # reset basic model to sca
                rcParams['model'] = rcParams['sca']

            elif keywords[key] in ['evolaemp', 'el', 'asjp']: