I'm not sure I see the problem. Ledger is designed to have any categories
in any grouping you want. You might have Expenses:Electicity, Expenses:Gas,
Expenses:Food etc. Your bal report would list subtotals for each of these
categories and you could do a reg report on any individual categories if
you wanted more detail.
Eg:
2021/12/01 * Electric Company
Expenses:Electricity $250.00
Bank:Mastercard
2021/12/02 * Gas Company
Expenses:Gas $110.00
Bank:Mastercard
2020/12/03 * Shopping Centre
Expenses:Food $140.00
Bank:Mastercard
$ ledger -f sample1.txt bal | cat
$-500.00 Bank:Mastercard
$500.00 Expenses
$250.00 Electricity
$140.00 Food
$110.00 Gas
--------------------
0
$ ledger -f sample1.txt reg "Food" | cat
20-Dec-03 Shopping Centre Expenses:Food $140.00
$140.00
$ ledger -f sample1.txt reg "Mastercard" and @Electric | cat
21-Dec-01 Electric Company Bank:Mastercard $-250.00
$-250.00
On Tuesday, December 21, 2021 at 7:56:04 AM UTC+8 Aaron Stacy wrote:
> Hi, I'm looking for suggestions for categorizing spending (not so much
> things like paycheck, brokerage transactions, etc, but stuff like credit
> card spending for budgeting). My ledger has around 2800 transactions over
> about 2 years, so it's not a ton of data, but it seems like enough that I
> could leverage something smarter than just string matching the transaction
> narrations.
>
> Does anyone have recommendations for categorizing spending?
>
> I'm thinking of applying a full text search index as follows:
>
> - Each expense account is a "document".
> - The document contents is the narration of every transaction for that
> account.
> - To categorize a new transaction, use an engine like Lucene
> <https://lucene.apache.org> to or sklearn.TfidfVectorizer and pick the
> most likely account.
>
> Any thoughts on this approach? (aside from being over-engineered. I'm an
> engineer, IDK what to tell you it's what I do)
>
> Thanks!
>
--
---
You received this message because you are subscribed to the Google Groups
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ledger-cli/db8bb8fa-a948-4020-acf5-5e81617ee439n%40googlegroups.com.