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)
# 太郎 が 次郎 に 本 を 渡し た
# 次郎 に 太郎 が 本 を 渡し た
# 次郎 に 本 を 太郎 が 渡し た
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ACEngine-0.0.4.tar.gz
(3.7 kB
view details)
File details
Details for the file ACEngine-0.0.4.tar.gz.
File metadata
- Download URL: ACEngine-0.0.4.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d79033b612163ab6591e23a85593b816528dc98d8b7a3ddabc6cbea12a0fe77
|
|
| MD5 |
1ee99e153bed0c97b422b7bf218790cf
|
|
| BLAKE2b-256 |
24c84b175f3f5e15afcbb89072dedbe6d294491fc9093c70cf1024fff746b4b5
|