LingPy
(A Python Library for Historical Linguistics)
Pankaj Dwivedi
Amit Kumar Jha
LingPy
(A Python Library for Historical Linguistics)
 LingPy is a suite of open source Python modules for
sequence comparison, distance analyses, data
operations and visualization methods in quantitative
historical linguistics.
 The main idea of LingPy is to provide a software
package which, on the one hand, integrates different
methods for data analysis in quantitative historical
linguistics within a single framework, and, on the other
hand, serves as an interface for the preparation and
analysis of linguistic data using biological software
packages.
LingPy
(A Python Library for Historical Linguistics)
Release : 2.6.0
Date : 2017-11-23
Authors : Johann-Mattis List, Simon Greenhill, and
Robert Forkel
Contributors : Steven Moran, Peter Bouda, Johannes
Dellert, Taraka Rama, Frank Nagel, and Tiago
Tresoldi
What can be done with LingPy?
 With the help of LingPy, users can:
a) tokenize and analyze IPA-encoded sequences
b) carry out pairwise and multiple alignment analyses
c) search automatically for cognates across multiple
languages
d) calculate lexicostatistic distances between languages
e) reconstruct language phylogenies using basic cluster
algorithms
f) export the results of these analyses to various
formats which can be either used as input for
external programs, or to visualize the results.
How can LingPy be used?
 LingPy is a library written in the Python
programming language.
 It can be used directly in the Python
interpreter or imported into Python scripts.
Where
 Platform: unix
 It is not available for Windows and Mac
Platform.
 Python latest version should be install.
Quick Installation
• For our latest stable version, you can simply
use pip or easy_install for installation
$ pip install lingpy
Or
$ easy_install lingpy
• If you want to install LingPy the current GitHub
version on your system, open a terminal and type
in the following:
$ git clone https://github.com/lingpy/lingpy/
$ cd lingpy
$ python setup.py install
• If the last command above returns you some error
regarding user permissions (usually "Errno 13"),
you can install LingPy in your home Python setup:
$ python setup.py install --user
Subpackages of LingPy
 lingpy.algorithm  lingpy.evaluate
 lingpy.align  lingpy.meaning
 lingpy.basic  lingpy.read
 lingpy.compare  lingpy.sequence
 lingpy.convert  lingpy.tests
 lingpy.data  lingpy.thirdparty
http://lingpy.org/reference/modules.html
The Very Basics
Load the library
>>> import lingpy
>>> import lingpy as lp
Load all important packages
>>> from lingpy import *
http://lingpy.org/examples.html
Alignment Analyses
 Carry out a multiple alignment analysis of four sequences.
Define the sequences:
>>> seqs = ['woldemort','waldemar','wladimir','vladymyr']
Create an instance of the Multiple class:
>>> msa = Multiple(seqs)
Align the sequences, using simple progressive alignment with default parameters:
>>> msa.prog_align()
Print out the results to the screen:
>>> print(msa)
w o l - d e m o r t
w a l - d e m a r –
w - l a d i m i r –
v - l a d y m y r -
http://lingpy.org/examples.html

LingPy : A Python Library for Historical Linguistics

  • 1.
    LingPy (A Python Libraryfor Historical Linguistics) Pankaj Dwivedi Amit Kumar Jha
  • 2.
    LingPy (A Python Libraryfor Historical Linguistics)  LingPy is a suite of open source Python modules for sequence comparison, distance analyses, data operations and visualization methods in quantitative historical linguistics.  The main idea of LingPy is to provide a software package which, on the one hand, integrates different methods for data analysis in quantitative historical linguistics within a single framework, and, on the other hand, serves as an interface for the preparation and analysis of linguistic data using biological software packages.
  • 3.
    LingPy (A Python Libraryfor Historical Linguistics) Release : 2.6.0 Date : 2017-11-23 Authors : Johann-Mattis List, Simon Greenhill, and Robert Forkel Contributors : Steven Moran, Peter Bouda, Johannes Dellert, Taraka Rama, Frank Nagel, and Tiago Tresoldi
  • 4.
    What can bedone with LingPy?  With the help of LingPy, users can: a) tokenize and analyze IPA-encoded sequences b) carry out pairwise and multiple alignment analyses c) search automatically for cognates across multiple languages d) calculate lexicostatistic distances between languages e) reconstruct language phylogenies using basic cluster algorithms f) export the results of these analyses to various formats which can be either used as input for external programs, or to visualize the results.
  • 5.
    How can LingPybe used?  LingPy is a library written in the Python programming language.  It can be used directly in the Python interpreter or imported into Python scripts.
  • 6.
    Where  Platform: unix It is not available for Windows and Mac Platform.  Python latest version should be install.
  • 7.
    Quick Installation • Forour latest stable version, you can simply use pip or easy_install for installation $ pip install lingpy Or $ easy_install lingpy
  • 8.
    • If youwant to install LingPy the current GitHub version on your system, open a terminal and type in the following: $ git clone https://github.com/lingpy/lingpy/ $ cd lingpy $ python setup.py install • If the last command above returns you some error regarding user permissions (usually "Errno 13"), you can install LingPy in your home Python setup: $ python setup.py install --user
  • 9.
    Subpackages of LingPy lingpy.algorithm  lingpy.evaluate  lingpy.align  lingpy.meaning  lingpy.basic  lingpy.read  lingpy.compare  lingpy.sequence  lingpy.convert  lingpy.tests  lingpy.data  lingpy.thirdparty http://lingpy.org/reference/modules.html
  • 10.
    The Very Basics Loadthe library >>> import lingpy >>> import lingpy as lp Load all important packages >>> from lingpy import * http://lingpy.org/examples.html
  • 11.
    Alignment Analyses  Carryout a multiple alignment analysis of four sequences. Define the sequences: >>> seqs = ['woldemort','waldemar','wladimir','vladymyr'] Create an instance of the Multiple class: >>> msa = Multiple(seqs) Align the sequences, using simple progressive alignment with default parameters: >>> msa.prog_align() Print out the results to the screen: >>> print(msa) w o l - d e m o r t w a l - d e m a r – w - l a d i m i r – v - l a d y m y r - http://lingpy.org/examples.html