1 /*******************************************************************************
2 * Copyright (c) 2000, 2003 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
12 package net.sourceforge.phpdt.internal.ui.text.spelling.engine;
17 * Interface of dictionaries to use for spell-checking.
21 public interface ISpellDictionary {
24 * Returns whether this dictionary accepts new words.
26 * @return <code>true</code> if this dictionary accepts new words,
27 * <code>false</code> otherwise
29 public boolean acceptsWords();
32 * Externalizes the specified word.
35 * The word to externalize in the dictionary
37 public void addWord(String word);
40 * Returns the ranked word proposals for an incorrectly spelled word.
43 * The word to retrieve the proposals for
45 * <code>true</code> iff the proposals start a new sentence,
46 * <code>false</code> otherwise
47 * @return Array of ranked word proposals
49 public Set getProposals(String word, boolean sentence);
52 * Is the specified word correctly spelled?
55 * The word to spell-check
56 * @return <code>true</code> iff this word is correctly spelled,
57 * <code>false</code> otherwise.
59 public boolean isCorrect(String word);
62 * Is the dictionary loaded?
64 * @return <code>true</code> iff it is loaded, <code>false</code>
67 public boolean isLoaded();
70 * Empties the dictionary.