-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d75706e
Showing
5 changed files
with
137,849 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.egg-info/ | ||
__pycache__/ | ||
dist/ | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# py-nestle1904 | ||
|
||
Like py-sblgnt does for the MorphGNT SBLGNT, **py-nestle1904** provides a pip-installable package that combines the Nestle 1904 text with morphology and lemmatisation and a Python API for accessing it. | ||
|
||
This way, Python tools built on the Nestle 1904 can include **py-nestle1904** as a requirement to be installed globally or into a virtualenv and no other set up is necessary. | ||
|
||
Note that, even though this repo and package contain the Nestle 1904 database, the [Nestle 1904 repo](https://github.com/biblicalhumanities/Nestle1904) remains the authoritative source of the data and all data corrections should be reported there. | ||
|
||
All credit for the data belongs to those people acknowledged there. | ||
|
||
|
||
## How to Use | ||
|
||
Firstly, install with | ||
|
||
``` | ||
pip install py-nestle1904 | ||
``` | ||
|
||
Then in your code... | ||
|
||
``` | ||
from pynestle1904 import nestle_rows | ||
for row in nestle_rows(): | ||
... | ||
``` | ||
|
||
Each `row` will be a dictionary with the keys: | ||
|
||
``` | ||
"ref", "text", "parse1", "parse2", "strongs", "lemma", "norm" | ||
``` | ||
|
||
See the [Nestle 1904 repo](https://github.com/biblicalhumanities/Nestle1904) for details of these fields. | ||
|
||
## License | ||
|
||
The text and data is in the Public Domain. | ||
|
||
The code here is made available under an MIT License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import os.path | ||
|
||
FILENAME = "nestle1904.csv" | ||
FIELD_NAMES = ("ref", "text", "parse1", "parse2", "strongs", "lemma", "norm") | ||
|
||
def nestle_rows(): | ||
""" | ||
yield a dict for each Nestle 1904 row. | ||
""" | ||
with open(os.path.join(os.path.dirname(__file__), FILENAME)) as f: | ||
for line in f: | ||
yield dict(zip(FIELD_NAMES, line.strip().split("\t"))) |
Oops, something went wrong.