public static String pickupUniqueWords(CompositeText document) {
		Set<String> words = new TreeSet<String>();
		Iterator<?> iterator = document.createIterator();
		while (iterator.hasNext()) {
			TextComponent token = (TextComponent) iterator.next();
			if (token.getName().equals(TextComponentName.TOKEN)) {
				if (token.getType().equals(TokenType.WORD)) {
					String value = token.getValue();
					words.add(value.toLowerCase());
				}
			}
		}
		char firstLetter = 'a';
		StringBuffer sb = new StringBuffer("\n");
		for (String word :words){
			if (word.length()>0){
				char letter = word.toLowerCase().charAt(0);
				if (firstLetter != letter ){
					firstLetter = letter;
					sb.append("\n");
				}
				sb.append(word+" ");
			}
		}
		return sb.toString();
	}