Skip to main content

artifical unintelligence, a funny AI

Project description

Python Package Exercise

Artifical-Unintelligence

Status

Our Project

Our project, artifical unintelligence, builds upon the rapidly growing AI/ML field. It is an evolution (but backwards) of AI/ML. By randomly generating dubiously meaningful sentences, we can bring the field to the next level (maybe).

By: Jonathan Gao, Jason Mai, Nawab Mahmood, dibukseid

Link to PyPI website for the proj

How-To

Demo Link to example project.

Installation

In terminal or console or bash, type

pip install artificial-unintelligence

Importing and Using

In your project include

import artificial_unintelligence

from artificial_unintelligence import random_sentence_reply, get_random_word, generate_sentence, keyboard_smash

Functions

Get a random word

Use the get_random_word function. The parameters can be 'noun', 'verb', or 'adjective'.

#To get a random noun
random_noun = get_random_word('noun')
#print(random_noun) 
#The output would look something like :'dog'

#To get a random verb
random_verb = get_random_word('verb')
#print(random_noun)
#The output would look something like : 'jump' 

#To get a random adjective 
random_adjective = get_random_word('adjective')
#print(random_adjectove)
#The output would look something like 'happy'

Generate a random sentence

Use the random_sentence function to unintelligently reply to a query that is inputted as an argument into the function. It takes any string as an argument.

#Reply to a query with a randomly generated sentence. 
random_sentence = random_sentence_reply('what do you think of fishes')
#print(random_sentence)
# This output would be for example : "Quickly happy zebra loudly jumps scary car in big tree."

Generate Letter-Specific Sentences

Use the generate_sentence function to generate a sentence that all starts with the same letter. It takes an input as an argument or parameter.

# To generate a sentence where the words start with e
e_sentence = generate_sentence('e')
#print(e_sentence)
#example output would be: Electric eels emulsify eaton

Keyboard Smash (for frustration)

Use the keyboard_smash function to create a sentence where the first letter matches with the letters of the keyboard smash. It takes a string as an argument or parameter.

#to convert a keyboard smash such as 'lkjae' 
smash_text = keyboard_smash("lkjae")
print(smash_text) 
#example output would be : light kind joeys after emus

Set Up the virtual environment, install dependencies, build and test

Clone the repository

git clone https://github.com/software-students-spring2025/3-python-package-zebrazooka.git

To run, please first install pipenv in your console/terminal/bash.

Pip install pipenv

Then go to the directory where the repo clone in your computer's terminal or console.

Install the development environment and dependencies. --dev is important for pytest.

pipenv install --dev

Install the package in development mode. If no edits would need to be made, then the -e can be removed.

pipenv install -e . 

Run the demo using pipenv

pipenv run python demo.py 

If you would like to contribute

Follow the steps to set Up the virtual environment, install dependencies, build and test , make sure to do the 'pipenv install -e .' command for easy editing.

Then create a new branch

git checkout -b newfeature

Make your updates

Run the tests

pipenv run pytest

commit the changes

git commit -m 'some new feature'

Push to the branch

git push origin newfeature

Then go to github and open a pull request.

How to import data

Our github repo already comes ready with a word bank, with this structure:

"a": {
        "nouns": ["apple", "astronaut", "ant"],
        "adjectives": ["amazing", "angry", "awesome"],
        "verbs": ["arrive", "ask", "admire"],
        "adverbs": ["anxiously", "angrily", "awkwardly"]
    },

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

artificial_unintelligence-0.1.3.tar.gz (47.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

artificial_unintelligence-0.1.3-py3-none-any.whl (33.4 kB view details)

Uploaded Python 3

File details

Details for the file artificial_unintelligence-0.1.3.tar.gz.

File metadata

File hashes

Hashes for artificial_unintelligence-0.1.3.tar.gz
Algorithm Hash digest
SHA256 3bc1c75a33f9d2e170d496df09bd7cb7c943bd7b57b20533e05ec261300adb4c
MD5 a0dcba6eeb0b68662dabc4a386761fd1
BLAKE2b-256 a0abc35345c9dfeed7ba5ce9d9badcdca4242c9b993d1b696dab885773102c41

See more details on using hashes here.

File details

Details for the file artificial_unintelligence-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for artificial_unintelligence-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ae3c38b04d5b2f4402b067584127d0800ed0d26c99f091c117dd3050b6b4e8ec
MD5 bbc74c95b756fdc5a5881cb3ee8168fe
BLAKE2b-256 9870a1afda07f2573d59fff247336e1126588a505b4d9da1a1a7387af74fe6b2

See more details on using hashes here.

Supported by

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