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.2.tar.gz (45.8 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.2-py3-none-any.whl (31.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for artificial_unintelligence-0.1.2.tar.gz
Algorithm Hash digest
SHA256 68302eb235a146fd2638e98edfb77d8cf169bc5b3ec893c71fd98fa52a19777b
MD5 a7eeff32ddb5c48f009a3d1bcc7ff54c
BLAKE2b-256 d2674498e6d82ba8ade57deb52f1187eba435c38d0b4c89631ace0a4957b8716

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for artificial_unintelligence-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ed4c1f8009d952743520aa94d1786f265a3e6d81c3a76e354da1f9ad9734711d
MD5 fc5b2653e6692bd451793f4ada1961ef
BLAKE2b-256 d0f0fa35a1756d5df69f8a957a9f991b6a24282b827ce7e1faba0be664fa2210

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