Skip to main content

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.

Metadata

Release files for ulf2english 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ulf2english 0.1.1
File Size Uploaded
ulf2english-0.1.1.tar.gz 42.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ulf2english 0.1.1
File Interpreter ABI Platform
ulf2english-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 78.2 kB

Release files / ulf2english-0.1.1.tar.gz

Download URL ulf2english-0.1.1.tar.gz
Size 42.9 kB
Tags Source
SHA-256 checksum
How to use checksums
843d69e224a0f9c4cc2cee543180d65e66cf3fb54be2faecb627dda81977e7b4
BLAKE2b-256 checksum
How to use checksums
cf3a01ac23ee3a680564ead421e5fccd35808b684ab61d64ab56b8fe4a774cae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.0

Release files / ulf2english-0.1.1-py3-none-any.whl

Download URL ulf2english-0.1.1-py3-none-any.whl
Size 35.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4deecf9032e3cd38ddbf522caca80d47585fc703cf72a85d309285cad6f343d8
BLAKE2b-256 checksum
How to use checksums
f6cd916d89f4712ee46f38085af03867b14dbe28a832be370f50a49c0970b1ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.0

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page