framework for detecting old loanwords


Keywords
historical, linguistics, computational, lexicology, Uralistics, borrowing, detection, contact, loanword, adaptation
License
AFL-3.0
Install
pip install loanpy==0.1.7

Documentation

LOANPY

loanpy is a tool for historical linguists. It extracts sound changes and constraints from an etymological dictionary, generates pseudo-roots for L1, pseudo- sound-substitutions for L2, searches for phonetically identical lexeme-pairs and ranks them according to semantic similarity.

Installation

$ python -m pip install loanpy

Getting started

>>> from loanpy import loanfinder as lf

Download and unpack 3 Gigabytes of pretrained Google-News vectors. Move GoogleNews-vectors-negative300.bin to the folder "data", the full path to which can be retrieved via:

>>> import os
>>> print(os.path.dirname(lf.__file__)+r"\data")

Following code will compare a set of Gothic words (data/dfgot.csv) with Hungarian words (data/zaicz.csv) and evaluate which elements are the most likely candidates for loanwords. The result can be viewed in data/results/matches.csv:

>>> lf.loandf()

Data Sources

Gábor Zaicz's Hungarian etymological dictionary from 2006

Gerhard Köbler's Gothic database

Hungarian Academy of Science's online version of Uralisches Etymologisches Wörterbuch

License

Academic Free License (AFL)