• 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,  Machine Learning And Artificial Intelligence,  Programming

    Detect Deepfakes and Hacked Audio Programmatically

    Deepfakes are a type of synthetic media where a person replaces parts of an image or video with something else, like someone’s likeness. The act of creating deepfakes is known as deepfakery. Deepfakes can be used to create fake news, spread misinformation, or damage someone’s reputation. They can also be used by a service like JibJab just to be funny, although those are obviously cartoonish and not meant to actually fool anyone. There are a number of different approaches to detecting deepfakes. Some of these approaches are based on image forensics, which is the study of digital images to identify and extract hidden information. Other approaches are based on machine…

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

    Detecting LLM-Generated Code

    Large language models (LLMs) are a type of artificial intelligence that generates text, translates languages, writes different kinds of creative content, creates net-new artistic works, and answers questions in an informative way. They are trained on massive datasets of text and code, and can learn to produce human-quality output. Because of how they import massive troves of data and create similar content, they can then be fairly formulaic in their output.  A few things to look for to help determine if code was written by an LLM: If you are suspicious that a piece of code was written by an LLM, you can use a number of tools to help…

  • Machine Learning,  Machine Learning And Artificial Intelligence,  Programming

    Detecting AI-Generated (LLM) Content In Articles

    We hear more and more about the pros and cons of AI. There is a movement to regulate the use, movies about dangers of sentient robots, and those who think AI will free humanity from any boring work, or work that involves a lot of repetitive tasks. Going back to the 1950s and 1960s, what they called AI (or what we might call small shell scripts these days) were supposed to “Augment Human Intellect” as the great Doug Englebart wrote about in his 1962 article https://www.dougengelbart.org/content/view/138 or Vannevar Bush’s “As We May Think” from 1945, available at https://www.theatlantic.com/magazine/archive/1945/07/as-we-may-think/303881/. What is an LLM? A large language model (LLM) is a type…

  • 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…

  • Java,  Machine Learning,  Machine Learning And Artificial Intelligence,  Uncategorized

    12+ Machine Learning Libraries For Java Projects

    It seems like a lot of people are using micro services that are hosted by a third party vendor to process various bits of natural language processing and other tasks that typically get lumped into the “Machine Learning” bucket. But there are a lot of environments that need self-contained systems. Especially when it’s simple to build a small project to do a task using something like Python’s nltk, but when you start hammering those microservices you build with those tools you start to feel how their ease-of-use can make them a bit more sluggish than purpose-built tooling (I guess that’s true for everything in software development). So let’s look at…

  • Machine Learning

    lightweightsentiment

    Worked on a little sentiment analysis tool. The goal was to have a natural language processor that would report back a basic polarity score on text provided. So lightweightsentiment is a Lightweight Sentiment Analysis Tool built using the nltk (natural language toolkit) python framework. Requirements lightweightsentiment was written to conform to python 2 or 3 and requires the following modules installed (newer versions may work): nltk==3.4.5 textblob==0.15.3 To install nltk run: python -m textblob.download_corpora Usage Simply run the input.py script with a –text option and then some text to see sentiment. For example: python input.py --text "Gosh, I hate this feature" The output would then be a number between -1.0…