Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Many programs can save you some typing by setting up shortcuts for commonly typed words. For example you could always replace @gm with @gmail.com. I'm having trouble coming up with a list of things I type frequently and I'm looking for an automated way to discover good candidates.

share|improve this question

1 Answer 1

Sounds like you'd love AutoHotkey's AutoCorrect script.

The following script uses hotstrings to correct about 4700 common English misspellings on-the-fly. It also includes a Win+H hotkey to make it easy to add more misspellings

If you really want to know what your most commonly typed words are:

1.) Grab a keylogger that will log to flat files in a plain text format, such as pykeylogger. Note that it can also use delimiters for easier parsing such as CSV. Run it for a day or however long you want until you have enough data to make your word preference more obvious.

2.) And then use this simple program I quickly threw together to count the words (assumes CSV file):

#!/usr/bin/perl

use warnings;
use strict;
my %unique = ();

open FH,"< data.txt" or die $!;

while (<FH>)
{
  chomp;
  my @words = split/,/,$_;
  foreach(@words)
  {
      $unique{$_}++;
  }
}

close FH;

foreach(reverse sort {$unique{$a} <=> $unique{$b}} keys %unique)
{
    print "$_ => $unique{$_}\n";
}

That will go through each line in a CSV format file, and create a hash containing every word in the file along with how many times it occurs.

Sample input:

test,test,test,word,test,other,something,test
something,test,word,test,test
word,test

Sample output:

john@awesome:~$ chmod +x count.pl
john@awesome:~$ ./count.pl
test => 9
word => 3
something => 2
other => 1
share|improve this answer
    
That's the most readable Perl code I've ever seen. :) –  Sasha Chedygov Aug 12 '10 at 23:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.