Revision 1014,
1.3 KB
checked in by alexandrecorreia, 15 years ago
(diff) |
Ticket #552 - Inclusão do projeto Java referente ao applet do módulo.
|
Line | |
---|
1 | package com.swabunga.spell.engine; |
---|
2 | |
---|
3 | /** |
---|
4 | * An interface for all Transformators - which take a dictionary word and converts into its |
---|
5 | * phonetic hash. These phonetic hashs are useful for determining what other words are |
---|
6 | * similiar to it, and then list those words as suggestsions. |
---|
7 | * |
---|
8 | * @author Robert Gustavsson (robert@lindesign.se) |
---|
9 | */ |
---|
10 | public interface Transformator { |
---|
11 | |
---|
12 | /** |
---|
13 | * Take the given word, and return the best phonetic hash for it. |
---|
14 | */ |
---|
15 | public String transform(String word); |
---|
16 | |
---|
17 | /** |
---|
18 | * gets the list of characters that should be swapped in to the misspelled word |
---|
19 | * in order to try to find more suggestions. |
---|
20 | * In general, this list represents all of the unique phonetic characters |
---|
21 | * for this Tranformator. |
---|
22 | * <p/> |
---|
23 | * The replace list is used in the getSuggestions method. |
---|
24 | * All of the letters in the misspelled word are replaced with the characters from |
---|
25 | * this list to try and generate more suggestions, which implies l*n tries, |
---|
26 | * if l is the size of the string, and n is the size of this list. |
---|
27 | * <p/> |
---|
28 | * In addition to that, each of these letters is added to the mispelled word. |
---|
29 | * <p/> |
---|
30 | * @return char[] misspelled words should try replacing with these characters to get more suggestions |
---|
31 | */ |
---|
32 | public char[] getReplaceList(); |
---|
33 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.