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, <code>false</code> otherwise
28 public boolean acceptsWords();
31 * Externalizes the specified word.
34 * The word to externalize in the dictionary
36 public void addWord(String word);
39 * Returns the ranked word proposals for an incorrectly spelled word.
42 * The word to retrieve the proposals for
44 * <code>true</code> iff the proposals start a new sentence,
45 * <code>false</code> otherwise
46 * @return Array of ranked word proposals
48 public Set getProposals(String word, boolean sentence);
51 * Is the specified word correctly spelled?
54 * The word to spell-check
55 * @return <code>true</code> iff this word is correctly spelled, <code>false</code>
58 public boolean isCorrect(String word);
61 * Is the dictionary loaded?
63 * @return <code>true</code> iff it is loaded, <code>false</code>
66 public boolean isLoaded();
69 * Empties the dictionary.