• Apple,  Machine Learning,  Machine Learning And Artificial Intelligence,  Programming,  Swift

    New App TestFairy Writes Unit Tests With AI

    I just posted a new app to GitHub called TestFairy. It’s at https://github.com/krypted/TestFairy. It automatically generates unit tests for either a file or a highlighted piece of swift code. It does this using the OpenAI API, so leverages a LLM to write test code. It’s pretty straight forward. Simply highlight the code and in the Editor Menu, click TestFairy, then Generate Tests. I had hoped to post it for free to the App Store, but I didn’t want to distribute my OpenAI API key, or write an intermediary microservice that housed my key that an app uses. The use of an API key is considered an end-around to the In-App…

  • Machine Learning

    Sentiment Analysis In Action

    Sentiment analysis is the automated analysis of content like text or speech as positive, neutral or negative. That positive or negative analysis can be considered looking at the polarity of the words and a result of sentiment analysis is often a polarity score. This type of scoring allows organizations to better understand how constituents see them. This might mean analyzing Twitter or Facebook, tagging a sentiment score on blog posts or comments on posts.  Using technology like sentiment analysis we get insight into how clients and employees see products, the company, support cases, or services. This is usually done using natural language processing part of a body of work we…

  • Machine Learning And Artificial Intelligence,  Python

    Lightweight Python Tagger Using NLTK

    Recently I was looking at automating the tagging of content from a mysql database. NLTK (Natural Language Training Kit) to the rescue to make this pretty easy. This GitHub project wraps NLTK into a small script to tag and provides a class for excluding words: Once the tagger was written we could add cursor.execute() or cursor.fetchall() as a way to bring in input from mysql content or since it’s a one-time run, we can use a simple mysql query run from bash and dump the output into the script as follows: mysql -X -u $supersecretUSER -p$supersecretPASS -h$HostName -D$MyDB -e'SELECT notes FROM tablename > notes.json lightweighttagger.py In the above just swap…

  • Python

    7 Python Machine Learning Modules To Get Acquainted With

    A lot of machine learning work has been done in python. Therefore, there are a few python modules that make the work of normalizing data, analyzing data, and training algorithms much easier. Let’s look at a few of these and if you have suggestions, please feel free to comment! Tensorflow Tensorflow is more of an ecosystem, but you can import it into a python project and build some pretty amazing stuff relatively quickly. You usually see it imported as just tf: While it helps to have a basis in linear algebra and vector calculus that’s not entirely necessary. A tensor is an object that is similar to a vector but…

  • Python

    Linear Algebra in Python Scripts

    Preparing data for tensorflow is often easiest when done as a two step process. In machine learning, you often get into trying to plot points, calculate tangents, and a lot of basic algebra. Working out equations kinda’ reminds me of being in in-school suspension in high school. Except now we’re writing code to solve the problems rather than solving them ourselves. I never liked solving for a matrix… But NumPy is a great little framework to import that does a lot of N-dimensional array work. A few basic tasks in the following script includes a number of functions across norms, matrix products, vector products, decompose, and eigenvalues. Remove/comment what you…

  • Machine Learning And Artificial Intelligence

    10 Laws of Support Chatbots

    I really enjoy chatbots. They can be way more pleasant to work with than some some service desks out there who are after cheaper rather than better support options for customers. And rarely do we see a service desk that isn’t growing at a slower rate than customer growth, so in most cases they’re fast to get to and easier to train that actual humanness. But some chatbots are amazing and others can be terrible. So let’s look at Asimov’s, er I mean, my laws of chatbots: Chatbots should be connected to an extensive list of content to analyze and make recommendations so they can meaningfully answer questions. Chatbots should…