From 73be936f3cdfd24d95c4f4dd4f3b44127d7dab95 Mon Sep 17 00:00:00 2001 From: Aleteoryx Date: Sun, 24 Nov 2024 03:25:17 -0500 Subject: [PATCH] heuristic tweaks --- src/algos/tclposting.tcl | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/algos/tclposting.tcl b/src/algos/tclposting.tcl index dbf1cdf..83c07b7 100644 --- a/src/algos/tclposting.tcl +++ b/src/algos/tclposting.tcl @@ -2,8 +2,9 @@ namespace eval ::algos::tclposting { variable log [logger::init algos::tclposting] proc intake {uri text data} { variable log - if {![regexp -nocase -- [join { - {\mtcl(/tk)?\M} + + # high high confidence strings + if {[regexp -nocase -- [join { {\.tcl} {tclsh} {tcl-lang} @@ -12,11 +13,12 @@ namespace eval ::algos::tclposting { {tklib} {tcl\.tk} {tcllang} - {tkinter}} | ] $text] && - ![regexp -- {\mTk\M} $text]} \ + {tkinter}} | ] $text]} \ { - return + return [dict get $data commit record createdAt] } + if {![regexp -nocase -- {\mtcl(/tk)?\M} $text] && + ![regexp -- {\mTk\M} $text]} return if {[regexp -nocase -- [join { {Title Tk} @@ -26,12 +28,11 @@ namespace eval ::algos::tclposting { {television} {DVDVR} {wrestling} - {tk mclaren}} | ] $text]} \ - { - return - } + {tk mclaren}} | ] $text]} return - if {[regexp -nocase -- {chin(a|ese)} $text] && [regexp -nocase -- {theater|movie} $text]} return + # "TCL Chinese Theater" + if {[regexp -nocase -- {chin(a|ese)} $text] && + [regexp -nocase -- {theater|movie} $text]} return return [dict get $data commit record createdAt] } -- 2.45.2