diff --git a/PyAI.egg-info/PKG-INFO b/PyAI.egg-info/PKG-INFO new file mode 100644 index 0000000..6bb3b36 --- /dev/null +++ b/PyAI.egg-info/PKG-INFO @@ -0,0 +1,44 @@ +Metadata-Version: 2.1 +Name: PyAI +Version: 3.5 +Summary: PyAI +Author: Mitchell Shibilski-Unkel +Author-email: None +Keywords: python,ai,machine_learning,nlp +Classifier: Intended Audience :: Developers +Classifier: Programming Language :: Python :: 3 +Classifier: Operating System :: Unix +Classifier: Operating System :: MacOS :: MacOS X +Classifier: Operating System :: Microsoft :: Windows +Description-Content-Type: text/markdown +License-File: LICENSE +Requires-Dist: torch +Requires-Dist: numpy +Requires-Dist: whisper +Requires-Dist: spacy + + +# PyAI +This open-source library includes both an RNN and a KNN algorithm. In addition to these algorithms, PyAI offers a simple NLP and adds a way to convert audio into text through *Whisper*. + +Clone: `gh repo clone MitchellShibilski-Unkel/PyAI`
+Installation: `pip install git+https://github.com/MitchellShibilski-Unkel/PyAI.git@main` + +# Algorithms +- RNN +- KNN +- ReLU +- Softmax + +# NLP +Able To Do: +- Gets sentence tense +- Gets each word and sentence +- Able to change the type of tokenization `(letters, words, or sentences)` +- Able to get the part of speech of a word + +# Audio +Able To Do: +- Able to convert audio to text +- Get the language used in the audio +- Translate one language to another diff --git a/PyAI.egg-info/SOURCES.txt b/PyAI.egg-info/SOURCES.txt new file mode 100644 index 0000000..8577cd1 --- /dev/null +++ b/PyAI.egg-info/SOURCES.txt @@ -0,0 +1,8 @@ +LICENSE +README.md +setup.py +PyAI.egg-info/PKG-INFO +PyAI.egg-info/SOURCES.txt +PyAI.egg-info/dependency_links.txt +PyAI.egg-info/requires.txt +PyAI.egg-info/top_level.txt \ No newline at end of file diff --git a/PyAI.egg-info/dependency_links.txt b/PyAI.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/PyAI.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/PyAI.egg-info/requires.txt b/PyAI.egg-info/requires.txt new file mode 100644 index 0000000..285fcaa --- /dev/null +++ b/PyAI.egg-info/requires.txt @@ -0,0 +1,4 @@ +torch +numpy +whisper +spacy diff --git a/PyAI.egg-info/top_level.txt b/PyAI.egg-info/top_level.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/PyAI.egg-info/top_level.txt @@ -0,0 +1 @@ + diff --git a/dist/PyAI-3.5-py3.10.egg b/dist/PyAI-3.5-py3.10.egg new file mode 100644 index 0000000..e225db9 Binary files /dev/null and b/dist/PyAI-3.5-py3.10.egg differ diff --git a/pyai.py b/pyai.py index 4920569..ac67a57 100644 --- a/pyai.py +++ b/pyai.py @@ -1,8 +1,9 @@ -import numpy as np -import whisper import spacy +import whisper +import numpy as np from torch import nn from torch import Tensor +from sklearn.tree import DecisionTreeRegressor class PyAI: @@ -60,6 +61,12 @@ def Softmax(self, x): soft = nn.Softmax(dim=1).to("cpu")(x) return soft + + def decisionTree(self, trainX: list, trainY: list, words: list): + w = np.array([len(a) for a in words]).reshape(-1, 1) + tree = DecisionTreeRegressor() + tree.fit(trainX, trainY) + return tree.predict(w).tolist() class Audio: def __init__(self, audio: str): @@ -143,4 +150,4 @@ def getTokens(self): def getPartOfSpeech(self, text: str): POS = spacy.load("en_core_web_sm") - return POS(text)[0].tag_ + return POS(text)[0].tag_ \ No newline at end of file diff --git a/setup.py b/setup.py index 2327164..0b57c95 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ with codecs.open(os.path.join(here, "README.md"), encoding="utf-8") as fh: long_description = "\n" + fh.read() -VERSION = 'v3.5' +VERSION = 'v4.0' DESCRIPTION = 'PyAI' LONG_DESCRIPTION = '-' @@ -21,7 +21,7 @@ long_description_content_type="text/markdown", long_description=long_description, packages=find_packages(), - install_requires=['torch', 'numpy', 'whisper', 'spacy'], + install_requires=['torch', 'numpy', 'whisper', 'spacy', 'sklearn'], keywords=['python', 'ai', 'machine_learning', 'nlp'], classifiers=[ "Intended Audience :: Developers",