Skip to main content

A Python port of the Lisp ulf2english package by Gene Kim.

Project description

Python ULF-to-English

Maps Unscoped Logical Form (ULF) formulas to English sentences. A Python port of the original Common Lisp ulf2english implementation by Gene Kim.

Dependencies

Summary

Install the package using pip install ulf2english.

The following example shows how to convert ULF to English using the package:

from ulf2english import ulf2english

ulf = ['this.pro', [['pres', 'be.v'], ['=', ['a.d', ['test.n', 'ulf.n']]]]]
ulf2english.convert(ulf)
# -> "This is a test ulf."

The following optional parameters can be given to the convert function:

  • add_punct = False : omit any final punctuation in the generated sentence.
  • capitalize_front = False : do not capitalize the first word in the generated sentence.
  • add_commas = True : add commas to the generated sentence in particular sub-expressions.
  • standardize = True : standardize the generated sentence by converting to all-lowercase and adding space around all punctuation.
  • verbose = True : print the intermediate staged output after each processing stage.

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

ulf2english-0.1.1.tar.gz (42.9 kB view details)

Uploaded Source

Built Distribution

ulf2english-0.1.1-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

File details

Details for the file ulf2english-0.1.1.tar.gz.

File metadata

  • Download URL: ulf2english-0.1.1.tar.gz
  • Upload date:
  • Size: 42.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.0

File hashes

Hashes for ulf2english-0.1.1.tar.gz
Algorithm Hash digest
SHA256 843d69e224a0f9c4cc2cee543180d65e66cf3fb54be2faecb627dda81977e7b4
MD5 9d8a1640fdb4f5f4ac0f2a543d4b9daf
BLAKE2b-256 cf3a01ac23ee3a680564ead421e5fccd35808b684ab61d64ab56b8fe4a774cae

See more details on using hashes here.

File details

Details for the file ulf2english-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ulf2english-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 35.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.0

File hashes

Hashes for ulf2english-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4deecf9032e3cd38ddbf522caca80d47585fc703cf72a85d309285cad6f343d8
MD5 dfd3f93086ab414d415084b4c34ae93f
BLAKE2b-256 f6cd916d89f4712ee46f38085af03867b14dbe28a832be370f50a49c0970b1ef

See more details on using hashes here.

Supported by

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