News for hackers. Stuff that matters.
Re:Jaccard Index by B0073D on Sunday March 19, 2023 @08:38PM (#35225579)
Recently I wanted to try and use this to filter out logs I don't care about, but it seemed a lot more involved than I initially thought.

I essentially wanted to use this as a way to flexibly filter out items without having to come up with a regex for every line item.

I wonder if anyone has done this before...

Re:Jaccard Index by dopidopHN on Sunday March 19, 2023 @09:10PM (#35225917)
I often feel modern tools should offer that
Re:Jaccard Index by ta988 on Monday March 20, 2023 @12:21AM (#35227248)
Bayesian filters like for emails? You mark them as important or noise and over time it will learn. These are extremely easy to put in place and you don't have to preannotate as it learns as you go.
Re:Jaccard Index by nl on Monday March 20, 2023 @05:25AM (#35229105)
Yes Bayesian filters work well for this.

I had an idea Splunk had them built in? But it's about 5 lines of Python anyway.

Re:Jaccard Index by zamadatix on Monday March 20, 2023 @12:51AM (#35227426)
Could always rely on the Levenshtein distance. You have to be careful with similarity approaches though as you may end up filtering important messages because they are structurally similar to the unimportant message.
Re:Jaccard Index by voldacar on Monday March 20, 2023 @08:48AM (#35230724)
Maybe you could use a language model embedding to define some kind of semantic distance.
Re:Jaccard Index by funkylisp on Monday March 20, 2023 @04:49AM (#35228865)
Just filter out logs by the file, line that generated it (i.e. that had the log statement). Even if the actual log entry changes (e.g. because of a formatted str with vars) they will always have the same source.