Skip to main content

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


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.5.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dh_utils-0.1.5-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file dh-utils-0.1.5.tar.gz.

File metadata

  • Download URL: dh-utils-0.1.5.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

Hashes for dh-utils-0.1.5.tar.gz
Algorithm Hash digest
SHA256 73e6e9bbb3b07304d53efd5da82a974a8fc5f435ac45aded16ec90f0fda7ecfb
MD5 0806f8f3be79221adc82d91fc44d7620
BLAKE2b-256 f781ea61eac24acd2a2a5d94734ebffcd134e70a0d697e9da7112acc9c1ecd3a

See more details on using hashes here.

File details

Details for the file dh_utils-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: dh_utils-0.1.5-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

Hashes for dh_utils-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 efbfb1ded516e01822d1b7132bcd05df00fda2668e49ad5506e49a6eabeaf9ed
MD5 cdf46ca02170ebef8662a4e889a697b2
BLAKE2b-256 d28ee0c6d3c04bc7b1b512da715d8ec881198243ef5310da10067fbc82c33178

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page