Python package containing various utilities relevant in the field of digital humanities.
Project description
Digital Humanities Utilities
Python 3.6+ package containing various utilities relevant in the field of digital humanities.
$ pip install dh-utils
Some examples
Tag languages in a given string based on its script:
>>> from dh_utils import tei as t
>>> t.tag('Hebr', 'A line contaning the hebrew אגוז מלך inline')
'A line contaning the hebrew <foreign xml:lang="he-Hebr">אגוז מלך</foreign> inline'
It is also possible to tag a given language based on its script in a TEI XML document (NB: file will be overwritten!):
>>> t.tag_xml('path/to/file.xml', 'Arab')
Decompose any unicode string:
>>> from dh_utils import unicode as u
>>> u.decompose('λόγος')
λ U+03bb GREEK SMALL LETTER LAMDA
ο U+03bf GREEK SMALL LETTER OMICRON
́ U+0301 COMBINING ACUTE ACCENT
γ U+03b3 GREEK SMALL LETTER GAMMA
ο U+03bf GREEK SMALL LETTER OMICRON
ς U+03c2 GREEK SMALL LETTER FINAL SIGMA
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dh-utils-0.1.4.tar.gz
(3.3 kB
view details)
Built Distribution
File details
Details for the file dh-utils-0.1.4.tar.gz
.
File metadata
- Download URL: dh-utils-0.1.4.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ad3a63a206108c05e7e31d7b15fddbb655470a37522f86c3c29b45ce30a63c9 |
|
MD5 | ae2fabfae2164c251aab192546c89c85 |
|
BLAKE2b-256 | 111c428035c72c3cfb6782a8b5d0c5f0e93613ac5c97cb1b9c332622841155c3 |
File details
Details for the file dh_utils-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: dh_utils-0.1.4-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc6f4c34156f77c87092c844d8f7d6f8275e64f8594ac834f2f02ecb6bdcf49e |
|
MD5 | e768a462e2f5fe0050da7b41788e3502 |
|
BLAKE2b-256 | 259e19a69393120ffd96db76b3f24554996a14e0bff85a2ae7c5ffd188e920a4 |