Skip to content

Commit

Permalink
Reconstruct (#29)
Browse files Browse the repository at this point in the history
* update reconstruction code

* update code, fix bug

* update

* finalize for v1.2

* pep8 ; extended test coverage; py3.10 support

Co-authored-by: lingulist <mattis.list@lingulist.de>
Co-authored-by: lingulist <mattis.list@lingpy.org>
Co-authored-by: Robert Forkel <xrotwang@googlemail.com>
  • Loading branch information
4 people authored Apr 7, 2022
1 parent e0a560f commit e2794c0
Show file tree
Hide file tree
Showing 11 changed files with 705 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"upload_type": "software",
"communities": [
{
"identifier": "dighl"
"identifier": "digling"
},
{
"identifier": "calc"
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,19 @@ LingRex offers the code needed for the automatic inference of sound corresponden
To test this workflow, please check the workflow code example in `tests/workflows/list-2019`.

When using this package in your research, please make sure to quote the paper accordingly, and quote the software package as follows:
LingRex offers also the code needed for a baseline algorithm for automatic word prediction or automatic phonological reconstruction in a supervised fashion.

> List, Johann-Mattis and Forkel, Robert (2021): LingRex: Linguistic Reconstruction with LingPy. [Computer software, Version 1.1.1]. Geneva: Zenodo. [DOI: 10.5281/zenodo.1544943](https://doi.org/10.5281/zenodo.1544943)
> List, J.-M. and R. Forkel and N. W. Hill (forthcoming): A New Framework for Fast Automated Phonological Reconstruction Using Trimmed Alignments and Sound Correspondence Patterns. Proceedings of the 3rd International Workshop on Computational Approaches to Historical Language Change (LChange 2022). Dublin. Ireland.
This algorithm is also used as a baseline for an upcoming Shared Task on the Prediction of Cognate Reflexes (https://sigtyp.github.io/st2022.html), organized as part of the SIGTYP Workshop at NAACL 2022.

When using this package in your research, please make sure to quote the respective papers, depending on the algorithms you use, and quote the software package as follows:

> List, J.-M. and R. Forkel (2022): LingRex: Linguistic Reconstruction with LingPy. [Computer software, Version 1.2.0]. Geneva: Zenodo. [DOI: 10.5281/zenodo.1544943](https://doi.org/10.5281/zenodo.1544943)
Since this software package itself makes use of LingPy's alignment algorithms, you should also quote the LingPy package itself.

> List, J.-M. and R. Forkel (2021): LingPy. A Python library for quantitative tasks in historical linguistics. Version 2.6.7. Version 2.6.7. Max Planck Institute for Evolutionary Anthropology: Leipzig. https://lingpy.org
> List, J.-M. and R. Forkel (2021): LingPy. A Python library for quantitative tasks in historical linguistics. Version 2.6.9. Max Planck Institute for Evolutionary Anthropology: Leipzig. https://lingpy.org
## Installation

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
],
version='1.1.2.dev0',
packages=find_packages(where='src'),
Expand Down
2 changes: 1 addition & 1 deletion src/lingrex/borrowing.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def external_cognates(

# compare groups
for (gA, iA), (gB, iB) in itertools.combinations(list(groups.items()), r=2):
if G.nodes[str(gA)][family] != G.nodes[str(gB)][family]:
if G.nodes[str(gA)]["family"] != G.nodes[str(gB)]["family"]:
wpairs = [(a[2], b[2]) for a, b in itertools.product(iA, iB)]

pairs = Pairwise(wpairs)
Expand Down
Loading

0 comments on commit e2794c0

Please sign in to comment.