[0001] The present invention relates to a word search device, method, and program that are
preferably used for assisting the work upon solving or creating a cryptic crossword.
[0002] A crossword puzzle, which may be referred to simply as "crossword", is a wordplay
whose goal is to fill blank areas that correspond to a predetermined number of characters
and extend vertically or horizontally by using the answer words to a given clue, and
to thereby place a plurality of words within a grid. For the crossword, there are
provided devices for assisting the work of searching for a word forming the answer
(see, for example,
JP 06-149782 A and
JP 07-325845 A). Those devices are configured to set an uncertain character for a part of a word
having a predetermined number of characters, and search a predetermined word list
while replacing the uncertain character by a plurality of types of characters to retrieve
candidates for a word forming the answer.
[0003] There is another device for solving the crossword, which has a function of searching
a word list while automatically replacing one or a plurality of characters of an inputted
word having a predetermined number of characters by another character (see
US 5,249,965). According to this device, for example, if a word inputted as the answer by a user
is suspected to be incorrect, it is possible to present a word established by replacing
one or a plurality of characters of the word by another character, as a corrected
candidate for the answer.
[0004] As another wordplay, there is a game called "Scrabble (registered trademark)". Also
for this game, there is a device for searching for an English word. In this game,
each player forms a word by vertically or horizontally placing his/her pieces, each
representing one letter of the alphabet, on a board having a grid, and a value of
his/her score is determined according to the used letters and the positions where
the pieces are placed on the board. In Scrabble, each time the player places his/her
piece, a space for placing a new piece decreases. Therefore, unlike the crossword,
the number of characters of a word to be formed is not constant but varied. Accordingly,
in the device for searching for a word for Scrabble, the player sets usable types
of piece and inputs conditions related to a layout of pieces that have already been
placed on the board and a score to thereby make it possible to present a list of English
words that can be formed along with scores to make (see
US 5,435,564).
[0005] Meanwhile, a cryptic crossword, which is a wordplay being a subject of the present
invention, is a special type of crossword characterized in that a clue thereto is
a word puzzle itself. In general, the clue does not make the answer by surface reading,
and one of the goals is to seek the solution to how to read the clue in order to be
lead to the answer. The clue generally contains one or a plurality of character strings
(a plurality of characters containing one or a plurality of words), each of which
has a special meaning, called "indicator" or "code word". The indicators each indicate
a predetermined condition related to a wordplay existing between a word forming the
answer and the character string composing the clue, and are classified into some types.
[0006] For example, the word "mashed" is used as the indicator that indicates that the word
forming the answer and the character string composing the clue have a relationship
of being anagrams of each other. The indicator is classified as being of the type
"anagram". That is, indicators that are classified as being of the type "anagram"
indicate that the word forming the answer and the character string composing the clue
have the relationship of being anagrams of each other. For example, if the clue contains
the words "mashed" and "live", the word "evil" having the relationship of being an
anagram of the word "live" is found as the answer.
[0007] In addition to the above-mentioned type "anagram", the types of indicator include:
"reversal", which is a special form of "anagram" and indicates the word forming the
answer and the character string composing the clue have a relationship of being a
reversal of each other; "bridge", which indicates that the word forming the answer
extends across two or more words within the clue; "deletion", which indicates that
the word forming the answer is equal to one word that is contained in the clue and
has the characters partially deleted; "burial", which is a special form of "deletion"
and indicates that a character string including the deleted characters represents
another word; and "homophones", which indicates that the word forming the answer and
the word contained in the clue have a relationship of homophones having different
spellings.
[0008] As an example of "reversal", there is a case where the answer to the clue "... reversing
pots ..." is "stop". As an example of "bridge", there is a case where the answer to
the clue "... shudder ...great remorse ..." is "tremor". As an example of "deletion",
there is a case where the answer to the clue "... empty bottle ..." is "bole". As
an example of "burial", there is a case where the answer to the clue "... heartlessly
denoted..." is "deed". As an example of "homophones", there is a case where the answer
to the clue "... aisle ... I hear" is "isle".
[0009] As described above, the cryptic crossword requires a player to not only solve the
wordplay constituted of vertical and horizontal strings of words as found in the general
crossword, but also solve the wordplay upon reading the clue. Therefore, the above-mentioned
search devices cannot present only words having a high possibility of becoming the
answer as search results, leading a problem that sufficient effects of assistance
cannot be produced.
[0010] In contrast, studies have been made on a system for searching for the answer to the
cryptic crossword by use of a general-purpose personal computer. There are a software
program called "Crossword Maestro (trademark)" by William Tunstall-Pedoe ("Crossword
Maestro (trademark) for Windows (registered trademark): crossword solving software,
cryptic crossword solver", (on line), (searched on 21st August 2007), Internet (URL:
http://www.crosswordmaestro.com/)), a Web system that allows online use of the further
improved software program of Crossword Maestro (see "Clue Solver, (on line), Genius
2000 Ltd., (searched on 21st August 2007), Internet (URL: http://www.crosswordtools.com/cm/)),
and the like. Those systems operate by use of a general-purpose operating system (OS),
and the creator says that those systems use an artificial intelligence technology,
from which those systems are assumed to perform a high-level processing such as a
search according to complicated conditions using a relatively large-scale database.
[0011] The above-mentioned search systems are assumed to be effective as a tool used when
finding the answer to the cryptic crossword. However, in the current situations, not
all clues can be solved. On the other hand, with such a function as to present a plurality
of candidates having a relatively high possibility of becoming the answer, the above-mentioned
systems may be practical options as a device for assisting the user's work of a word
search. In other words, for example, when the user performs the work of solving the
clue while consulting a dictionary and the like, it is assumed that there is demand
for such a function as to present candidates for a word having a relatively high possibility
of being correct. In that case, for example, it may be of significant importance to
provide an electronic dictionary having a dictionary function with an additional function
of assisting the finding of the answer to the cryptic crossword. However, none of
the conventional devices having a small size such as the electronic dictionary are
provided with the function of assisting the search for the answer to the cryptic crossword.
[0012] The present invention has been made in view of the above-mentioned circumstances,
and an object thereof is to provide a word search device which has a simple structure
suitable when provided to a small-size device such as an electronic dictionary and
can assist the work of searching for the answer to a cryptic crossword, and a method
and program therefor.
[0013] In order to solve the above-mentioned problems, a first aspect of the present invention
includes: input means for inputting a clue to a cryptic crossword and the number of
characters of an answer word; word storage means for storing a word list containing
a plurality of words; word search searching the word storage means for a word that
has the number of characters of the answer word and can be generated from a plurality
of characters contained in a character string composing the clue; conditional word
comparison means for comparing the word retrieved by the word search means with the
character string composing the clue to judge whether or not a predetermined condition
is satisfied; and display means for displaying the word judged to satisfy the predetermined
condition by the conditional word comparison means based on classification according
to the predetermined condition.
[0014] A second aspect of the present invention further includes condition storage means
for storing a correspondence between a specific character string and the predetermined
condition, in which if the specific character string corresponding to the predetermined
condition judged to be satisfied by the conditional word comparison means is contained
in the clue, the display means displays to that effect.
[0015] In a third aspect of the present invention, the predetermined condition includes
a condition that the word retrieved by the word search means and the character string
composing the clue have a relationship of anagrams. In a fourth aspect of the present
invention, the predetermined condition includes a condition that the word retrieved
by the word search means and the character string composing the clue have a relationship
of being reversal to each other.
[0016] In a fifth aspect of the present invention, the predetermined condition includes
a condition that the word retrieved by the word search means extends across two or
more words within the clue. In a sixth aspect of the present invention, the predetermined
condition includes conditions that the word retrieved by the word search means is
equal to one word that is contained in the clue and has the characters partially deleted.
In a seventh aspect of the present invention, the predetermined condition includes
conditions that the word retrieved by the word search means is equal to one word that
is contained in the clue and has the characters partially deleted, and that the character
string including the deleted characters corresponds to a word contained in the word
list stored in the word storage means. In an eighth aspect of the present invention,
the predetermined condition includes a condition that the word retrieved by the word
search means has a relationship of homophones having different spellings from the
word contained in the clue.
[0017] In a ninth aspect of the present invention, the word search means searches the word
storage means for a word that has the number of characters of the answer word by sorting
characters of a character string, which is obtained by eliminating a symbol representing
a boundary between words from the character string composing the clue, in a predetermined
order, and then comparing the character string having the characters sorted with each
word contained in the word list stored in the word storage means.
[0018] A tenth aspect of the present invention includes: an input step of inputting a clue
to a cryptic crossword and the number of characters of an answer word; a word search
step of using word storage means for storing a word list containing a plurality of
words to search the word storage means for a word that has the number of characters
of the answer word and can be generated from a plurality of characters contained in
a character string composing the clue; a conditional word comparison step of comparing
the word retrieved in the word search step with the character string composing the
clue to judge whether or not a predetermined condition is satisfied; and a display
step of displaying the word judged to satisfy the predetermined condition in the conditional
word comparison step based on classification according to the predetermined condition.
[0019] An eleventh aspect of the present invention provides a word search program including
a description for causing a computer to execute: an input step of inputting a clue
to a cryptic crossword and the number of characters of an answer word; a word search
step of using word storage means for storing a word list containing a plurality of
words to search the word storage means for a word that has the number of characters
of the answer word and can be generated from a plurality of characters contained in
a character string composing the clue; a conditional word comparison step of comparing
the word retrieved in the word search step with the character string composing the
clue to judge whether or not a predetermined condition is satisfied; and a display
step of displaying the word judged to satisfy the predetermined condition in the conditional
word comparison step based on classification according to the predetermined condition.
[0020] According to an aspect of the present invention, the word retrieved by the word search
means and the character string composing the clue are compared with each other to
judge whether or not the predetermined condition is satisfied, and the word judged
to satisfy the predetermined condition is displayed based on classification according
to the predetermined condition. Accordingly, there is no need to perform, for example,
a probability calculation or the like, and only the judgment as to whether or not
the predetermined condition is satisfied has to be performed, which makes it possible
to simplify the configuration for the search with ease. In addition, the retrieved
candidates for the word to be the correct answer are presented based on classification
according to the condition in such an easy-to-view manner that efficient assistance
can be performed.
[0021] Further, according to another aspect of the present invention, the word search device
further includes the condition storage means for storing a correspondence between
a specific character string and the predetermined condition, and in which if the specific
character string corresponding to the predetermined condition judged to be satisfied
by the conditional word comparison means is contained in the clue, the display means
displays to that effect. Accordingly, the user can easily know which character string
within the clue the condition is set based on.
[0022] Further, according to still another aspect of the present invention, the word search
means searches the word storage means for a word that has the number of characters
of the answer word by sorting characters of a character string, which is obtained
by eliminating a symbol representing a boundary between words from the character string
composing the clue, in a predetermined order, and then comparing the character string
having the characters sorted with each word contained in the word list stored in the
word storage means. Accordingly, if the clue includes a plurality of words and the
character such as a space representing the boundary between words, it is possible
to search the word list including a plurality of words with efficiency.
[0023] Embodiments of the present invention will now be described by way of example only
with reference to the accompanying drawings, in which:
FIG. 1 is a block diagram showing a word search device according to an embodiment
of the present invention;
FIG. 2 is a diagram showing an example of storage contents of word list storage means
(41) shown in FIG. 1;
FIG. 3A is a diagram showing a display example of a display device (30) shown in FIG.
1;
FIG. 3B is a diagram showing an example of the storage contents of the word list storage
means (41) shown in FIG. 1;
FIG. 3C is a diagram showing an example of storage contents of indicator storage means
(42) shown in FIG. 1;
FIG. 4 is a flowchart for explaining an operation of word search means (12) shown
in FIG. 1;
FIGS. 5A to 5F are explanatory diagrams for explaining the operation of the word search
means (12) shown in FIG. 1;
FIG. 6 is a flowchart for explaining an operation (in a case of "bridge") of conditional
word comparison means (14) shown in FIG. 1;
FIGS. 7A to 7C are explanatory diagrams for explaining the operation (in the case
of "bridge") of the conditional word comparison means (14) shown in FIG. 1;
FIG. 8 is a diagram showing a display example of the display device (30) shown in
FIG. 1;
FIG. 9 is a flowchart for explaining the operation (in a case of "anagram") of the
conditional word comparison means (14) shown in FIG. 1;
FIGS.10A to 10G are explanatory diagrams for explaining the operation (in the case
of "anagram") of the conditional word comparison means (14) shown in FIG. 1;
FIG. 11 is a diagram showing another display example of the display device (30) shown
in FIG. 1;
FIG. 12 is a flowchart for explaining the operation (in cases of "deletion" and "burial")
of the conditional word comparison means (14) shown in FIG. 1;
FIGS. 13A to 13D are explanatory diagrams for explaining the operation (in the cases
of "deletion" and "burial") of the conditional word comparison means (14) shown in
FIG. 1;
FIGS. 14A and 14B are other explanatory diagrams for explaining the operation (in
the cases of "deletion" and "burial") of the conditional word comparison means (14)
shown in FIG. 1;
FIG. 15 is a flowchart for explaining the operation (in a case of "reversal") of the
conditional word comparison means (14) shown in FIG. 1;
FIG. 16 is an explanatory diagram for explaining the operation (in the case of "reversal")
of the conditional word comparison means (14) shown in FIG. 1;
FIG. 17 is a flowchart for explaining the operation (in a case of "homophones") of
the conditional word comparison means (14) shown in FIG. 1; and
FIG. 18 is an explanatory diagram for explaining the operation (in the case of "homophones")
of the conditional word comparison means (14) shown in FIG. 1.
[0024] Hereinafter, an embodiment of the present invention will be described by referring
to the drawings. FIG. 1 is a block diagram showing a word search device according
to the embodiment of the present invention. A word search device 1 shown in FIG. 1
is configured, for example, as a portable-type electronic dictionary having a function
of searching a plurality of dictionaries including English-English, English-Japanese,
and Japanese-English dictionaries, and a function of presenting candidates for a word
forming the answer to a cryptic crossword by which the present invention is characterized.
[0025] The word search device 1 includes a control unit 10, a character input device 20,
a display device 30, and a storage unit 40. The control unit 10 is constituted of
a central processing unit (CPU), a random access memory (RAM), a read-only memory
(ROM), a rewriteable non-volatile memory, various interface circuits, and the like,
and controls each of the components by the CPU executing a program stored in the ROM.
The block diagram of FIG. 1 shows that the control unit 10 includes input data temporary
storage means 11, word search means 12, word list search result storage means 13,
conditional word comparison means 14, display means 15, and indicator detection means
16, which are implemented under control of the internal component such as the CPU,
and are software and hardware components for performing processings by which the present
invention is characterized.
[0026] The storage unit 40 is constituted of a ROM and the like, and includes word list
storage means 41 for storing a word list containing a plurality of words and indicator
storage means 42 for storing correspondences between specific character strings used
as indicators and the types of indicator. As shown in FIG. 2, the word list stored
in the word list storage means 41 is structured by listing a plurality of English
words sorted by the number of letters. In the example of FIG. 2, a plurality of words
are registered in the word list such that three-letter English words sorted in alphabetical
order are listed at the top, and that four-letter English words sorted in alphabetical
order are listed next. In addition, the last word of a word set corresponding to each
number of letters is set to a predetermined symbol representing the last character
for the number of letters. Further, within the word list, words called homophones,
which are different in spelling, have information indicating their correspondence
appended thereto. In the example of FIG. 2, the information indicating that the words
"aisle" and "isle" are homophones having different spellings from each other is appended
to each of the words.
[0027] Note that the storage unit 40 also stores various dictionary files for an English-English
dictionary, an English-Japanese dictionary, a Japanese-English dictionary, and a Japanese
language dictionary.
[0028] FIG. 3C shows an example of storage contents of the indicator storage means 42. The
character string including one or a plurality of words on the left side of the colon
in each line is the specific character string used as the indicator, while the character
string on the right side of the colon indicates the type of indicator to which the
indicator on the left side belongs - in other words, the condition indicated by the
indicator. This example shows that the indicator storage means 42 stores: the words
"in" and "inside" as indicators classified under the types "bridge" and "burial";
the word "around" as an indicator classified under the type "burial"; the words "awkwardly",
"badly", and "mashed" as indicators classified under the type "anagram"; the words
"absence", "beheaded", and "empty" as the indicators classified under the type "deletion";
the compounds "sound like" and "I hear" as indicators classified under the type "homophones";
and the words "backwards", "mirror", and "reversing" as indicators classified under
the type "reversal".
[0029] Note that the indicator is a character string that represents a particular wordplay-related
condition, the condition being between a word forming an answer and a character string
constituting a clue. Accordingly, the correspondence between the specific character
string to be the indicator and the type of indicator, which is stored in the indicator
storage means 42, can be grasped as indicating a correspondence between the specific
character string and the wordplay-related condition involved between the word forming
the answer and the character string constituting the clue.
[0030] Next, the input data temporary storage means 11 of FIG. 1 is constituted of a RAM
and the like, and stores character data inputted through the character input device
20, results of detection performed by the indicator detection means 16, and the like.
The character input device 20 is configured by including a plurality of operation
elements such as alphabet input keys, numeral input keys, a space input key, a cursor
key, an enter key, various function keys, and a power key. Operation information on
each operation element is temporarily stored in the input data temporary storage means
11, and then sent to the word search means 12 and the like. For example, if there
is an input of the character string representing a clue to a cryptic crossword and
the number of characters of a word forming the answer, the inputted information is
temporarily stored in the input data temporary storage means 11, and then sent to
the word search means 12, by which a search is performed based on the inputted information.
[0031] From the word list stored in the word list storage means 41 within the storage unit
40, the word search means 12 retrieves all words that have the number of characters
of the answer word and can be generated from a plurality of characters contained in
the character string composing the clue, and stores the retrieved words in the word
list search result storage means 13.
[0032] The conditional word comparison means 14 compares the words retrieved by the word
search means 12 with the character string composing the clue to judge whether or not
a predetermined condition is satisfied. The predetermined condition represents a constraint
corresponding to the wordplay put into the clue to the cryptic crossword, and examples
thereof include: the word retrieved from the word list and the character string composing
the clue having a relationship of being anagrams (corresponding to the type of indicator
"anagram"); those having a relationship of being a reversal of each other (corresponding
to "reversal"); the retrieved word extending across two or more words within the clue
(corresponding to "bridge"); the retrieved word being equal to one partially-deleted
word contained in the clue (corresponding to "deletion"); the one partially-deleted
word having deleted characters composing a character string representing another word
(corresponding to "burial"); and the retrieved word and the word contained in the
clue having a relationship of being homophones having different spellings from each
other (corresponding to "homophones"). In this embodiment, the conditional word comparison
means 14 is configured to execute a judgment processing for each condition by a separate
subroutine.
[0033] The display means 15 controls the display device 30 to display the words judged to
satisfy the predetermined condition by the conditional word comparison means 14, based
on classification according to the corresponding condition, that is, the type of indicator.
[0034] Optionally, the indicator detection means 16 may also refer to the indicator storage
means 42 to judge whether or not the clue contains the specific character string corresponding
to the predetermined condition judged to be satisfied by the conditional word comparison
means 14, and if positive, the indicator detection means 16 displays to that effect
on the display device 30 via the display means 15.
[0035] Further, the display device 30 is constituted of a liquid crystal display and the
like, and controlled by the display means 15 to display image information such as
a character and a graphical shape.
[0036] Next, description will be made of a processing performed by the word search means
12 of FIG. 1 with reference to FIGS. 3A to 5F. FIG. 3A is a diagram showing an example
in which the inputted clue is displayed on the display device 30, FIG. 3B is a diagram
showing a related part of the storage contents of the word list storage means 41,
and FIG. 3C is a diagram showing the storage contents of the indicator storage means
42. FIG. 4 is a flowchart showing a flow of the processing performed by the word search
means 12. FIGS. 5A to 5F show examples of character information processed in the key
steps of FIG. 4.
[0037] In this case, after the clue to the cryptic crossword "Shudder in great remorse."
shown in FIG. 5A and the designated number of characters "6" of the word forming the
answer given to the clue are inputted by the character input device 20, the inputted
information is stored in the input data temporary storage means 11, and the clue is
displayed on the display device 30 as shown in FIG. 3A. If a predetermined operation
element for instructing an answer search processing, which is included in the character
input device 20, is operated, the word search means 12 accesses the input data temporary
storage means 11 to create a character string obtained by eliminating a symbol ("space"
in this embodiment) representing the boundary between words from the character string
composing the inputted clue (hereinafter, referred to as "input character string")
and coupling the inputted words (Step S11 of FIG. 4). FIG. 5B shows an example of
the created character string.
[0038] Subsequently, the word search means 12 sorts the letters composing the created character
string in alphabetical order (Step S12). FIG. 5C shows an example of the character
string after the sorting. Then, based on the designated number of characters of the
answer word, the word search means 12 determines where to jump into the word list
stored in the word list storage means 41 (Step S13). In this case, the designated
number of characters is "6", so the head word "abacus" of the word set corresponding
to the number of letters "6" shown in FIG. 2 is determined as a jump destination of
the word list, that is, the first word to be searched.
[0039] The word search means 12 reads the word "abacus" set as the jump destination by the
word list storage means 41 (Step S14). Note that in Step S14, after reading the word,
the word search means 12 performs a processing of setting a word placed at the subsequent
position of the word list as the next word to be read.
[0040] Subsequently, the word search means 12 judges whether or not the read word is the
last word of the word set corresponding to the same number of characters (in this
case, the number of letters "6") (Step S15). In this case, the read word "abacus"
is not the last word ("No" in Step S15), so the word search means 12 performs a processing
of sorting the letters composing the read word character string "abacus" in alphabetical
order (Step S16). In this case, the word "abacus" has the letters sorted into "aabcsu".
[0041] The word search means 12 then judges whether or not the letters of the word character
string (in this case, "aabcsu") sorted in Step S16 are contained in the input character
string (FIG. 5C) having the letters sorted in Step S12 (Step S17). In this case, the
word character string is not contained ("No" in Step S17), so the procedure returns
to Step S14, where the next word (in this case, the word "abanet" shown in FIG. 2)
is read from the word list of the word list storage means 41. After that, the processing
of Steps S14 to S17 is repeatedly executed.
[0042] It is now assumed that in Step S14, the underlined word "tremor" of the word set
corresponding to the number of letters "6" shown in FIG. 3B is read. FIG. 5D shows
the read word. Then, in Step S15, the read word is judged not to be the last word
of the word set corresponding to the number of letters "6" (the judgment results in
"No"), so the procedure advances to Step S16, where the letters of the read word character
string are sorted in alphabetical order. FIG. 5E shows the character string having
the letters sorted. It is then judged whether or not the sorted letters of the word
character string are contained in the input character string (Step S17). In this case,
as indicated in FIG. 5F as white letters on black, the letters of the character string
shown in FIG. 5E are contained in the character string obtained by sorting the letters
of the character string of the clue in alphabetical order ("Yes" in Step S17), so
the procedure advances to Step S18, where the word ("tremor") that corresponds to
the number of characters of the answer word and can be generated from a plurality
of letters contained in the character string composing the clue is stored in the word
list search result storage means 13 of FIG. 1.
[0043] Then, the procedure returns to Step S14, and after that, the processing of Steps
S14 to S17 or the processing including Step S18 in addition to Steps S14 to S17 is
repeatedly executed until the last word of the word set corresponding to the number
of letters "6" of the word list has been processed. If the last word has already been
read, it is judged in Step S15 that the last word has been passed ("Yes" in Step S15),
which brings the procedure to an end. Note that at the end of the processing, the
word list search result storage means 13 has the list of words stored therein with
a predetermined symbol representing the last character at the end.
[0044] As a result of the above-mentioned processing, all of the words that are contained
in the word list and can be generated by extracting the characters having the set
number of characters from the plurality of characters composing the character string
of the clue are stored in the word list search result storage means 13.
[0045] Next, with reference to FIGS. 6 to 7C, description will be made of a case where the
conditional word comparison means 14 performs a processing of judging whether or not
the word retrieved by the word search means 12 extends across two or more words within
the clue, that is, a conditional judgment processing corresponding to the type of
indicator "bridge". FIG. 6 is a flowchart showing a flow of the processing in the
case of performing the conditional judgment processing corresponding to "bridge",
and FIGS. 7A to 7C are explanatory diagrams for explaining the processing contents
of the key steps of FIG. 6, showing a relationship between the character string of
the inputted clue to be compared and the word character string retrieved from the
word list.
[0046] In this example, as has already been described above, the word search means 12 has
performed a search through the word list within the word list storage means 41 with
the clue shown in FIG. 5A and the designated number of letters "6" as the input data,
and the word "tremor" and the symbol representing the end of words (assumed to be
stored as one word similarly to the other words) are stored in the word list search
result storage means 13.
[0047] First, the conditional word comparison means 14 retrieves one word from among the
words stored in the word list search result storage means 13 (Step S101). In this
case, the word "tremor" is retrieved.
[0048] Then, the conditional word comparison means 14 judges whether or not the retrieved
word is the last "word" (Step S102), recalling that the last "word" in the list is
the symbol representing the end of words. In this case, the word "tremor" is not the
last word ("No" in Step S102), so the procedure advances to Step S103, where a variable
N is initialized to "0".
[0049] Subsequently, the conditional word comparison means 14 performs a processing of setting
a pointer to the Nth character from the head of the original input character string
of the clue stored in the input data temporary storage means 11, and further setting
another pointer to the head character of the word retrieved from the word list search
result storage means 13 (hereinafter, referred to simply as "retrieved word") (Step
S104). In this case, the clue reads "Shudder in great remorse.", and the original
input character string is a 24-letter character string including spaces as shown in
FIG. 7A as the input data. Note that the spaces are used as the symbol representing
the boundary between words, and the period mark "." at the end of the clue is deleted.
In this processing, the 0th character of the input character string is defined as
the head letter "S", the 1st character as the following letter "h", ..., the 15th
character as the letter "t", the 16th character as the symbol "space", and the like.
[0050] Subsequently, the conditional word comparison means 14 compares the character to
which the pointer is set for the input character string with the character to which
the pointer is set for the retrieved word, and judges whether or not the characters
match each other (Step S105). In this case, the pointer for the input character string
is "0", and the pointer for the retrieved word is set to the head character. Therefore,
the letters "S" and "t" are compared as shown in FIG. 7A, with the result that the
letters do not match each other ("No" in Step S105), so the variable N is incremented
by 1 (Step S106). In this case, the variable N becomes "1".
[0051] Then, the procedure returns to Step S104, where the conditional word comparison means
14 sets the pointer to the "1"st letter "h" of the input character string, and further
sets another pointer to the head letter "t" of the retrieved word. Subsequently, it
is judged in Step S105 whether or not the letters "h" and "t" to which the two pointers
are set match each other (FIG. 7B), and because the letters do not match each other,
the procedure advances to Step S106, where the variable N is incremented by 1, resulting
in "N=2".
[0052] After that, Steps S104 to S106 are repeatedly executed in a similar manner, during
which the variable N is set to "15" in Step S106. In this case, in Step S104, the
conditional word comparison means 14 sets the pointer to the "15"th letter "t" of
the input character string, and further sets the another pointer to the head letter
"t" of the retrieved word. It is then judged in Step S105 whether or not the letters
"t" and "t" to which the two pointers are set match each other (FIG. 7C), and because
the letters match each other ("Yes" in Step S105), the procedure advances to Step
S107, where the two pointers for the original input character string stored in the
input data temporary storage means 11 and the retrieved word are moved forward by
one character. In this case, the pointers are moved forward to the positions of the
symbol "space" following the letter "t" of the input character string and of the letter
"r" following the letter "t" of the retrieved word.
[0053] It is then judged in Step S108 whether or not the character indicated by the pointer
for the retrieved word was next to the last character. In this case, the pointer has
not passed the last character ("No" in Step S108), so it is judged in Step S110 whether
or not the pointer character for the input character string is a space. In this case,
the character at the position indicated by the pointer for the input character string
is a space ("Yes" in Step S110), so the pointer for the input character string is
moved forward by one character (Step S111). In this case, the pointer is moved forward
to the position of the letter "r" following the space.
[0054] Subsequently, the conditional word comparison means 14 judges whether or not the
last character has been passed in the input character string (Step S112). In this
case, the last character has not been passed ("No" in Step S112), so the procedure
returns to Step S110, where it is judged whether or not the pointer character for
the input character string is a space. In this case, because the pointer character
is not a space, it is judged in Step S105 whether or not the characters indicated
by the two pointers match each other. In this case, the characters indicated by the
two pointers are both the letter "r" ("Yes" in Step S105), so the processing advances
to Step S107, where the two pointers are moved forward by one character. At this point,
the characters indicated by the two pointers both become "e".
[0055] After that, the processings of Steps S108, S110, S105, and S107 are repeatedly executed,
during which the two pointers are set to the positions of the letter "r" just before
Step S107. In this case, after Step 107, the pointer for the retrieved word has passed
the last letter "r", so the judgment of Step S108 results in "Yes", and the retrieved
word "tremor" is registered in a predetermined storage area as a word corresponding
to "bridge" (Step S109).
[0056] Then, the procedure returns to Step S101, where the next one word is retrieved from
the word list search result storage means 13, and the procedure advances to Step S102,
where it is judged whether or not the retrieved word is the last "word". In this case,
the symbol representing the last "word" is retrieved as the word in Step S101, so
the judgment of Step S102 results in "Yes", which brings the procedure to an end.
In other words, the last actual word in the list has already been passed and processed
and the procedure comes to an end.
[0057] At this time, the conditional word comparison means 14 instructs the display means
15 to display the comparison results. For example, as shown in FIG. 8, the display
means 15 controls the display device 30 to display thereon a box 31 for displaying
the clue and a sheet 32 including a plurality of pages that are identified by tabs
labeled with character strings (such as "Bridge" and "Deletion") representing the
respective types of indicator. Displayed on each page are the words retrieved from
the word list based on classification according to the type of indicator. In the example
of FIG. 8, the clue "Shudder in great remorse." is displayed in the box 31, while
the word "tremor" that satisfies the condition corresponding to "bridge" is displayed
on the page identified by the tab labeled "Bridge". In addition, for the character
string of the clue displayed in the box 31, the word "in" registered as the indicator
is highlighted by underline, and the character string "t remor" corresponding to the
word "tremor" retrieved as a candidate for the answer is highlighted as white letters
on black.
[0058] Note that the processing of specifying the character string registered as the indicator
from the clue is performed by the indicator detection means 16 of FIG. 1. The indicator
detection means 16 compares the input character string inputted as the clue stored
in the input data temporary storage means 11 and the character string (such as "in"
and "inside") registered as the indicator in the indicator storage means 42 as shown
in FIG. 3C to thereby judge whether or not the input character string contains the
character string registered as the indicator, and if positive, the processing for
identifying and highlighting the character string is performed.
[0059] Accordingly, the character string corresponding to the indicator which is contained
in the clue is highlighted, and at the same time, the words contained in the predetermined
word list each of which has a predetermined correspondence with the character string
composing the clue are displayed according to the type of correspondence. Thus, the
words to be the candidates for the answer can be presented to a user along with information
indicating the reasons for their extraction. At this time, according to the configuration
of this embodiment, the above-mentioned word to be the candidate for the answer is
determined by the search through the word list including a plurality of words and
the judgment of the correspondence between the word obtained as a result of the search
and the character string composing the clue. Therefore, there is no need to perform
a complicated search processing or such a processing as to analyze, for example, the
meaning of a word or a compound or the meaning of the clue. Further, the obtained
results are displayed based on classification according to the type of indicator,
which is more advantageous than a case without the classification in that the user
can easily check if the answer is right or wrong.
[0060] Note that the display method for the display device 30 is not limited to the above-mentioned
method, and may be replaced by one or a combination of methods of changing a display
color for the character, causing the cursor or character to blink, rearranging the
types of indicator, and the like.
[0061] Next, with reference to FIGS. 9 to 10G, description will be made of a case where
the conditional word comparison means 14 performs a processing of judging whether
or not the word retrieved by the word search means 12 has the relationship of being
an anagram of the character string composing the clue, that is, the conditional judgment
processing corresponding to the type of indicator "anagram". FIG. 9 is a flowchart
showing a flow of the processing in the case of performing the conditional judgment
processing corresponding to "anagram", and FIGS. 10A to 10G are explanatory diagrams
showing the contents of data processed in the key steps of FIG. 9. Note that the words
obtained as a result of the search through the word list by the word search means
12 based on the inputted clue and the number of characters have already been registered
in the word list search result storage means 13.
[0062] The conditional word comparison means 14 first reads the input character string of
the clue from the input data temporary storage means 11, eliminates the space, and
couples the words to each other (Step S201). For example, if the input character string
is "Mashed pears may be used offensively." as shown in FIG. 10A, the coupling results
in "mashedpearsmaybeusedoffensively" as shown in FIG. 10B. Note that the designated
number of characters for the answer in this example is assumed "5".
[0063] Then, the conditional word comparison means 14 performs a processing of sorting the
letters of the character string obtained by coupling the inputted words in alphabetical
order, and, at the same time, storing information on the original position of each
character (Step S202). In the above-mentioned example, the sorting in alphabetical
order results in "aabdffeeeeeehilmmoprssssuvy" as shown in FIG. 10C. Note that when
the information on the original position of each character is stored, information
on the original position of the space serving as the character to be the boundary
between words is stored as well.
[0064] Subsequently, the conditional word comparison means 14 retrieves one word from the
word list search result storage means 13 (Step S203), and judges whether or not the
word is the last word (Step S204). In this case, the word "spear" shown in FIG. 10D
is retrieved.
[0065] Subsequently, the conditional word comparison means 14 sorts the letters of the character
string of the retrieved word in alphabetical order (Step S205). The sorting of the
word "spear" results in "aeprs" as shown in FIG. 10E.
[0066] Then, by comparing the character strings having the letters sorted in alphabetical
order, the conditional word comparison means 14 judges whether or not the retrieved
word is contained in the input character string (Step S206). In this case, because
the retrieved word is contained in the input character string as shown in FIG. 10F,
the conditional word comparison means 14 then checks whether or not a word-basis match
occurs in all of the characters commonly contained in the two character strings match
therebetween based on the information on the original position of each character (Step
S207). That is, it is confirmed whether or not the types of characters composing the
retrieved word and the number of characters for each type match the types of characters
composing any one of words contained in the input character string and the number
of characters for each type, respectively. In this example, the word-basis match is
confirmed because, as shown in FIG. 10G, the retrieved word "spear" matches the word
"pears" within the input character string in that the characters composing the words
have five types, "a", "e", "p", "r", and "s", and that the numbers of characters for
the respective types are all one.
[0067] Subsequently, the conditional word comparison means 14 judges whether or not the
word-basis match has been confirmed in all of the characters (Step S208), and if confirmed,
registers the retrieved word as "anagram" (Step S209). In this example, the word-basis
match is judged to have been confirmed, so the retrieved word "spear" is registered
as "anagram".
[0068] Then, the procedure returns to Step S203, and a part or all of the processings of
Steps S203 to S209 are repeatedly executed until it is judged in Step S204 that the
last word has been reached.
[0069] Accordingly, the word registered by the conditional word comparison means 14 is displayed,
for example, as shown in FIG. 11. In this example, the clue "Mashed pears may be used
offensively." is displayed in the box 31, while the word "spear" is displayed on the
page identified by the tab labeled "anagram". Note that the indicator "Mashed" detected
as the type "anagram" by the indicator detection means 16 is displayed with an underline.
[0070] Next, with reference to FIGS. 12 to 14B, description will be made of a case where
the conditional word comparison means 14 performs a processing of judging whether
or not the word retrieved by the word search means 12 is equal to one word that is
contained in the clue and has the characters partially deleted and whether or not
the retrieved word is equal to one word that is contained in the clue and has the
characters partially deleted and at the same time the character string incluiding
the deleted characters corresponds to a word contained in the word list, that is,
the conditional judgment processing corresponding to the types of indicator "deletion"
and "burial".
[0071] FIG. 12 is a flowchart showing a flow of the processing in the case of performing
the conditional judgment processing corresponding to "deletion" and "burial", and
FIGS. 13A to 14B are explanatory diagrams showing the processing contents of the key
steps of FIG. 12, showing the relationship between the character string of the inputted
clue to be compared and the word character string retrieved from the word list.
[0072] FIGS.13A to 13D show a relationship between the character strings in a case of performing
a processing of judging whether or not the retrieved word "tremor" satisfies the condition
for the clue "Shudder in great remorse.". FIG. 13A shows a state in which the character
string starting from the 0th character of the clue is compared with the retrieved
word, and FIGS. 13B to 13D show states in which the character strings starting from
the 8th, 11th, and 17th characters of the clue are compared with the retrieved word,
respectively. In this example, none of the conditions "deletion" and "burial" are
satisfied.
[0073] FIG. 14A shows a relationship between the character strings in a case of performing
a processing of judging whether or not the retrieved word "bole" satisfies the condition
for the clue "Tree grows from empty bottle." FIG. 14A shows a state in which the character
string starting from the 22nd character of the clue is compared with the retrieved
word. In this example, the word "bottle" within the clue contains the retrieved word
"bole", which establishes the condition corresponding to "deletion".
[0074] FIG. 14B shows a relationship between the character strings in a case of performing
a processing of judging whether or not the retrieved word "deed" satisfies the condition
for the clue "Heartlessly denoted an act.". FIG. 14B shows a state in which the character
string starting from the 12th character of the clue is compared with the retrieved
word. In this example, the word "denoted" within the clue contains the retrieved word
"deed", and, at the same time, the character string "not" obtained by eliminating
"deed" from "denoted" represents a word registered in the word list, which establishes
the condition corresponding to "burial".
[0075] Hereinafter, description will be made of the flowchart of FIG. 12. The conditional
word comparison means 14 first retrieves one word from the word list search result
storage means 13 (Step S301), judges whether or not the retrieved word is the last
word (Step S302), and if the retrieved word is the last word ("Yes" in Step S302),
brings the processing to an end. If the retrieved word is not the last word ("No"
in Step S302), the conditional word comparison means 14 initializes the variable N
to "0" (Step S303), and sets a pointer to the Nth character from the head of the original
input character string stored in the input data temporary storage means 11 and another
pointer to the head character of the retrieved word (Step S304).
[0076] Subsequently, the conditional word comparison means 14 judges whether or not the
Nth character of the input character string is a space (Step S305). If the Nth character
is a space ("Yes" in Step S305), the variable N is incremented so as to move the pointer
to the head character of the next word within the input character string (Step S308).
If the last word has not been passed in the input character string when the variable
N is incremented so as to move the pointer ("No" in Step S309), the procedure returns
to Step S304, where the pointer is set to the next word within the input character
string.
[0077] On the other hand, if it is judged in Step S305 that the Nth character is not a space
("No" in Step S305), it is judged whether or not the characters indicated by the two
pointers match each other (Step S306). If the characters do not match each other ("No"
in Step S306), the pointer for the input character string is moved forward by 1 character
(Step S307), and the procedure returns to Step S305 to perform the subsequent steps.
If the characters match each other ("Yes" in Step S306), the two pointers for the
original input character string of the input data temporary storage means 11 and for
the retrieved word are moved forward by 1 character (Step S310).
[0078] Subsequently, in Step S311 the conditional word comparison means 14 judges whether
or not the last character has been passed in the retrieved word , and if the last
character has not been passed ("No" in Step S311), judges whether or not the character
designated by the pointer for the input character string is a space (Step S312). If
the character is a space, the procedure returns to Step S308, and if the character
is not a space, the procedure returns to Step S306.
[0079] On the other hand, if it is judged in Step S311 that the last character has been
passed in the retrieved word ("Yes" in Step S311), the retrieved word is contained
in any one of words within the input character string, so the retrieved word is registered
as a word corresponding to "deletion" (Step S313).
[0080] Subsequently, the conditional word comparison means 14 obtains the character string
by joining the remaining characters of the matched input character string word to
search the word list for the obtained character string (Step S314), and if the obtained
character string is found ("Yes" in Step S315), registers the retrieved word as a
word corresponding to "burial" (Step S316).
[0081] If it is judged in Step S309 that the last word has been passed in the input character
string ("Yes" in Step S309), if the obtained character string is not found in Step
S315 ("No" in Step S315), and if the retrieved word is registered as "burial" (Step
S316), the procedure returns to Step S301, where one word is retrieved from the word
list search result storage means 13 to execute the processing of Step S302 and the
subsequent steps.
[0082] Next, with reference to FIGS. 15 and 16, description will be made of a case where
the conditional word comparison means 14 performs a processing of judging whether
or not the word retrieved by the word search means 12 has the relationship of being
a reversal with respect to the character string composing the clue, that is, the conditional
judgment processing corresponding to the type of indicator "reversal".
[0083] The conditional word comparison means 14 first retrieves one word from the word list
search result storage means 13, and reverses the order of characters composing the
retrieved character string to obtain a new retrieved word (Step S401). After judging
whether or not the retrieved word is the last word, if the retrieved word is the last
word ("Yes" in Step S402), the conditional word comparison means 14 brings the processing
to an end. If the retrieved word is not the last word ("No" in Step S402), the conditional
word comparison means 14 initializes the variable N to "0" (Step S403), and sets a
pointer to the Nth character from the head of the original input character string
stored in the input data temporary storage means 11 and another pointer to the head
character of the retrieved word (reversed word) (Step S404).
[0084] Then, the conditional word comparison means 14 compares the word starting from the
Nth character of the input character string with the retrieved word to judge whether
or not the words match each other (Step S405). If the words match each other ("Yes"
in Step S405), the retrieved word is registered as "reversal" (Step S406). If the
words do not match each other ("No" in Step S405), the variable N is incremented so
as to move the pointer to the head character of the next word within the input character
string (Step S407), and after that, it is judged whether or not the last word has
been passed in the input character string (Step S408).
[0085] If the last word has been passed ("Yes" in Step S408), the procedure returns to Step
S401, where a new word is retrieved to execute the processing of Step S402 and the
subsequent steps. If the last word has not been passed ("No" in Step S408), the procedure
returns to Step S404 to execute the processing of Step S404 and the subsequent steps
on the next word within the input character string and the same retrieved word used
so far.
[0086] FIG. 16 is a diagram for explaining a processing of comparing the clue "Halt reversing
pots." with the retrieved word "stop" obtained by reversing the word "pots" stored
in the word list search result storage means 13, showing a relationship in a case
where the variable N is set to 15. In this example, the word "pots" within the clue
and the retrieved word "stop" have the relationship corresponding to "reversal".
[0087] Next, with reference to FIGS. 17 and 18, description will be made of a case where
the conditional word comparison means 14 performs a processing of judging whether
or not the word retrieved by the word search means 12 has the relationship of being
a homophone having a different spelling with respect to the character string composing
the clue, that is, the conditional judgment processing corresponding to the type of
indicator "homophones".
[0088] The conditional word comparison means 14 first retrieves one word from the word list
search result storage means 13 (Step S501). After judging whether or not the retrieved
word is the last word, if the retrieved word is the last word ("Yes" in Step S502),
the conditional word comparison means 14 brings the processing to an end. If the retrieved
word is not the last word ("No" in Step S502), the conditional word comparison means
14 initializes the variable N to "0" (Step S503), and sets a pointer to the Nth character
from the head of the original input character string stored in the input data temporary
storage means 11 and another pointer to the head character of the retrieved word (Step
S504).
[0089] Then, the conditional word comparison means 14 judges whether or not the word starting
from the Nth character of the input character string has a homophone having a different
spelling (Step S505).
[0090] If the input character string does not have a homophone having a different spelling
("No" in Step S505), the variable N is incremented so as to move the pointer to the
head character of the next word within the input character string (Step S509), and
it is judged whether or not the last word has been passed in the input character string
(Step S510). If the last word has been passed ("Yes" in Step S510), the procedure
returns to Step S501, where a new word is retrieved to execute the processing of Step
S502 and the subsequent steps. If the last word has not been passed ("No" in Step
S510), the procedure returns to Step S504 to execute the processing of Step S504 and
the subsequent steps on the next word within the input character string and the same
retrieved word used so far.
[0091] On the other hand, if the input character string has a homophone having a different
spelling ("Yes" in Step S505), one or a plurality of homophones having different spellings
with respect to the word starting from the Nth character of the input character string
are acquired and stored in a work buffer (Step S506), and the words stored in the
work buffer are compared with the retrieved word to judge whether or not any one of
the words matches the retrieved word (Step S507). If a match occurs ("Yes" in Step
S507), the retrieved word is registered as "homophones" (Step S508). If no match occurs
("No" in Step S507), the procedure advances to Step S509 to execute the above-mentioned
processing of Step S509 and the subsequent steps.
[0092] FIG. 18 is a diagram for explaining a processing of comparing the homophone having
a different spelling with respect to the word contained in the clue "Aisle which is
surrounded by water I hear." with the word "isle" stored in the word list search result
storage means 13. In this example, the homophone "isle" having a different spelling
with respect to the word "Aisle" within the input character string matches the retrieved
word "isle".
[0093] Note that the embodiment of the present invention is not limited to the above-mentioned
configurations, and can appropriately be subjected to, for example, such modifications
as to integrate or disperse some or all of the respective means within the control
unit 10 and integrate some or all of the means with the storage means within the storage
unit 40. Such configurations are also possible that communication lines and predetermined
storage media are used to update the contents of files within the storage unit 40,
and that the files within the storage unit 40 are arranged by being dispersed via
the communication lines. Further, the word search device according to the present
invention is not limited to the implementation as the electronic dictionary, and may
be implemented by a general-purpose computer and a software program executed thereby.
Further, the word search device according to the present invention can be implemented
by a computer and peripherals and a program executed thereby, and the program can
be distributed via communication lines or the computer-readable storage media. Alternatively,
the present invention can be configured as a system implemented by using a plurality
of computers connected via communication lines such as a Web system on the Internet
or the like. Further, the language to be provided by the present invention is not
limited to English, and may be another language that uses the alphabet such as German,
French, or Spanish, or a language that does not use the alphabet such as Japanese.
[0094] An answer may include several words and references to "an answer word", "a word forming
the answer" and the like in this specification are to be treated as references to
one, some or all of the words in the answer.
[0095] The foregoing description has been given by way of example only and it will be appreciated
by a person skilled in the art that modifications can be made without departing from
the scope of the present invention.