M dwmt.scm => dwmt.scm +15 -17
@@ 183,21 183,19 @@
(pk 'searching2)
-
(time
- (let loop ()
- (call-with-values warc-record-reader
- (lambda (h body)
- (let ((matches (delete-duplicates
- (aho-corasick-match ac body))))
- ;; (unless #f ;; (null? matches)
- ;; (display total*) (display " ")
- ;; (display (headers-ref h (string-downcase "WARC-Target-URI")))
- ;; (display " ") (display matches) (newline)))))
- (when (fx<? 4 (length matches))
- (display (headers-ref h (string-downcase "WARC-Target-URI")))
- (newline)
- (set! count* (fx+ count* 1))))))
- (pk total* count*)
- (set! total* (fx+ total* 1))
- (loop)))
+ (guard (ex (else (pk count*)))
+ (let loop ()
+ (call-with-values warc-record-reader
+ (lambda (h body)
+ (let ((matches (delete-duplicates
+ (aho-corasick-match ac body))))
+ ;; (unless #f ;; (null? matches)
+ ;; (display total*) (display " ")
+ ;; (display (headers-ref h (string-downcase "WARC-Target-URI")))
+ ;; (display " ") (display matches) (newline)))))
+ (when (fx<? 4 (length matches))
+ (display ".")
+ (set! count* (fx+ count* 1))))))
+ (set! total* (fx+ total* 1))
+ (loop))))
M dwmt/aho-corasick.scm => dwmt/aho-corasick.scm +0 -4
@@ 296,10 296,6 @@
(define fallback (state-next root))
- (define (dg o)
- (unless (fx=? o 0)
- (pk o)))
-
(unless (aho-corasick-finalized? aho-corasick)
(error 'aho-corasick "aho-corasick is not finalized"))