GB2235557A - Word searching/replacing device - Google Patents

Word searching/replacing device Download PDF

Info

Publication number
GB2235557A
GB2235557A GB9018937A GB9018937A GB2235557A GB 2235557 A GB2235557 A GB 2235557A GB 9018937 A GB9018937 A GB 9018937A GB 9018937 A GB9018937 A GB 9018937A GB 2235557 A GB2235557 A GB 2235557A
Authority
GB
United Kingdom
Prior art keywords
word
category
searched
words
searching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
GB9018937A
Other versions
GB9018937D0 (en
Inventor
Keizo Saito
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Publication of GB9018937D0 publication Critical patent/GB9018937D0/en
Publication of GB2235557A publication Critical patent/GB2235557A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools
    • G06F40/242Dictionaries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/268Morphological analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates

Abstract

A searching/replacing device having a category analyzing function comprises a dictionary memory 4 for storing many words and their categories; a keyboard 1 for inputting text data, words to be searched for and alternative words to replace them with and for designating the categories; a text memory 7 for storing the text data inputted through the keyboard; and a processor for searching the text data stored in the text memory for the words to be searched for, for analyzing a sentence containing the words searched for to find the subject of the sentence and determining the category of the subject based upon data stored in the dictionary memory, and for replacing the searched word with alternative word inputted through the keyboard when the determined category is in agreement with a category designated through the keyboard. <IMAGE>

Description

TITLE OF THE INVENTION SEARCHING/REPLACING DEVICE HAVING A CATEGORY ANALYZING FUNCTION BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a searching/replacing device mainly employed in an information processing device like a word processor, for searching inputted data for desired data and replacing it with other desired data.
2. Description of the Related Art Generally, an information processing device like a word processor has various elit functions, one of which is a searching/replacing function of searching inputted data for desired data and replacing it with other desired data.
Among the above-mentioned information processing devices, various devices required for attaining such a searching/replacing function will be described below as a searching/replacing device.
In a conventional searching/replacing device which is employed, for example, in a word processor, a searching/ replacing processing is carried out through an automatic searching/replacing processing where all the designated character strings are searched for in text already inputted and unconditionally and sequentially replaced with desired character strings, or through a prompted replacing processing where every time it is searched for, each of the designated character strings is replaced with a desired character string according to instructions given by the operator, as in an exemplary image presented on a screen shown in Figs. 9 and 10.
With the automatic searching/replacing processing in such a conventional searching/replacing device, for example, if "The dog roared at him." has been erroneously inputted instead of "The dog barked at him.", "roar" in the former sentence must be changed into "bark" as in the latter sentence.However, because of a simple replacement of "roar" with "bark" throughout the text, a sentence "The tiger roared with anger" in the text would also be replaced with "The tiger barked with anger." Similarly, if "bark" in "The tiger barked with anger." must be corrected to "roar", because of a simple replacement of "bark" into "roar" throughout the text, a sentence "The dog barked at him." would also be replaced with "The dog roared at him." Thus, simply designating "roar" and "bark" or the like perhaps leads to lower the reliability in editing and making a document.
With the prompted replacing process where the operator confirms an object to be replaced each time and gives instructions, it is useful to avoid an erroneous replacement but it consumes much time.
As the related art, a word processor in which a simple operation of repetitiously inputting searching/replacing commands enables to successively search for or replace the same word in text is known (Unexamined Japanese Patent Publication No. 205657/1985).
As related prior applications of the applicant of the present invention, there are proposed a word processing device comprising, in addition to conventional four functions of replacing one character, deleting one character, adding one character and shading adjacent word, a processing of referencing a segmentation table storing a correct word or character strings corresponding to word or character strings which might be misread, finding out a correct character or character string and picking it up, whereby an accuracy of picking up appropriate words from the dictionary can be significantly improved (Unexamined Japanese Patent Publication No. 56756/1988); and a word processing device comprising, in addition to the above conventional four functions, a processing of referencing a similar pronunciation information table, if some word or other is misspelled in inputted text, replacing an incorrect character string with alternative character string similar in pronunciation but dissimilar in spelling to find and pick up a correct word, whereby an accuracy of picking up appropriate words from the dictionary can be significantly improved (Unexamined Japanese Patent Publication No. 56757/1988).
SUMMARY OF THE INVENTION The present invention is to provide a searching/ replacing device having a category analyzing function for determining on the basis of a category of the subject in a sentence whether or not a word searched for should be replaced with an alternative one, which has been registered in a dictionary as follows, for example: a category of a word like "dog" or cat" is registered in the dictionary as "pet", while category of a word like "lion" or "tiger" is registered as "fierce animal".
Thus, according to the invention, there is provided a searching/replacing device having a category analyzing function comprising dictionary means for storing many words and categories of the respective words; input means for inputting various document information, words to be searched for and alternative words to be replaced with and for designating the categories; storing means for storing the document information inputted through the input means; searching means for searching the document information stored in the storing means for the words to be searched for; determining means for analyzing a sentence containing the word searched for by the searching means to find the subject of the sentence and for determining the category of the subject based upon data stored in the dictionary means; and replacing means for replacing the searched word with alternative word inputted through the input means when the category determined by the determining means is in agreement with a category designated through the input means.
With the above-mentioned searching/replacing device having a category analyzing function, the categories of the respective words in the dictionary means are all stored.
When a searching/replacing processing is carried out, first the searching means searches the document information stored in the storing means for the word to be searched for, and then the determining means analyzes a sentence containing the searched word and finds the subject of the sentence, while the category of the subject is determined by the dictionary means.
Then, the replacing means replaces the searched word with the alternative word when the category of the subject is in agreement with the category inputted through the input means.
Thus, the replacing procedure is not carried out when the category of the subject of the sentence containing the word to be searched for is different from the designated category. This means the word to be searched for is not replaced with a morphologically incorrect form related to the subject, and the reliability of the completed document is enhanced.
BRIEF DESCRIPTION OF THE DRAWINGS Fig.:l is a block diagram showing an architecture of an embodiment of the present invention applied to a word processor; Fig. 2 is a diagram for explaining an organization of categories of words; Fig. 3 is a diagram for explaining an example of categories registered in a dictionary; Figs. 4 to 7 are diagrams showing an exemplary image on a screen in executing a searching/replacing processing; Figs. 8(a) and 8(b) are flow charts showing the operation of the embodiment; and Figs. 9 and 10 are diagrams showing an exemplary image on a screen in executing a conventional searching/replacing processing.
DESCRIPTION OF THE PREFERRED EMBODIMENT As the dictionary means in the present invention, usually used are an internal memory such as a core memory and an IC memory, and an external storing device such as a floppy disc and a magnetic disc: are used.
As the input means, that which can input various document information, input word to be searched for or to be replaced and designate categories; for example, a keyboard, a tablet, an OCR device, a magnetic device or the like may be used.
Further, as the searching means, determining means and replacing means, generally a microcomputer consisting of a CPU, a ROM, a RAM and an I/O port is conveniently used; while as storing means, usually the RAM is used.
Now, the present invention will be explained in detail in conjunction with an embodiment shown in the drawings. It is not intended that the present invention be limited to the embodiments.
Fig. 1 is a block diagram showing an architecture of an embodiment of the present invention applied to a word processor.
In Fig. 1, a keyboard 1 includes alphanumeric keys, function keys, etc. used for inputting information on a document, searched word and replaced word and information mentioned below for designating categories of words into a control unit 2.
The control unit 2 is a microcomputer and performs various data processing in accordance with a control program stored in a program memory 3 consisting of a ROM.
A dictionary 4 is a floppy disc and stores many words.
Also, the dictionary 4 stores categories of respective words mentioned below.
A display device 5 may be a CRT display, an LC (liquid crystal) display, an EL display or the like.
A RAM 6 is provided with an input data buffer 7 for storing document data, a category data buffer 8 for storing category data, a searching data buffer 9 for storing searched word and a replacing data buffer 10 for storing replaced word.
Fig. 2 is a diagram for explaining an organization of categories of words. The words registered in the dictionary 4 are classified based upon the organization shown in Fig. 2.
They are primarily classified into "nature", "culture", etc., and each item is further classified; for example, "nature" is classified into "astronomy", "topography", "plants", animals", etc., while "culture" is classified into "society", "arts", , etc.
Each of the secondarily classified items is further classified; for example, "animals" is classified into "pets", "fierce animals", etc.
Numerals in parentheses added to each of classification items are classification codes representing an attitude of each word. The numeral added to each of the primarily classified items is the leftmost figure in its code, the numeral added to each of the secondarily classified items is the next figure in the code, and the numeral added to each of the tertiarily classified items is the figure after the next.
In accordance with the above organization, words like "dog" and "cat" have a category of "pets", while words like "lion" and "tiger" have a category of "fierce animals".
Fig. 3 is a diagram for explaining an exemplary category registered in the dictionary 4. As shown in Fig. 3, each of words in the dictionary 4 is registered with a category code which is a classification code representing a category of each word.
For example, as for "dog" shown in Fig. 2, since it belongs to "nature" (0) and belongs with "animals" (3) and "pets" (0), "0" comes first, "3" the next and then "0", and its category code becomes "030...". As for "trumpet", since it belongs to "culture" (1), "arts" (1) and "music" (1), its category code becomes "111...".
Figs. 4 to 7 are diagrams for explaining an exemplary image presented on a screen of the display device 5 in executing a searching/replacing processing.
The control unit 2 stores various document information inputted through the keyboard 1 in the input data buffer 7.
The program memory 3 stores an indication to be presented on the screen as shown in Fig. 4. The control unit 2 reads the inputted indication, as shown in Fig. 4, from the program memory 3, and it displays the indication on the display device 5 as a window, when the control unit 2 receives a search-andreplace instruction from the keyboard 1 with text stored in the input data buffer 7.
After the control unit 2 displays the indication mentioned above, it stores a category code corresponding to a category in the category data buffer 8 when the category is designated through the keyboard 1, and it displays the designated category in a category column on the screen, as shown in Fig.
5. Fig. 5 shows an exemplary indication when the category is designated as "fierce animals".
Items as stated above may be designated through the function keys on the keyboard 1, or designated directly through the keyboard 1 by typing "fierce animals" after a cursor 11 is moved to the category column as shown in Fig. 4.
The control unit 2 stores words to be searched for in the searching data buffer 9 when the word to be searched for is inputted through the keyboard 1, and it displays the word in a searching column on the screen, as shown in Fig. 6.
Fig. 6 shows an exemplary indication when the inputted word is "b-a-r-k".
The control unit 2 stores alternative word to be replaced in the replacing data buffer 10 when the word is inputted through the keyboard 1, and it displays the word in a replacing column on the screen, as shown in Fig.
7. Fig. 7 shows an exemplary indication when the inputted word is "r-o-a-r".
As a command to start is issued through the keyboard 1 after conditions described in the above are inputted, first the control unit 2 searches, in a designated area in sentences stored in the input data buffer 7, a character string-corresponding to the word inputted to be searched for.
If the character string corresponds, for example, to an inflexional word, the control unit 2 also searches other words transformed from the character string through inflection. When the character string is "b-a-r-k", the control unit 2 also searches "b-a-r-k-s". The control unit 2 decides the way how "bark" inflects, referencing information on parts of speech (see Fig. 3) registered in conjunction with words contained in the dictionary 4.
When a character string designated as the word to be searched for, or a word, is not registered in the dictionary 4, the word is not inflected.
As the character string to be searched for is found, a sentence containing the character string is morphologically and structurally analyzed, and the subject related to the character string is determined. The morphological analysis and the structural analysis are carried out through a wellknown way of document analysis.
Then, an analysis on where the subject belongs in the classified organization list shown in Fig. 2 is carried out, and if the result of the analysis is identified with a category code designated in the category item column, the character string is replaced with correct one. In this case, if the character string is, for example, a past form before the replacement, it should be appropriately changed into the base form and then replaced.
If there is no category designation, a searching/ replacing procedure as in the prior art embodiments is performed.
When the procedure is performed without inputting alternative words, the searching processing alone is performed, and a blank is left in the column of the replacing mode of the screen indication shown in Figs. 4 to 7.
Then, the processing procedure of the control unit 2 will be described in conjunction with flow charts in Figs.
8(a) and 8(b).
In executing the searching/replacing processing, the screen indication about searching/replacing is displayed in accordance with an instruction from the keyboard 1, and thereafter search-and-replace parameters including designation of a category, input of word to be searched for and alternative word, etc. are set (Step 21).
After that, data to be searched for, or word to be searched for, is confirmed if it corresponds to an inflexional word (Step 22), and if so, an inflection pattern is set (Step 23).
Then, alternative data, or alternative word, is confirmed if it corresponds to an inflexional word (Step 24), and if so, it is further confirmed if the data to be searched for is in agreement with the alternative data in a part of speech (Step 25). If so, checking inflection patterns of the data to be searched for and those of the alternative data (Step 26), a data pattern is searched from sentences stored in the input data buffer 7 (Step 27).
If the data to be searched for does not correspond to the inflexional word at Step 22, the alternative data does not correspond to the inflexional word at Step 24, and the data to be searched for and the alternative data are not in agreement with the part of speech at Step 25, the procedure proceeds to Step 27.
Then, it is confirmed if the data pattern exists (Step 28), and if so, it is further confirmed if the category is set (Step 29). If so, a sentence containing the data pattern is structurally or morphologically analyzed (Step 30) to find the subject of a sentence containing the data pattern (Step 31).
After that, it is confirmed if the category already set and that of the subject are in agreement with each other (Step 32). Only if so, searched data is replaced with alternative data (Step 33), and the procedure at Step 27 is performed.
If the category is not set at Step 29, the procedure proceeds to Step 33. If the category already set and that of the subject are not in agreement with each other at Step 32, the procedure at Step 33 is not performed but goes back to Step 27.
If the data pattern does not exist at Step 28, the searching/replacing processing is completed.
In this way, categories of words are registered in the dictionary 4, and only when the category of the subject of a sentence containing a word to be searched for is in agreement with a designated category, the replacing procedure is performed, whereby the word to be searched for is prevented from being replaced with an alternative word which is morphologically incorrect related to the subiect. Thus, a grammatically perfect, correct sentence can be made.
As has been described, with the searching/replacing device having a category analyzing function, categories of words are registered in dictionary means in advance, and a word to be searched for is replaced with an alternative word, only when a category of the subject of a sentence containing the word to be searched for is in agreement with a category designated through input means. As a result, in the searching/replacing processing, grammatically perfect, correct sentences can be made and edited without checking the searched word each time.

Claims (7)

CLAIMS CL IMS:=
1. A searching/replacing device having a category analyzing function, comprising: dictionary means for storing many words and categories of the respective words; input means for inputting various document information, words to be searched for and alternative words to be replaced with and for designating the categories; storing means for storing the document information inputted through said input means; searching means for searching the document information stored in the storing means for the words to he searched for; determining means for analyzing a sentence containing the words searched for by said searching means to find the subject of the sentence and for determining the category of the subject based upon data stored in said dictionary means; and replacing means for replacing the searched word with alternative word inputted through said input means when the category determined by said determining means is in agreement with a category designated through said input means.
2. A device according to claim 1, further comprising display means having a screen on which the document information, the words to be searched for, the alternative words and the categories are displayed, and storage means for storing indication data containing the word to be searched for, the alternative word and the category which is displayed in a window on said screen displaying the document information.
3. A device according to claim 1, further comprising confirming means for confirming whether or not the word inputted through said input means to be searched for corresponds to an inflexional word, by referencing said dictionary means; and wherein said searching means searches for the word inputted through said input means to be searched for and an inflected form of said inflexional word confirmed by said confirming means, from the document information stored in said storing means.
4. A device according to claim 1, wherein said input means has function keys provided with a function memory capable of storing the categories, correlating them with one another, said function keys being used in designating the categories.
5. A word processing system including the facility for automatically replacing an original specified word in an input text by a replacement specified word, means being provided for inputting the text, the original specified word to be searched for in the text, the replacement word which is to replace said original specified word, and a designated category, means also being provided for analysing the context in which the original specified word, when found, is used in said text, and for deriving from a storage means category information representing said context, the system being adapted to effect the word replacement only when the derived category information corresponds with the designated category input by way of said input means in association with the specified original and replacement words.
6. A word processing system including the facility for automatically replacing an original specified word in an input text by a replacement specified word, means being provided for analysing the context in which the original specified word, when found, is used in said text, and for determining whether or not the replacement procedure is to be performed according to a comparison between a category associated with said analysed context of use, and a designated category input in association with the original and replacement words.
7. A searching/replacing device substantially as hereinbefore described with reference to Figures 1 to 8 of the accompanying drawings.
GB9018937A 1989-08-30 1990-08-30 Word searching/replacing device Withdrawn GB2235557A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1225917A JPH0385672A (en) 1989-08-30 1989-08-30 Retrieval replacing device with function for analyzing attribute

Publications (2)

Publication Number Publication Date
GB9018937D0 GB9018937D0 (en) 1990-10-17
GB2235557A true GB2235557A (en) 1991-03-06

Family

ID=16836912

Family Applications (1)

Application Number Title Priority Date Filing Date
GB9018937A Withdrawn GB2235557A (en) 1989-08-30 1990-08-30 Word searching/replacing device

Country Status (2)

Country Link
JP (1) JPH0385672A (en)
GB (1) GB2235557A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2314433A (en) * 1996-06-22 1997-12-24 Xerox Corp Finding and modifying strings of a regular language in a text

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0093249A2 (en) * 1982-04-30 1983-11-09 International Business Machines Corporation System for detecting and correcting contextual errors in a text processing system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0093249A2 (en) * 1982-04-30 1983-11-09 International Business Machines Corporation System for detecting and correcting contextual errors in a text processing system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2314433A (en) * 1996-06-22 1997-12-24 Xerox Corp Finding and modifying strings of a regular language in a text
US6023760A (en) * 1996-06-22 2000-02-08 Xerox Corporation Modifying an input string partitioned in accordance with directionality and length constraints

Also Published As

Publication number Publication date
GB9018937D0 (en) 1990-10-17
JPH0385672A (en) 1991-04-10

Similar Documents

Publication Publication Date Title
EP0423683B1 (en) Apparatus for automatically generating index
US5680628A (en) Method and apparatus for automated search and retrieval process
US9411788B2 (en) Methods and apparatus for improved navigation among controlled terms in one or more user documents
US5890103A (en) Method and apparatus for improved tokenization of natural language text
KR100650427B1 (en) Integrated development tool for building a natural language understanding application
US4831529A (en) Machine translation system
US5280573A (en) Document processing support system using keywords to retrieve explanatory information linked together by correlative arcs
WO1997004405A9 (en) Method and apparatus for automated search and retrieval processing
JPH0630066B2 (en) Table type language translation method
US5373442A (en) Electronic translating apparatus having pre-editing learning capability
JP2005173999A (en) Device, system and method for searching electronic file, program, and recording media
GB2235557A (en) Word searching/replacing device
JP4005925B2 (en) Document processing method, document processing apparatus, and program
JP2838984B2 (en) General-purpose reference device
JPH06266769A (en) Synonym information preparing device
JPH0748217B2 (en) Document summarization device
JPH08263490A (en) Legal document updating system
JPH07295983A (en) Method for supporting sentence proofreading and device therefor
CN112528635A (en) Search device, search method, and recording medium
JPH0793330A (en) Document correcting device
JPH05324289A (en) Device for automatically generating programming specification
JPH0728956A (en) Erroneously reading correction supporting method
JPH08185401A (en) Document retrieving device
JPH06337895A (en) Method for selecting translation word and device for preparing dictionary for unification of translation word
JPH06259466A (en) Machine translation system

Legal Events

Date Code Title Description
WAP Application withdrawn, taken to be withdrawn or refused ** after publication under section 16(1)