Chris Thompson - AC2CZ - Amateur Radio Station

On the bench:

2015-Feb-22 - My 30 year struggle with CW

I passed the 12 words per minute morse code test nearly 30 years ago to get my class A license G0KLA. But that in itself was a real struggle. I didn't use morse code then and when I took a break from the hobby almost all knowledge of CW evaporated from my head. When I came back a few years ago, I found that CW was as prevalent as ever. My station is mostly focused on 40m and I have worked through nearly all of the easily available phone DX stations. Almost everything that I need is on CW.

So I started to learn the code again, primarily with G4FON's excellent program that uses the Koch method, which is best explained by Dave Finley, N1IRZ. The method works, but it is boring. Training with Morse Runner is more fun, because it becomes a game, but I find myself translating the characters in my head, and hitting the QRZ button when I miss a callsign, rather than knowing them instinctively.

In an effort to make the Koch method more interesting, I wrote a short Java program to parse standard dictionary words into sets that matched the letters I was learning. Specifically I extracted sets of words that contain only the valid characters at each level. I extracted these from the dictionary that is included with the Eclipse Development environment. I also included callsigns and numbers.

You can grab the files that I generated and use them with G4FONs program. Just put them in the words subdirectory and they will appear in the words menu. You need to set the Characters spinner to 40 for the words menu to appear. You then pick an individual file from the words menu and it sends random words from that file.

I only generated words from 12 characters onwards because I found the learning easy until I got to about 14 or 15 characters. I've included the program below so that you can generate other combinations if you want. Or send me an email and I can generate other types of files.

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.io.Writer;


public class CwExtractMain {
	static int start = 12;
	static char[] letters = {'K','M', 'R', 'S', 'U', 'A', 'P', 'T', 'L', 'O',
			'W', 'I', '.', 'N', 'J', 'E', 'F', '0', 'Y', 'V',
			',', 'G', '5', '/', 'Q', '9', 'Z', 'H', '3', '8',
			'B', '?', '4', '2', '7', 'C', '1', 'D', '6', 'X'};
	
	public static void main(String[] args) {
		
		for (int i=start; i < 41; i++) {
			String f = "Type"+i+"words.txt";
			saveFile(i, f);
		}
		
	}

	public static void saveFile(int number, String name) {
		String dict = "dict.txt";
		File inputFile = new File(dict);
		RandomAccessFile infile;
		System.out.println("Opening Source file: " + dict);

		File output = new File(name);
        //RandomAccessFile outfile;
        
        System.out.println("Saving Output in file: " + name);

		
		try {
			infile = new RandomAccessFile(inputFile, "r");
			//outfile = new RandomAccessFile(output, "rw");
			Writer outfile = new BufferedWriter(new FileWriter(output, true));
			String line = "";
			while (line != null) {
				line = infile.readLine();
				if (line != null) {
					if (validWord(line, number))
						//System.out.println(line);
						outfile.write(line + "\n");
				}
			}
			outfile.close();
			infile.close();
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

	/**
	 * If the character c is one of the valid characters then return true, else false
	 * @param c
	 * @return
	 */
	public static boolean validChar(char c, int num) {
		String s = new String();
		s = s + c;
		s = s.toUpperCase();
		for (int i=0; i < num; i++) {
			if (s.charAt(0) == letters[i]) return true;
		}
		return false;
	}
	
	/**
	 * Check every letter in the word.  If any are not valid then return false
	 * @param s
	 * @return
	 */
	public static boolean validWord(String s, int num) {
		for (int j=0; j<s.length(); j++) {
			char t = s.charAt(j);
			if (!validChar(t, num))
				return false;
		}
		return true;
	}
}


Enter Comments Here:

Name:

Answer this question to help prevent spam (one word, not case sensitive):
The third planet from the sun is called what?


Comments on this post

On: 07/01/15 4:04 Greg said:
Thanks for your info... I like the Word file idea, especially if loaded with common QSO words and abbreviations. I have read that it is best to learn to recognize "words" as a whole rather than the individual letters.

The problem is finding a group of QSO words that use common abbreviations. Eg; word group programs will include "and" but not "es".. granted both are well used, but you get the idea.

I can copy 15WPM, but find my problem is learning at one speed makes a different speed difficult. If I get good at 20 wpm copy, trying to copy at 15 WPM is most difficult because i have learned to recognize the "sound" at that speed. I am sure you get the idea and wonder if you have any comments.

Copying in your head, rather than writing it down work well for me, but over a certain speed I find recalling the words, after mentally retained, a problem. I also trained my hand to write down the letter as heard, rather than just mentally, and it has saved me and seems to work better for faster speeds.

I have no "on air" experience and do not do any sending. Something I should be doing, no doubt. Recording yourself sending , and later trying to decode was the best thing I have done. For the guys who run all their letters together , or have a bad 'Great Lakes swing"- please try it and see how bad you really send. It certainly showed me I was not leaving enough space between letters.

thanks again for your Java andd info

Greg

On: 07/01/15 11:11 Chris g0kla said:
Thanks for the comments Greg. Glad this was useful. I have not tried recording myself sending and then decoded it. That's a nice suggestion. I have tried sending and decoding it with a program such as FLDIGI. That teaches you to send good code as well. 73 Chris

Copyright 2001-2021 Chris Thompson
Send me an email