Skip to main content

A python wrapper for the Answer Constraint Engine

This package is a wrapper for ACE

Installation

pip install ACEngine

Quick Start

English Grammar Resource

from ace.paraphrase import generate_paraphrase
text = "The quick brown fox that jumped over the lazy dog took a nap."
paraphrase_list = generate_paraphrase(text)
for paraphrase in paraphrase_list:
    print(paraphrase)
# The brown quick fox which jumped over the lazy dog took a nap.
# The brown quick fox that jumped over the lazy dog took a nap.
# A nap was taken by the brown quick fox which jumped over the lazy dog.
# The brown quick fox who jumped over the lazy dog took a nap.
# A nap was taken by the brown quick fox that jumped over the lazy dog.
# A nap was taken by the brown quick fox, which jumped over the lazy dog.
# A nap was taken by the quick brown fox, which jumped over the lazy dog.
# The brown quick fox, which jumped over the lazy dog, took a nap.
# The quick brown fox which jumped over the lazy dog took a nap.
# The quick brown fox, which jumped over the lazy dog, took a nap.
# A nap was taken by the brown quick fox who jumped over the lazy dog.
# A nap was taken by the brown quick fox, who jumped over the lazy dog.
# The quick brown fox that jumped over the lazy dog took a nap.
# A nap was taken by the quick brown fox, who jumped over the lazy dog.
# The brown quick fox, who jumped over the lazy dog, took a nap.
# The quick brown fox, who jumped over the lazy dog, took a nap.
# A nap was taken by the brown quick fox, that jumped over the lazy dog.
# A nap was taken by the quick brown fox, that jumped over the lazy dog.
# The brown quick fox, that jumped over the lazy dog, took a nap.
# The quick brown fox, that jumped over the lazy dog, took a nap.
# A nap was taken by the quick brown fox which jumped over the lazy dog.
# The quick brown fox who jumped over the lazy dog took a nap.
# A nap was taken by the quick brown fox that jumped over the lazy dog.
# A nap was taken by the quick brown fox who jumped over the lazy dog.

The Jacy Japanese Grammar

from ace.paraphrase import generate_paraphrase
text = "太郎 が 次郎 に 本 を 渡し た"
paraphrase_list = generate_paraphrase(text, grammar='jacy')
for paraphrase in paraphrase_list:
    print(paraphrase)
# 太郎 が 次郎 に 本 を 渡し た
# 次郎 に 太郎 が 本 を 渡し た
# 次郎 に 本 を 太郎 が 渡し た

Metadata

Release files for ACEngine 0.0.5

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

Source distribution (sdist)

Source distribution for ACEngine 0.0.5
File Size Uploaded
ACEngine-0.0.5.tar.gz 3.8 kB Details

Release files / ACEngine-0.0.5.tar.gz

Download URL ACEngine-0.0.5.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ae1967140a2ba614d5990b9dff361cf1f507a34c69f543306f74802eae2af6c4
BLAKE2b-256 checksum
How to use checksums
37b00a3d3c1ceee70c1d49aff072c27f5d2329fb934159ecacceb4dddfbc0abf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.8

Release history Release notifications | RSS feed

This release

0.0.5 This release

1 release file

0.0.4

1 release file

0.0.2

1 release file

0.0.1

1 release file

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