I wrote this in Raku… sorry in a private repo since just for personal use.
I tried to use LLM::Function for category matching and, in my brief excursion that way found that submitting bank description strings to LLMs is pretty much the antithesis of what they are good at.
My solution does regex, then L-D lexical distance, then opens the Raku repl for manual fixes…
<<Catmap run tries to do an exact match to the description and auto apply a category. Failing that, it does a levenshtein / damarau lexical distance and proposes a best match category, prompting for [CR]. Or you can override and assign to an existing category. Go cats at the prompt to get a list of active categories.>>
I tried to use LLM::Function for category matching and, in my brief excursion that way found that submitting bank description strings to LLMs is pretty much the antithesis of what they are good at.
My solution does regex, then L-D lexical distance, then opens the Raku repl for manual fixes…
<<Catmap run tries to do an exact match to the description and auto apply a category. Failing that, it does a levenshtein / damarau lexical distance and proposes a best match category, prompting for [CR]. Or you can override and assign to an existing category. Go cats at the prompt to get a list of active categories.>>