Hi all,
I had a discussion about this infographic[1], which suggest that the
optimum subject line length is > 50 characters; probably a typo for '<
50 characters', but still it seemed a bit long...
So I wondered what the average line length is... trivial with mu-guile!
So let me share this snippet.
--8<---------------cut here---------------start------------->8---
(use-modules (mu) (mu stats))
(mu:initialize)
(let ((len 0) (n 0))
(mu:for-each-message
(lambda (msg)
(set! len (+ len (string-length (or (mu:subject msg) ""))))
(set! n (+ n 1))))
(if (= n 0) 0 (/ len n)))
;; => 1004611/27553, ie. 36.5
;; however, there's a shorter way, a one-liner.
(mu:average (lambda (msg) (string-length (or (mu:subject msg) ""))))
;; which yields the same answer
--8<---------------cut here---------------end--------------->8---
There's quit an amazing amount of data to be mined from your email
corpus... would be fun to do something like [2] using mu-guile.
Cheers,
Dirk.
[1]
https://image-store.slidesharecdn.com/e93387b2-e803-11e3-87eb-12313d044945-original.png
[2] http://blog.wolfram.com/2012/04/05/analyzing-your-email-with-mathematica/
--
Dirk-Jan C. Binnema Helsinki, Finland
e:[email protected] w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C
--
You received this message because you are subscribed to the Google Groups
"mu-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.