Take the 2-minute tour ×
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It's 100% free, no registration required.

Mostly I am interested in characters 32 through 126 (space, special characters, numbers, and upper and lower case letters) but the others would be good to know as well, especially the del, backspace, tab, and newline characters.

I have been told that there is a huge difference in the answer for different situations such as writing code versus writing a novel. Due to this problem I would like to use the average case for a large number of people with a wide variety of usage. Perhaps the same criteria that the people behind Dvorak used.

I plan on experimenting with chorded keyboards and I wanted this data so that I could assign the most common characters to the easiest chords and assign the least common characters to the most difficult chords. I don't actually need it yet since I haven't found how to intercept and replace keyboard events yet. In theory I don't need it at all and I could set all the chords at random but I am a bit of a perfectionist and wanted to optimize and generalize it. The reason for ASCII characters is that it should ensure complete coverage barring the use of additional character sets.

share|improve this question
    
Thanks alexei for the tag change, I didn't even think of using "strings". Though I think it is still not optimal for my question it is much better than before. –  Silhalnor Dec 19 '12 at 5:10
4  
Characters frequency depends on language you are using. en.wikipedia.org/wiki/Letter_frequency –  Bartek Dec 19 '12 at 6:47
    
Do you have a particular purpose in mind? Are you asking about what people type on keyboards (in which case it's highly dependent on use and locale) or what appears in files (where the answer is likely to be influenced by things like common opcodes on popular architectures, and by whether you consider stored bytes or unique files, etc)? Why the restriction to ASCII characters? –  Gilles Dec 19 '12 at 22:01
    
@Gilles I plan on experimenting with chorded keyboards and I wanted this data so that I could assign the most common characters to the easiest chords and assign the least common characters to the most difficult chords. I don't actually need it yet since I haven't found how to intercept and replace keyboard events yet. In theory I don't need it at all and I could set all the chords at random but I am a bit of a perfectionist and wanted to optimize and generalize it. The reason for ASCII characters is that it should ensure complete coverage barring the use of additional character sets. –  Silhalnor Dec 19 '12 at 23:35
add comment

1 Answer

There are large quantities of text of either type you mention available for free on the internet. For example, C code is available from open-source projects, and novels are available from the Gutenberg project. Challenge yourself and write a program that takes a list of files and calculates their histogram. This way, you can answer your question yourself.

share|improve this answer
    
This is true and I did consider doing this but I was hoping for professionally produced data because there are bound to be many factors that I have not even considered and many different styles which I may not account for. Web articles, transcripts, and YouTube comments for instance will differ. Then there are characters like delete which I can't account for. Fortunately there are few such characters and the data doesn't need to be that accurate so I might do this. It may even be a fun little side project. –  Silhalnor Dec 19 '12 at 20:09
    
Your last point is by far the most important - the data doesn't need to be that accurate. If you really hunt you could probably find CHI studies on keyboard use for things like the delete key, but searching through source repositories and/or text corpora would absolutely be the first starting point. –  Steven Stadnicki Dec 21 '12 at 0:36
add comment

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.