Skip to main content

Generates permutations of all sentences, using list of words

Project description

ak-phrase.py

Build Status Repo Size Downloads LICENSE Version Last Commit

This library generates all the permutations of sentences from words in a 2D array.

It follows the word orders in sentence, same as the words order in array column wise.

Installation

$ pip3 install ak-phrase.py

Usage

from ak-phase.py import SentenceGenerator

word_lists = [['eat'], ['code', 'commit'], ['sleep']]

sentences = SentenceGenerator.generate_sentences(word_lists)
print(sentences)

# Output:
# [ 'eat code sleep', 'eat commit sleep' ]

Contributing

Interested in contributing to this project? You can log any issues or suggestion related to this library here

Read our contributing guide on getting started with contributing to the codebase

Contributors

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

ak-phrase.py-1.0.6.tar.gz (1.7 kB view hashes)

Uploaded Source

Built Distribution

ak_phrase.py-1.0.6-py3-none-any.whl (14.2 kB view hashes)

Uploaded Python 3

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