Fixing confused bayesian matching data?

John Ralls jralls at ceridwen.us
Fri Jul 29 22:12:39 EDT 2016


> On Jul 29, 2016, at 5:48 PM, Lincoln A Baxter <lab at lincolnbaxter.com> wrote:
> 
> On Fri, 2016-07-29 at 02:55 -0700, Jim DeLaHunt wrote:
>> Philip:
>> 
>> Sorry for the delay in responding to your message. I waited until I
>> had 
>> something useful posted where you could see it.
>> 
>> I was in exactly your situation back in February.
>> 
>> On Sun, 17 Jul 2016 21:24:56 -0400, Philip Matthews 
>> <philip_matthews at magma.ca> wrote:
>>> Just wondering if anyone has any advice on what to do with some
>> very confused bayesian matching data?
>>> 
>>> Right now, when I import new transactions (either CSV or QFX), they
>> mostly don't find a match anymore. Only around 20 - 30% match.   This
>> is probably because I like to rejig my accounts from time to time as
>> I continue to figure out what works best for me.  Looking through the
>> ".gnucash" file, I see lots of slot entries with account names that
>> don't exist any more....
>>> 
>>> ...Write a Python program that goes through the .gnucash file and
>> deletes slot entries that point at accounts that don't exist any
>> more.
>>> 
>>> Comments?  Other thoughts?
>>> 
>>> Running GnuCash 2.6.11 on a Mac.
>> 
>> My solution? XSLT processing <https://en.wikipedia.org/wiki/XSLT>. 
>> GnuCash files can be saved as XML format data, and XSLT is a tool
>> for 
>> modifying XML data in a controlled, reliable way. I wrote a set of
>> XSLT 
>> filters which:
>> 
>>  1. lists the Bayes mapping data for each account in a gnucash XML
>> file;
>>  2. resets the import mapping, by deleting all the Bayes mapping data
>>     for every account in a gnucash XML file; and
>>  3. prunes the import mapping data for certain target accounts in a
>>     gnucash XML file.
>> 
>> A rather brief explanation of the situation and the GnuCash file
>> format, 
>> with listings of all the XSLT filters, is in my freshly-written blog 
>> post, /Resetting GnuCash’s import transaction matching/ 
>> <http://blog.jdlh.com/en/2016/07/29/resetting-gnucashs-import-transac
>> tion-matching/>. 
>> Take a look. I hope it's helpful.
> 
> This prompts me to reply with a newer version of the perl script I
> posted sometime back to do this. (and a whole lot more).  I have also
> attached the text of the full man page imbedded in this script.  
> 
> Another GC user (Cheryl Wheeler) provided a patch that is incorporated
> into this version.  I have been discussing with Chris Good a more
> permanent location for this script, which can then be referenced in the
> GnuCash wiki. But I have not had time to do much work on that however,
> so I repost the script here for now.

Github would be a good place...

Regards,
John Ralls


More information about the gnucash-user mailing list