Skip to content

Instantly share code, notes, and snippets.

@LinguList
LinguList / README.md
Last active July 14, 2024 11:59
Converting an Artificial Proto-Language into Data for Testing Computational Approaches in Historical Linguistics (Supplementary Material)

Converting an Artificial Proto-Language into Data for Testing Computational Approaches in Historical Linguistics (Supplementary Material)

The material shared here allows users to test the code described in the original study by List (2024).

List, Johann-Mattis, "Converting an Artificial Proto-Language into Data for Testing Computational Approaches in Historical Linguistics," in Computer-Assisted Language Comparison in Practice, 7.2. URL: https://calc.hypotheses.org/7363, DOI: 10.15475/calcip.2024.2.1.

Installation

Install package dependencies.

@LinguList
LinguList / README.md
Created October 27, 2022 16:44
Querying Datasets with Cognates in the Lexibank Repository

Querying Datasets with Cognates in the Lexibank Repository

In order to run the code below (code.py), you need to git-clone the lexibank_analysed package (https://github.com/lexibank/lexibank-analysed) and install it using pip. Then, you need to download the script and place it into the lexibank-analysed folder. Before running, you need to run the command cldfbench download cldfbench_lexibank_analysed.py in order to download all individual datasets. After that, you can just run the script typing python code.py. The output looks as follows:

Dataset Concepts Languages Words Cognates Singletons
bdpa 519 538 50095 750 0
blustaustronesian 210 20 4358 321 2409
bowernpny 344 190 44876 4494 25054
cals
@LinguList
LinguList / README.md
Last active July 15, 2022 04:36
How to Compute Colexification Networks with CL Toolkit

How to Compute Colexification Networks with CL Toolkit (Supplementary Material)

This code example accompanies the Blog Post "How to Compute Colexification Networks with CL Toolkit (How to do X in Linguistics 11)" by List (2022).

You need to install the python-igraph package, networkx, lingpy, and cltoolkit:

$ pip install python-igraph
$ pip install networkx
$ pip install lingpy
@LinguList
LinguList / Makefile
Last active June 3, 2022 06:51
How to Compute Colexifications with CL Toolkit
install:
git clone https://github.com/intercontinental-dictionary-series/ids.git
git clone https://github.com/lexibank/northeuralex.git
pip install cltoolkit
colexifications:
python colexifications.py
@LinguList
LinguList / README.md
Last active July 17, 2024 17:08
Working with WALS Data in CLDF

How to work with WALS data in CLDF

This code example accomanies a blog post published as part of the blog "Computer-Assisted Langauge Comparison in Practice" (https://calc.hypotheses.org).

In order to get started, install the WALS dataset in CLDF format with the help of pip (ideally, make sure to use a fresh virtual environment!).

$ pip install -e git+https://github.com/cldf-datasets/wals.git@v2020#egg=cldfbench_wals

Once this has been done, you should be able to run the script wals.py by simply typing:

Automated Mapping of Metadata to Concepticon

See the blog at https://calc.hypotheses.org for details.

To run the code, just type:

$ python code.py

Feature-Based Alignment Analyses with LingPy and CLTS (2)

Requirements (can all be installed with PIP)

  • lingpy
  • pyclts

Run code

@LinguList
LinguList / README.md
Created August 17, 2019 15:19
Feature-Based Alignment Analyses with LingPy and CLTS (1)

Feature-Based Alignment Analyses with LingPy and CLTS (1)

Requirements (can all be installed with PIP)

  • pyclts
  • tabulate

Run code

@LinguList
LinguList / README.md
Created July 11, 2019 16:40
Waterman-Eggert Illustration and Patch for LingPy

Waterman-Eggert algorithm for Sentence Alignment

This is a short patch for LingPy's Waterman-Eggert implementation and an illustration how the algorithm can be used to carry out the alignment of two sentences provided in phonetic transcription in linguistics. To test this script, make sure to install LingPy and run the following in your terminal:

$ python code.py