⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 spellcheckertest.java

📁 拼写检查器
💻 JAVA
字号:
package 拼写检查器;

public class SpellCheckerTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自动生成方法存根
		SpellChecker spellChecker = new SpellChecker();
		for (char i = 'A'; i <= 'z'; i++) {
			if ((i >= 'A' && i <= 'Z') || (i >= 'a' && i <= 'z')) {
				String s = i + "";
				spellChecker.addToDictionary(s);
			}
		}
		for (int j = 0; j < 1000; j++) {
			String s = j + "";
			spellChecker.addToDictionary(s);
		}
		spellChecker.addToDictionary("My name is HOU Liangwei.");
		spellChecker.addToDictionary("My");
		spellChecker.addToDictionary("name");
		spellChecker.addToDictionary("is");
		spellChecker.addToDictionary("HOU");
		spellChecker.addToDictionary("Liangwei");
		spellChecker.addToWordSet("hello hou liangwei,I'm 21 years old!");
		System.out.println(spellChecker.compare());

	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -