text:
Justia Patents US Patent Application for ABNORMALITY DETERMINATION APPARATUS, IMAGE FORMING APPARATUS, ABNORMALITY DETERMINATION SYSTEM, AND PROGRAM Patent Application (Application #20190187601)
ABNORMALITY DETERMINATION APPARATUS, IMAGE FORMING APPARATUS, ABNORMALITY DETERMINATION SYSTEM, AND PROGRAM
Dec 7, 2018 - KONICA MINOLTA, INC.
An abnormality determination apparatus includes: an audio data acquisitor that acquires audio data of an apparatus to be judged for determining presence or absence of abnormality; an abnormal sound detector that detects an abnormal sound based on the audio data acquired by the audio data acquisitor; and a hardware processor that determines whether the abnormal sound is such a sound that an operation of the apparatus to be judged should be restricted based on a subsequent secular change of the abnormal sound when the abnormal sound is detected by the abnormal sound detector, and restricts the operation of the apparatus to be judged when the hardware processor determines that the abnormal sound is such a sound that the operation of the apparatus to be judged should be restricted.
Latest KONICA MINOLTA, INC. Patents:
Measurement method, and measuring chip and measuring kit used for the same
Sheet type determining device and image forming device
Optical reflective film
Ultrasound diagnosis apparatus
VOICE-OPERATED SYSTEM, CONTROLLER, COMPUTER-READABLE RECORDING MEDIUM, AND PROCESSING DEVICE
The entire disclosure of Japanese patent Application No. 2017-244079, filed on Dec. 20, 2017, is incorporated herein by reference in its entirety.
BACKGROUND Technological Field
The present invention relates to an abnormality determination apparatus used for determining presence/absence of abnormality of an apparatus to be judged such as an image forming apparatus by sound, an image forming apparatus including the abnormality determination apparatus, an abnormality determination system, and a program.
In an image forming apparatus such as a multi function peripheral (MFP) or the like which is a multifunctional digital image forming apparatus, and other apparatuses, abnormal sounds are likely to occur during the operation when the life span end of a component is approaching.
Therefore, a technique is known in which abnormality of an apparatus to be judged such as an image forming apparatus is determined by sound and the operation of the apparatus is controlled based on the determination result. For example, JP 2016-022619 A proposes a method of estimating the life span of component generating an abnormal sound according to the loudness of the sound and determining that the sound is an abnormal sound when the sound exceeds the sound pressure level of a predetermined threshold value, and it has been proposed to restrict the operation of the component having abnormality if it is determined that the sound is an abnormal sound.
Further, in JP 2012-177748 A, a technique has been proposed in which an apparatus has a conversion memory between loudness of an abnormal operation sound and replacement timing for components, and compares the operating sound over time with the past data, thereby collating the sound with the abnormal operation sound stored in a memory for known abnormal sounds if it is determined that the operation sound has a sign of abnormality, and notifying about the replacement timing of the component based on the result of matching as to a component and a replacement timing in the conversion memory.
However, even if an abnormal sound occurs once, the abnormal sound may be an abnormal sound due to other noises. Further, depending on the loudness or occurrence frequency of abnormal sounds, there are cases in which the component can still be used. Therefore, when the operation of the apparatus to be judged is restricted or a component is replaced based only on the occurrence of an abnormal sound as in the techniques described in JP 2016-022619 A and JP 2012-177748 A, there is a problem that the running cost is increased and at the same time the downtime of the apparatus becomes long.
The present invention has been made in view of such a technical background, and an object is to provide an abnormality determination apparatus, an image forming apparatus, an abnormality determination system and a program, which can solve problems such as an increase in running cost and long downtime of the apparatus to be judged, which are caused by restricting the operation of an apparatus to be judged on the basis of only occurrence of an abnormal sound, in the case of detecting the presence or absence of abnormality of an apparatus to be judged such as the image forming apparatus based on the abnormal sound.
To achieve the abovementioned object, according to an aspect of the present invention, an abnormality determination apparatus reflecting one aspect of the present invention comprises: an audio data acquisitor that acquires audio data of an apparatus to be judged for determining presence or absence of abnormality; an abnormal sound detector that detects an abnormal sound based on the audio data acquired by the audio data acquisitor; and a hardware processor that determines whether the abnormal sound is such a sound that an operation of the apparatus to be judged should be restricted based on a subsequent secular change of the abnormal sound when the abnormal sound is detected by the abnormal sound detector, and restricts the operation of the apparatus to be judged when the hardware processor determines that the abnormal sound is such a sound that the operation of the apparatus to be judged should be restricted.
The advantages and features provided by one or more embodiments of the invention will become more fully understood from the detailed description given hereinbelow and the appended drawings which are given by way of illustration only, and thus are not intended as a definition of the limits of the present invention:
FIG. 1 is a configuration diagram of an image forming apparatus in which an abnormality determination apparatus according to an embodiment of the present invention is used;
FIG. 2 is a diagram showing a configuration example of a photoreceptor drum unit;
FIG. 3 is a block diagram showing an electrical configuration of an image forming apparatus;
FIG. 4 is a graph showing a relationship between an operation time and a sound pressure level at a certain frequency (frequency caused by deterioration of a member to he detected) of an image forming apparatus;
FIG. 5 is a graph showing the relationship between the operation time and the sound pressure level of the image forming apparatus when the operation restriction is performed because the abnormal sound of the audio data is determined to be due to the deterioration of the cleaning blade;
FIG. 6 is a graph for illustrating an example in which deterioration of a cleaning blade is judged based on the occurrence frequency of an abnormal sound;
FIG. 7 is similarly a graph for illustrating an example in which deterioration of a cleaning blade is judged based on the occurrence frequency of an abnormal sound;
FIG. 8A is a graph showing frequency and a sound pressure level at the time of initial operation of the cleaning blade;
FIG. 8B is a graph showing the frequency and sound pressure level when the deterioration is small;
FIG. 8C is a graph showing the frequency and sound pressure level when the deterioration is large;
FIG. 9 is a flowchart showing an operation example of the image forming apparatus when an abnormal sound is detected;
FIG. 10 is a flowchart showing another operation example of the image forming apparatus when an abnormal sound is detected;
FIG. 11 is a configuration diagram of an abnormality determination system including the image forming apparatus and a management apparatus; and
FIG. 12 is a block diagram showing an electrical configuration of the management apparatus.
Hereinafter, one or more embodiments of the present invention will be described with reference to the drawings. However, the scope of the invention is not limited to the disclosed embodiments.
FIG. 1 is a schematic configuration diagram of an image forming apparatus 1 as an example of an abnormality determination apparatus according to an embodiment of the present invention. In this example, a tandem type color printer is used as the image forming apparatus 1.
In FIG. 1, the image forming apparatus 1 includes a sheet feeding unit 200 arranged in the lower part of an apparatus main body 1A, color image forming unit 100 in the middle part, and sheet discharging unit 600 in the upper part. A sheet conveyance path 206 is provided from the sheet feeding unit 200 to the sheet discharging unit 600, for conveying a sheet (paper) S fed from the sheet feeding unit 200 upward.
The color image forming unit 100 includes a driving roller 51 and a driven roller 50 disposed substantially in the center in the vertical direction oldie apparatus main body 1A, an intermediate transfer belt 60 suspended horizontally between these driving and driven rollers 51 and 50 for traveling in the direction of the arrow, and photoreceptor units 62Y, 62M, 62C, and 62K, which are image forming units of yellow (Y), magenta (M), cyan (C), and black (K) arranged in this travel direction.
The toner images formed by the photoreceptor units 62Y, 62M, 62C, and 62K are superimposed and transferred to the transfer belt 60, and subjected to a second transfer on the sheet S conveyed on the sheet conveyance path 206 at the conveyance end of the transfer belt 60 (the right end in the figure), and the sheet S is fed to a fixing unit 300 so that the toner images are fixed.
The photoreceptor units 62Y, 62M, 62C, and 62K form images by an electrostatic copying method, and include respectively chargers, developing devices 61Y, 61M, 61C, and 61K, photoreceptor drums 63Y, 63M, 63C, and 63K, and transfer devices or the like disposed on the periphery of each of the photoreceptor units. In addition, the surface of each of photoreceptor drums 63Y, 63M, 63C, and 63K charged by the charger is exposed with each of the laser diodes of an exposure unit 40 including a print head 41 having four laser diodes, a polygon mirror, a scanning lens, etc., and four reflection mirrors 42 and the like so that an electrostatic latent image is formed on the surface.
Further, toner cartridges 70Y, 70M, 70C, and 70K and sub-hoppers 80Y, 80M, 80C, and 80K are disposed above the photoreceptor units 62Y, 62M, 62C, and 62K as replenishing mechanisms for replenishing toner to the developing devices 61Y, 61M, 61C, and 61K of the respective photoreceptor units 62Y, 62M, 62C, and 62K.
In FIG. 1, reference numeral 400 denotes a communication unit with an external apparatus, and reference numeral 500 denotes an operation panel unit having a key unit and a display unit.
FIG. 2 is a configuration diagram of each photoreceptor unit 62 (62Y, 62M, 62C, or 62K). Each photoreceptor unit 62 includes an electrification charger 64 (64Y, 64M, 64C, or 64K), the developing device 61 (61Y, 61M, 61C, or 61K), a cleaning blade 65 (65Y, 65M, 65C, or 65K) as a cleaning device for removing the toner remaining on the photoreceptor drum 63, with the photoreceptor drum 63 (63Y, 63M, 63C, or 63K) located in the center, and a sound detection unit (audio data acquiring unit) 66 (66Y, 66M, 66C, or 66K) made of a microphone is arranged in the vicinity of each cleaning blade 65. After the photoreceptor drum 63 is charged by the electrification charger 64, the electrostatic latent image drawn on the photoreceptor drum 63 by the laser beam emitted from the exposure unit 40 which is a laser scanning optical unit is developed to form toner images of respective colors by moving negatively charged toner from the developing device 61 to the photoreceptor drum 63.
The toner images formed on the surfaces of the photoreceptor drums 63 are primarily transferred onto the intermediate transfer belt 60 and synthesized by the electric field applied from primary transfer rollers 90 facing respective photoreceptor drums 63.
Such an electrophotographic image forming process is well known, and a detailed description thereof will be omitted.
FIG. 3 is a block diagram showing an electrical configuration of the image forming apparatus 1. The image forming apparatus 1 includes a control unit 20, the above-described operation panel unit 500, the above-described sound detection unit 66, a various load/drive unit 67, a network interface unit (network I/F unit) 69, and the like.
The control unit 20 comprehensively controls various loads in the image forming apparatus 1, and includes a CPU 21 serving as a computing unit, a storage part (ROM/RAM/nonvolatile flash memory or the like) 22, a monitoring part 23 that monitors the presence or absence of occurrence of an abnormal sound and the secular change after the occurrence as well as audio data and determines whether the abnormal sound is such a sound that the operation of the image forming apparatus 1 should be restricted based on the secular change after the occurrence of the abnormal sound, in other words, whether the abnormal sound is a sound by which deterioration of a component of the audio data acquisition target can be estimated, an operation restriction determining part 24 for determining whether to restrict the operation of the image forming apparatus 1 based on the determination result by the monitoring part 23, a data processing part 25, and the like. The monitoring part 23, the operation restriction determining part 24, and the data processing part 25 are configured as functions of the CPU 21.
In the nonvolatile flash memory or the like of the storage part 22, audio data, a level of an abnormal sound, audio data for collation for determining that the abnormal sound is caused by deterioration of the target component, a program and the like are stored, and the monitoring part 23 compares the audio data with a level of the abnormal sound and audio data for collation to determine whether the sound is an abnormal sound and whether the sound is such an abnormal sound that the operation should be restricted.
The audio data of the sound generated by the machine (component) acquired by the sound detection unit 66 is sent to the control unit 20, converted to data for storage by the data processing part 25, and then stored in the storage part 22. Accordingly, in the storage part 22, the audio data generated from the time of the initial operation of the machine (component) is stored with the lapse of time.
As the various load/drive unit 67, the above-described photoreceptor unit (color and monochrome) 62, and driving component 68 such as a clutch and a motor are included.
The network I/F unit 69 constitutes the aforementioned communication unit 400 (shown in FIG. 1) for exchanging data with an external apparatus, namely a management apparatus for example to be described later or the like.
Next, the operation of the image forming apparatus 1 when an abnormal sound is detected from the audio data acquired by the sound detection unit 66 and stored in the storage part 22 will be described. In the present embodiment, the case where the acquisition target of the audio data is the cleaning blade 65 will be described, but the target is not limited to the cleaning blade 65.
FIG. 4 is a graph showing the relationship between operating time (indicated as a travel distance (time) FIG. 4) and a sound pressure level of the image forming apparatus 1 at a certain frequency (frequency caused by deterioration of the cleaning blade 65 in this example).
The operation sound of the machine is continuously acquired by the sound detection unit 66 for the entire time during the operation of the detection target (the cleaning blade 65 in this example), and the acquired audio data is processed by the data processing part 25 into sound pressure level data and stored in the storage part 22. In addition, the sound pressure level of the abnormal sound caused due to abrasion or deterioration is stored in the storage part 22 in advance as a predetermined value.
In the period 1 in the graph of FIG. 4, the sound pressure level sharply rises as indicated by the arrow Y1, and a high value is detected as the sound pressure level, but since the abnormal sound occurs abruptly without a sign in continuous measurement, and the level has dropped after the occurrence to the same level as before the occurrence, the monitoring part 23 determines that this abnormal sound is caused by abnormality which is not deterioration (external noise), and the operation restriction determining part 24 follows the determination result to determine not to restrict the image forming operation.
In the period 2, when an abnormal sound having a high sound pressure level is measured as indicated by arrow Y2, the monitoring part 23 monitors the subsequent secular change of the audio data. In this example, since the sound pressure level also increases as the travel distance increases, the monitoring part 23 determines that this abnormal sound is a sound caused by degradation of the cleaning blade 65. As described above, the audio data for collation, which is the criterion of judgment, is stored in the storage part 22, and the monitoring part 23 compares the secular changes of the audio data after the occurrence of the abnormal sound with the data for collation to determine whether the sound is an abnormal sound due to deterioration of component based on the collation result.
For example, in the case of the cleaning blade 65, as the cleaning blade 65 is used, the edge abrasion proceeds and the contact area between the cleaning blade 65 and the photoreceptor drum 63 increases, so that the frictional force between the cleaning blade 65 and the photoreceptor drum 63 increases, and a frictional sound is generated as an abnormal sound. When it is determined that the abnormal sound is caused by the deterioration of the cleaning blade 65, the operation restriction determining part 24 determines to perform an operation restriction as described later, and the CPU 21 performs operation restriction based on this determination. Note that the level of restriction of operation is desirably changed while the timing of the operation restriction is switched according to the level change of the sound.
The period 3 in FIG. 4 is a period in a state where the deterioration of the cleaning blade 65 is already detected due to an abnormal sound, and after a sudden increase in sound, the sound pressure level sharply drops as compared with that before the sudden increase in sound as shown by an arrow Y3. This is probably because the cleaning blade 65 has been curled. Therefore, when detecting a sound (second sound) having a different sound quality, in the period 3, from the abnormal sound (first sound) in the period 2, the monitoring part 23 determines that the sound is abnormal because the deterioration of the cleaning blade 65 has advanced, and the operation restriction determining part 24 decides to prohibit the operation, whereby the CPU 21 prohibits the operation in accordance with this determination.
The audio data should be desirably acquired until at least the sound corresponding to the blade curling of the cleaning blade 65 is detected. As a result, the cleaning blade 65 can be used until its life span end is reached. In addition, although the audio data may be acquired for the entire time during the image forming operation, there may be a period during which the audio data is not acquired as long as the audio data to such a degree that the secular change from the occurrence of an abnormal sound to the blade curling can be estimated is acquired even if the audio data is not always acquired.
In this manner, when an abnormal sound by which the operation is determined to be restricted based on the secular change after the detection is assumed to be the first sound, the operation is restricted due to the first sound so that the restriction level of the operation is changed according to the level change of the sound after the abnormal sound detection and the operation is prohibited when the second sound having a sound quality different from that of the first sound is detected, whereby the presence of deterioration of the cleaning blade 65 which has generated an abnormal sound can be more accurately determined and the operation according to the degree of deterioration of the component can be performed.
Further, not only in the cleaning blade 65 but also in the electromagnetic clutch, abrasion of the bearing portion and the friction surface proceeds as the coupling/release/rotation is carried out, so that an offset (eccentricity) of rotation occurs, and as a result, an abnormal sound is generated due to abnormal contact at a place inside the clutch which has originally no contact, or abnormality of engagement between the clutch and the gear. Also in this case, since the sound pressure level increases with age as in the period 2 in FIG. 4, presence of the deterioration can be determined based on the result of continuous measurement.
FIG. 5 is a graph showing the relationship between the operation time and the sound pressure level of the image forming apparatus 1 when the operation restriction is performed since it is determined that the abnormal sound of the audio data is due to the deterioration of the cleaning blade 65.
When it is determined that the cleaning blade 65 has deteriorated based on the detection of the abnormal sound and the subsequent secular change in the period 2 illustrated in FIG. 4, the operation restriction determining part 24 determines to lower the rotation speed (productivity) of the photoreceptor drum 63 for example, and as a result, permits the image forming apparatus 1 to operate under the restriction when it is confirmed that the sound pressure level has decreased as indicated by the broken line in FIG. 5.
Also, when deterioration is confirmed again due to a sudden rise of the sound, the operation restriction determining part 24 determines restrictions such as a further reduction in productivity. In the case where the selectable restriction no longer exists or a sudden drop in the sound like the period 3 in FIG. 4 is detected, the operation restriction determining part 24 prohibits the printing operation affecting the cleaning of the photoreceptor drum 63, and permits only operations such as scanner operation for document reading which does not affect the cleaning of the photoreceptor drum 63.
Restrictions other than the decrease in productivity is considered to include print color restriction (monochrome, two color printing only), photo print restriction (character print is allowed), resolution restriction and the like.
As shown by the broken line in FIG. 5, by restricting the operation when an abnormal sound due to the deterioration of the cleaning blade 65 is detected, the travel distance (running time) until the cleaning blade 65 curls, in other words, the life span can be lengthened.
FIGS. 6 and 7 illustrate judgment of the deterioration of the cleaning blade 65 based on the occurrence frequency of the abnormal sound.
As shown in FIG. 6, the measurement period is determined to be one job (JOB). The period of each job is indicated by a dashed rectangle in FIG. 6. Then, within the time of each job, the period of time when the predetermined value K1 of the sound pressure level stored in the storage part 22 is exceeded is measured. For example, it is determined that
when the predetermined value is exceeded for one second out of ten seconds within the period of JOB 1, the value is 10%,
when the predetermined value is exceeded for two seconds out of ten seconds within the period of JOB 2, the value is 20%, and
when the predetermined value is exceeded for ten seconds out of ten seconds within the period of JOB N, the value is 100%, and
the result obtained by measuring the values with age is shown in the graph of FIG. 7.
In the graph of FIG. 7, the horizontal axis represents the operation time (travel distance (time)) of the image forming apparatus 1, and the vertical axis represents occurrence frequency. A change in the occurrence frequency of the sound pressure level exceeding the predetermined value as shown in the graph of FIG. 7, is compared with the threshold value K2, so that similarly to the case described with reference to FIGS. 4 and 5, when the occurrence frequency has reached K2, the sound is detected as an abnormal sound, and the secular change of occurrence frequency after that is checked, whereby whether the sound is an abnormal sound due to deterioration of the cleaning blade 65 is checked based on whether the occurrence frequency gradually increases, or the like, so that execution of the operation restriction is determined if the sound is an abnormal sound due to deterioration, and control is performed according to the determination result.
FIG. 8A is a graph showing a frequency and the sound pressure level at the time of initial operation of the cleaning blade 65, FIG. 8B is a graph showing the frequency and sound pressure level when the deterioration is small, and FIG. 8C is a graph showing the frequency and sound pressure level when the deterioration is large. At the initial stage of operation, only a frequency generated as a normal machine operation sound is measured as shown in FIG. 8A, but as deterioration starts, an abnormal sound (deterioration sound) having a high sound pressure level is detected in another frequency range different from that of the usual sound as shown in FIG. 8B. As the deterioration proceeds, the shift of frequency of the sound generated by the deterioration toward the lower side as shown in FIG. 8C is measured over time, and the operation restriction is determined to be performed and controlled as described above. Also in this case, the timing may be switched depending on the degree of degradation and stepwise operation restriction may be performed.
FIG. 9 is a flowchart showing the operation of the image forming apparatus 1 when an abnormal sound is detected. This operation is executed by the CPU 21 of the control unit 20 of the image forming apparatus 1 operating according to the operation program stored in the storage part 22 or the like.
After detecting the secular change of the abnormal sound and the operation mode of the apparatus itself in step S01, whether the abnormal sound is due to the deterioration of the component of the audio data acquisition target, in other words, whether the operation of the apparatus itself is to be restricted is determined in step S02. When the abnormal sound is not due to deterioration and the operation of the apparatus itself does not need to be restricted (NO in step S01), the operation is executed in step S03, and the processing returns to step S01 to detect an abnormal sound.
In step S02, when the abnormal sound is due to the deterioration of the component of the audio data acquisition target and the operation of the apparatus itself needs to be restricted (YES in step S02), execution of the operation restriction of the apparatus is determined in step S04, and the processing proceeds to step S05.
In step S05, it is determined whether the operation is to be prohibited, and when the operation is not prohibited (NO in step S05), the restricted operation is executed in step S06, and the processing returns to step S01. When the operation is prohibited (YES in step S05), the operation is stopped in step S07.
In the case where an abnormal sound is detected and operation is prohibited in the middle of the image forming operation (printing operation) based on the subsequent secular change, the number of unfinished sheets not primed is also considered as a basis for judgement as to whether to prohibit operation. To be specific, when the number of unfinished sheets is small, printing is continued without prohibiting and printing is prohibited after the printing completion, so that usability is not deteriorated for the user. When the number of unfinished sheets is large, the printing is prohibited immediately.
FIG. 10 is a flowchart showing the operation in the case where the number of unfinished sheets which are not printed is also taken into consideration as a material for judging whether to prohibit operation.
The flowchart shown in FIG. 10 shows the processing after step S05 in the flowchart of FIG. 9, and steps S01 to S04 are the same as in the flowchart of FIG. 9, so that the steps are omitted in FIG. 10.
In step S05, whether the operation is prohibited is determined, and when the operation is not prohibited (NO in step S05), the restricted operation is executed in step 506, and the processing returns to step S01. In the case of prohibiting (YES in step S05), it is determined whether the number of unfinished sheets which are not printed is equal to or less than a predetermined value in step S11. When the number is equal to or less than the predetermined value (YES in step S11), the restricted operation is executed in step S06. When the number of unfinished sheets is more than the predetermined value (NO in step S11), the operation is stopped in step S07.
As described above, in the present embodiment, when an abnormal sound is detected in the image forming apparatus, the operation is not restricted based only on the occurrence (detection) of the abnormal sound, and whether the abnormal sound is such a sound that the operation of the image forming apparatus should be restricted is determined based on the subsequent secular change of the abnormal sound, and then since the operation is restricted when the sound is determined to be such an abnormal sound that the restriction should be carried out, there is no fear that the abnormal sound due to an external noise is erroneously determined to be caused by the deterioration of a component, and the degree of deterioration of the component generating the abnormal sound can be accurately determined, whereby the problem can be solved that the running cost is increased and the downtime of the apparatus is lengthened caused by restricting the operation based only on the occurrence (detection) of the abnormal sound.
In the above embodiment, a configuration is made so that the image forming apparatus 1 stores the audio data, detects the abnormal sound, and determines whether the cleaning blade 65 is deteriorated based on the subsequent secular change of the detected abnormal sound after the detection, thereby determining whether to restrict the operation of the image forming apparatus 1 and performing control according to the determination.
However, at least one of storage of audio data, detection of an abnormal sound, judgment on deterioration of the cleaning blade 65 based on the subsequent secular change of the detected abnormal sound, and determination of the execution of operation restriction may be done with a management apparatus (server) different from the image forming apparatus 1.
FIG. 11 is a configuration diagram of an abnormality determination system including such an image forming apparatus 1 and a management apparatus 7. The image forming apparatus 1 and the management apparatus 7 are mutually connectable via a network 8. The number of the image forming apparatus 1 may he one. Alternatively a plurality of image forming apparatuses 1 may be connected, and the management apparatus 7 may configured to manage a plurality of image forming apparatuses 1.
FIG. 12 is a block diagram showing an electrical configuration of the management apparatus 7.
The management apparatus 7 is made of a personal computer and includes a CPU 710, a ROM 720, a RAM 730, a storage part 740, a display device 750, an input device 760, a network interface unit (network I/F unit) 770, and the like, which are connected to each other via a bus 780 as shown in FIG. 12.
The CPU 710 loads programs stored in the ROM 720, the storage part 740, or the like into the RAM 730 and executes the programs, thereby performing overall control of the entire management apparatus 7.
The ROM 720 is a storage medium that stores a program to be executed by the CPU 710 and other data.
The RAM 730 is a storage medium that provides a work area when the CPU 710 operates according to an operation program.
The storage part 740 is composed of a storage medium such as a hard disk, and stores various management data, applications, and the like.
The display device 750 is composed of a liquid crystal display device or the like, and displays various messages, an input reception screen and a selection screen for the user, and the like.
The input device 760 is used for an input operation by a user, and is composed of a keyboard, a mouse, and the like.
The network interface unit 770 functions as a communication unit that exchanges data with the image forming apparatus 1 and the like via the network 8.
In the abnormality determination system shown in FIG. 11, the management apparatus 7 receives the audio data of the cleaning blade 65 from the image forming apparatus 1 via the network interface unit 770 and stores the data in the storage part 740. In this case, information on the secular change such as data according to model number, usage history, and the usage situation of the image forming apparatus 1 may also be stored. Such information may be collected from the image forming apparatus 1 or may be data collected from other image forming apparatuses of the same model number, or the data may be data further corrected with data of another group of image forming apparatuses.
While acquiring audio data and information on secular change from the management apparatus 7 periodically or at a predetermined timing, the image forming apparatus 1 checks the presence or absence of abnormal sounds, and estimates the deterioration state of the cleaning blade 65 on the basis of the secular change when an abnormal sound is detected, whereby when the blade is not deteriorated, that is, when the abnormal sound is temporary due to noise or the like, the image forming operation is permitted, and when the blade is deteriorated, the operation restriction including prohibition of the image forming operation may be performed. In this case, since the image forming apparatus 1 does not need to store audio data, the storage capacity of the storage part 22 can be prevented from reducing.
Further, on the basis of the audio data acquired from the image forming apparatus 1, the management apparatus 7 may be configured to perform determination of the presence or absence of an abnormal sound, estimation of the deterioration state of the cleaning blade 65 based on the secular change of the abnormal sound, and determination as to whether to permit or restrict the image forming operation based on the estimation result, etc., and further to notify the image forming apparatus 1 about the determined operation restriction, whereby the image forming apparatus 1 executes the notified operation restriction. In this case, the configuration of the image forming apparatus 1 can be simplified because the image forming apparatus 1 only has to transmit the audio data to the management apparatus 7 and to receive the operation restriction notification from the management apparatus 7 for restricting the operation. In addition, abnormal sounds of a plurality of image funning apparatuses 1 can be managed by one management apparatus 7.
In this manner, even in the case where at least one of storage of audio data, detection of an abnormal sound, judgment on deterioration of the cleaning blade 65 based on the subsequent secular change of the detected abnormal sound, and determination of the execution of operation restriction is performed by the management apparatus 7 different from the image forming apparatus 1, whether the sound is such a sound that the operation of the image forming apparatus should be restricted is determined based on the subsequent secular change of the abnormal sound instead of restricting the operation based only on the occurrence (detection) of the abnormal sound, and when the abnormal sound is one that deserves the restriction is determined, the operation is restricted, Accordingly there is no fear that an abnormal sound due to an external noise is erroneously determined to he caused by a component deterioration, the degree of deterioration of a component that has generated an abnormal sound can be determined with high accuracy, and the problem can be solved that the running cost is increased and the downtime of the apparatus is lengthened by restricting the operation based only on occurrence (detection) of an abnormal sound.
In the above embodiments, though the case where the cleaning blade 65 cleans the photoreceptor drum 63 has been exemplified, the cleaning blade 65 may clean the intermediate transfer body 60.
According to an embodiment of the item (1), when an abnormal sound is detected in an apparatus to be judged such as an image forming apparatus, it is determined whether the sound is such an abnormal sound that the operation of the apparatus to he judged should be restricted, in accordance with the subsequent secular change of the abnormal sound, instead of restricting the operation based only on the detection of the abnormal sound, and when the sound is determined to be such an abnormal sound that the operation should be restricted, the operation of the apparatus to be judged is restricted. Accordingly, there is no fear that an abnormal sound due to an external noise is erroneously determined to be caused by a component deterioration, and the degree of deterioration of a component that has generated an abnormal sound can be determined with high accuracy, whereby a problem can be solved such as an increase in the running cost or downtime of the apparatus due to the operation restriction based only on the occurrence (detection) of an abnormal sound.
According to an embodiment of the item (2), when such an abnormal sound that the operation should be restricted based on the secular change after the detection is assumed to be the first sound, the operation is restricted due to the first sound so that the restriction level of the operation is changed according to the level change of the sound after the abnormal sound is detected, and furthermore the operation is prohibited when the second sound having the different sound quality from the first sound is detected, whereby the presence of deterioration of the component in which the abnormal sound is generated can be more accurately determined and the operation according to the degree of deterioration of the component can be performed.
According to an embodiment of the item (3), the timing of the operation restriction of the apparatus to be judged can be appropriately switched when the loudness of the sound gradually increases beyond a predetermined value after the detection of the abnormal sound.
According to an embodiment of the item (4), the timing of the operation restriction of the apparatus to be judged can be appropriately switched when the occurrence frequency of the sound gradually increases beyond a predetermined value.
According to an embodiment of the item (5), the timing of the operation restriction of the apparatus to he judged can be appropriately switched when the frequency of the sound gradually changes beyond a predetermined value.
According to an embodiment of the item (6), audio data of the apparatus to be judged is acquired by a microphone.
According to an embodiment of the item (7), the operation of the image forming apparatus is restricted when an abnormal sound of the cleaning blade of the image forming apparatus is detected and the cleaning blade is estimated to have deteriorated based on the subsequent secular change of the abnormal sound. Accordingly there is no possibility of erroneously determining the abnormal sound due to an external noise to be caused by the deterioration of the cleaning blade, as in the case where the operation restriction is performed based only on the occurrence (detection) oldie abnormal sound of the cleaning blade, and thus the degree of deterioration of the cleaning blade that has generated the abnormal sound can be accurately estimated, whereby the problem that the running cost is increased and the downtime of the image forming apparatus becomes longer, which is caused by restricting the operation based only on the detection of the abnormal sound, can be solved.
According to an embodiment of the item (8), the printing operation is restricted when the cleaning blade is estimated to be deteriorated based on the abnormal sound and subsequent secular change of the cleaning blade.
According to an embodiment of the item (9), even when abnormal sound of the cleaning blade is detected and it is estimate that the cleaning blade is deteriorated, the scanner operation unrelated to the cleaning blade has no restriction and is executable.
According to an embodiment of the item (10), the printing operation level is changed according to the deterioration state of the cleaning blade.
According to an embodiment of the item (11), when an abnormal sound is detected during the image forming operation, whether the operation is permitted as it is determined according to the number of unfinished sheets to be printed.
According to an embodiment of the item (12), since the audio data is continued to be acquired until at least a sound corresponding to the blade curling of the cleaning blade is detected after the detection of the abnormal sound, the cleaning blade can be used until the life span end of the cleaning blade is reached.
According to an embodiment of the item (13), the operation of the image forming apparatus is restricted when abnormal sound of the cleaning blade of the image forming apparatus is detected and the cleaning blade is estimated to be deteriorated based on the subsequent secular change of the abnormal sound. Accordingly there is no possibility of erroneously determining the abnormal sound due to an external noise to be caused by the deterioration of the cleaning blade, as in the case where the operation restriction is performed based only on the occurrence (detection) of the abnormal sound of the cleaning blade, and thus the degree of deterioration of the cleaning blade that has generated the abnormal sound can be accurately estimated, whereby the problem that the running cost is increased and the downtime of the image forming apparatus becomes longer, which is caused by restricting the operation based only on the detection of the abnormal sound, can be solved. In addition, since the audio data acquired by the image forming apparatus is stored in a storage of the management apparatus, there is no need to store the audio data on the image forming apparatus side, and reduction of the capacity of the storage of the image forming apparatus can be prevented.
According to an embodiment of the item (14), at the time when the abnormal sound of the cleaning blade of the image forming apparatus is detected by the management apparatus, execution of the operation restriction of the image forming apparatus is determined and the image forming apparatus is notified of the determination when an abnormal sound is detected and the cleaning blade is estimated to he deteriorated based on the subsequent secular change of the abnormal sound. Since the image forming apparatus restricts the operation of itself on the basis of the notification, the problem that the running cost is increased and the downtime of the image forming apparatus is lengthened by restricting the operation based only on the detection of the abnormal sound, can be solved. In addition, since detection of an abnormal sound, estimation of deterioration of the cleaning blade based on the subsequent secular change of the abnormal sound, and determination of execution of operation restriction of the image forming apparatus are performed by the management apparatus, the configuration of the image forming apparatus can be simplified accordingly.
According to an embodiment of the item (15), it is possible to cause a computer of an abnormality determination apparatus having an audio data acquisitor for acquiring audio data of an apparatus to be judged whether to have abnormality to execute processing of detecting an abnormal sound on the basis of the audio data acquired by the audio data acquisitor, processing of determining whether the abnormal sound is such a sound that the operation of the apparatus to be judged should be restricted based on a subsequent secular change of the abnormal sound when an abnormal sound is detected, and processing of restricting the operation of the apparatus to be judged when the abnormal sound is determined to be such a sound that the operation should be restricted.
Although embodiments of the present invention have been described and illustrated in detail, the disclosed embodiments are made for purposes of illustration and example only and not limitation. The scope of the present invention should be interpreted by terms of the appended claims.
1. An abnormality determination apparatus comprising:
an audio data acquisitor that acquires audio data of an apparatus to be judged for determining presence or absence of abnormality;
an abnormal sound detector that detects an abnormal sound based on the audio data acquired by the audio data acquisitor; and
a hardware processor that determines whether the abnormal sound is such a sound that an operation of the apparatus to be judged should be restricted based on a subsequent secular change of the abnormal sound when the abnormal sound is detected by the abnormal sound detector, and restricts the operation of the apparatus to be judged when the hardware processor determines that the abnormal sound is such a sound that the operation of the apparatus to be judged should be restricted.
2. The abnormality determination apparatus according to claim 1, wherein
when the abnormal sound detected by the abnormal sound detector and determined to be such a sound that the operation should be restricted based on the subsequent secular change is assumed to be a first sound, as an operation restriction of the apparatus to be judged by the hardware processor, the operation is restricted according to the first sound so that a restriction level of an operation mode is changed according to a subsequent level change of the first sound, and when a second sound having a different sound quality from the first sound is detected, the operation is prohibited.
the secular change of the abnormal sound is a change in which a loudness of the sound gradually increases beyond a predetermined value, and
the hardware processor switches timing of an operation restriction based on the subsequent secular change of the abnormal sound.
the secular change of the abnormal sound is a change in which an occurrence frequency of the sound gradually increases beyond a predetermined value, and
the secular change of the abnormal sound is a change in which a frequency of the sound gradually changes beyond a predetermined value, and
the audio data acquisitor is a microphone.
7. An image forming apparatus comprising:
a photoreceptor or an intermediate transfer body;
a cleaning blade that removes a residue on the photoreceptor or the intermediate transfer body;
an audio data acquisitor that acquires audio data of the cleaning blade;
an abnormal sound detector that detects an abnormal sound of the cleaning blade based on the audio data acquired by the audio data acquisitor; and
a hardware processor that estimates deterioration of the cleaning blade based on a subsequent secular change of the abnormal sound when the abnormal sound of the cleaning blade is detected by the abnormal sound detector, and restricts an operation of the image forming apparatus when the hardware processor estimates that the cleaning blade is deteriorated.
8. The image forming apparatus according to claim 7, wherein
the operation restricted by the hardware processor is a printing operation.
the hardware processor does not restrict the operation with respect to a scanner operation.
10. The image forming apparatus according to claim 8, wherein
the hardware processor changes a level of the printing operation according to a state of the deterioration of the cleaning blade.
when the abnormal sound is detected by the detector during an image forming operation, the hardware processor determines whether to permit the operation as it is according to a number of unfinished sheets on which no image is formed.
the abnormal sound detector acquires the audio data after detecting the abnormal sound at least until a sound corresponding to a blade curling of the cleaning blade is detected.
13. An abnormality determination system for an image forming apparatus comprising:
an image forming apparatus; and a management apparatus, wherein
the image forming apparatus comprises: a photoreceptor or an intermediate transfer body; a cleaning blade that removes a residue on the photoreceptor or the intermediate transfer body; an audio data acquisitor that acquires audio data of the cleaning blade; a transmitter that transmits the audio data acquired by the audio data acquisitor to the management apparatus; a receptor that receives the audio data from the management apparatus; an abnormal sound detector that detects an abnormal sound of the cleaning blade based on the audio data received by the receptor; and a hardware processor that estimates deterioration of the cleaning blade based on a subsequent secular change of the abnormal sound when the abnormal sound of the cleaning blade is detected by the abnormal sound detector, and restricts an operation of the image forming apparatus when the cleaning blade is estimated to be deteriorated by the hardware processor, and
the management apparatus comprises: a receptor that receives the audio data transmitted from the image forming apparatus; a storage that stores the received audio data; and a transmitter that transmits the audio data stored in the storage to the image forming apparatus.
the image forming apparatus comprises: a photoreceptor or an intermediate transfer body; a cleaning blade that removes a residue on the photoreceptor or the intermediate transfer body; an audio data acquisitor that acquires audio data of the cleaning blade; and a transmitter that transmits the audio data acquired by the audio data acquisitor to the management apparatus,
the management apparatus comprises: a receptor that receives the audio data transmitted from the image forming apparatus; a storage that stores the received audio data; an abnormal sound detector that detects an abnormal sound of the cleaning blade based on the audio data stored in the storage; a hardware processor that estimates deterioration of the cleaning blade based on a subsequent secular change of the abnormal sound when the abnormal sound of the cleaning blade is detected by the abnormal sound detector, and determines execution of an operation restriction of the image funning apparatus when the hardware processor estimates that the cleaning blade is deteriorated; and a notifier that notifies the image forming apparatus of the determined operation restriction of the image forming apparatus, and
the hardware processor of the image forming apparatus restricts an operation of the image forming apparatus based on a notification of the operation restriction of the image forming apparatus by the notifier.
15. A non-transitory recording medium storing a computer readable program causing a computer of an abnormality determination apparatus having an audio data acquisitor that acquires audio data of an apparatus to he judged for determining presence or absence of abnormality to perform:
detecting an abnormal sound based on the audio data acquired by the audio data acquisitor;
determining whether the abnormal sound is such a sound that an operation of the apparatus to be judged should be restricted based on a subsequent secular change of the abnormal sound when the abnormal sound is detected in the detecting; and.
performing control to restrict the operation of the apparatus to be judged when the abnormal sound is determined to be such a sound that the operation of the apparatus to be judged should be restricted in the determining.
Filed: Dec 7, 2018
Applicant: KONICA MINOLTA, INC. (Chiyoda-ku, Tokyo)
Inventors: Hirotada SEKI (Toyokawa-shi), Hiroshi EGUCHI (Toyohashi-shi), Natsuyo IDA (Toyokawa-shi,), Junichi MASUDA (Toyokawa-shi), Masahiro NONOYAMA (Toyokawa-shi), Akimasa ISHIKAWA (Toyokawa-shi)
International Classification: G03G 15/00 (20060101); H04R 1/08 (20060101);


text:
import math
import operator
import os
import sqlite3
import subprocess
import sys
from datetime import datetime

from cmd import Cmd

import query_parser
import para_reader
import para_wn
import para_analysis

class ParaQueryApp(Cmd):

    # set some basic class-wide variables
    _BASICSQLCMD = 'select source, target, pe2e1, relation, pivotnum, pivots, distance from paraphrase'
    # the counting SQL command needs to have a variable since we also want to show the value of the grouping by variable
    # the {} variable is instantiated later appropriately depending on the value of the group_by setting
    _COUNTSQLCMD = 'select "{}", count(*) as cnt from paraphrase'
    _FLIPPED_OPS = dict([('<', '>'), ('>', '<')])
    _POS_IDX_TO_VALUES = {1: 'same', 0: 'different', -1: 'unknown'}
    _ORDER_VALUES = {'highest first': 'pe2e1 asc', 'lowest first': 'pe2e1 desc'}

    #either 'basic' or 'count' depending on the query
    _mode = 'basic'

    # change the prompt to something more useful
    prompt = 'query> '

    # by default, we assume interactive and verbose mode
    _interactive = True

    # set up the database and cursor before entering the command loop unless
    # it was already set up by using a command line argument. Also set up
    # the default values for the internal variables in either case.
    def preloop(self):
        if not hasattr(self, '_dbfile'):
            if os.path.exists(os.path.join(os.getcwd(), '.paradb')):
                self.do_attach(os.getcwd())
            else:
                self._num_records = 0
                sys.stderr.write('\n No database found in current directory. \n Use "index <filename>" to generate a new database.\n Use "attach <path>" to attach a database.\n\n')

        # set up the internal variables
        # Applied to 'basic' queries, not to 'count' queries
        self._limit = 10
        self._identical = False
        self._order = 'highest first'
        self._debug = False
        # Field for 'group by', applied only for 'count' queries. Set to '' to avoid grouping
        self._group_by = ''
        self._explain = False
        self._same_pos = False
        self._unique_tgt = False

        # read in the query grammar
        self._query_parser = query_parser.Parser()

    def emptyline(self):
        sys.stdout.write('\n')
        sys.stdout.flush()

    # simple exit/quit methods
    def do_quit(self, arg):
        return True

    do_q = do_exit = do_EOF = do_quit

    # method to run shell commands
    def do_shell(self, arg):
        sub_cmd = subprocess.Popen(arg, shell=True, stdout=subprocess.PIPE)
        output = sub_cmd.communicate()[0]
        sys.stdout.write(output + '\n')
        sys.stdout.flush()

    # Method to regenerate the database and indices. The fields in the database are:
    #    source (text), target (text), identity (integer), srclen (integer), tgtlen (integer), lendiff [=tgtlen-srclen] (integer), pe2e1 (float),
    #    number of pivots (integers), pivots (list), wordnet relation (integer) if available, wordnet distance (integer), same pos (binary),
    #    duplicate (binary)
    # Each field should be separately indexed.
    def do_index(self, parafile):
        """
        Index a given paraphrase rule file for querying.
        """

        # create a database file
        conn = sqlite3.connect('.paradb')
        c = conn.cursor()

        sys.stderr.write(str(datetime.now()))
        # create the table
        sys.stderr.write('\n Creating table ... ')
        c.execute('''create table paraphrase (source text, target text, identity integer, srclen integer, tgtlen integer, lendiff integer, pe2e1 real, pivotnum integer, pivots text, relation integer, distance integer, samepos integer, tgtdupl integer)''')
        sys.stderr.write('done.\n')

        # populate the table
        sys.stderr.write(' Adding records to table ... ')
        reader = para_reader.ParaReader(parafile)
        src = ""
        for fieldtuple in reader:
            #Input file must be sorted by the source side. When reached a new source, clean the target_lemmas list used to detect duplicate targets (with the same lemma)
            if src != fieldtuple[0]:
                src = fieldtuple[0]
                target_lemmas = set([])
            tgt = fieldtuple[1]
            duplicate_target_lemma = 1
            for tgt_lemma in para_wn.get_lemmas(tgt):
                #consider the tgt as non-duplicate if at least one of its lemmas was not seen with the current source side before
                if tgt_lemma not in target_lemmas:
                    duplicate_target_lemma = 0
                target_lemmas.add(tgt_lemma)
            relation = para_wn.get_wordnet_relation(src, tgt)[1]
            distance = para_wn.get_shortest_path(src, tgt)
            # 1 -same, 0 - no, -1 - don't know
            samepos = para_wn.is_same_pos(src, tgt)
            fieldtuple += (relation, distance, samepos, duplicate_target_lemma)
            c.execute('insert into paraphrase values (?,?,?,?,?,?,?,?,?,?,?,?,?)', fieldtuple)
            self._num_records += 1
        sys.stderr.write('done. Added %d records.\n' % self._num_records)

        sys.stderr.write(str(datetime.now()))

        # create the indices
        sys.stderr.write(' Creating indices ... ')
        n = 13
        c.execute('''create index srcidx on paraphrase(source)''')
        sys.stderr.write(' 1 out of ' + str(n))
        c.execute('''create index tgtidx on paraphrase(target)''')
        sys.stderr.write(' 2 out of ' + str(n))
        c.execute('''create index identidx on paraphrase(identity)''')
        sys.stderr.write(' 3 out of ' + str(n))
        c.execute('''create index srclenidx on paraphrase(srclen)''')
        sys.stderr.write(' 4 out of ' + str(n))
        c.execute('''create index tgtlenidx on paraphrase(tgtlen)''')
        sys.stderr.write(' 5 out of ' + str(n))
        c.execute('''create index lendiffidx on paraphrase(lendiff)''')
        sys.stderr.write(' 6 out of ' + str(n))
        c.execute('''create index probidx on paraphrase(pe2e1)''')
        sys.stderr.write(' 7 out of ' + str(n))
        c.execute('''create index relidx on paraphrase(relation)''')
        sys.stderr.write(' 8 out of ' + str(n))
        c.execute('''create index pivotnumidx on paraphrase(pivotnum)''')
        sys.stderr.write(' 9 out of ' + str(n))
        c.execute('''create index pivotidx on paraphrase(pivots)''')
        sys.stderr.write(' 10 out of ' + str(n))
        c.execute('''create index distidx on paraphrase(distance)''')
        sys.stderr.write(' 11 out of ' + str(n))
        c.execute('''create index sameposidx on paraphrase(samepos)''')
        sys.stderr.write(' 12 out of ' + str(n))
        c.execute('''create index tgtduplidx on paraphrase(tgtdupl)''')
        sys.stderr.write(' 13 out of ' + str(n))
        sys.stderr.write('Done.\n')
        sys.stderr.write(str(datetime.now()))

        # analyze the indices
        sys.stderr.write(' Analyzing indices ... ')
        c.execute('''analyze''')
        sys.stderr.write('done.\n\n')

        # commit the changes and return cursor
        conn.commit()
        self._cursor = c
        self._dbfile = os.path.join(os.getcwd(), '.paradb')

    def do_attach(self, dbpath):
        """
        Attach database at given path.
        """
        dbfile = os.path.join(dbpath, '.paradb')
        if os.path.exists(dbfile):
            sys.stderr.write('\n Attaching paraphrase database.\n Use "index <filename>" to generate a new database.\n Use "attach <path>" to attach a different database.\n\n')
            self._dbfile = dbfile
            conn = sqlite3.connect(os.path.join(dbfile))
            c = conn.cursor()
            self._num_records, = c.execute('''select max(rowid) from paraphrase''').fetchone()
            self._cursor = c
        else:
            sys.stderr.write('\n Error: the path {} does not contain a paraphrase database.\n\n'.format(dbpath))

    # set the value for the unique_tgt variable
    def _set_unique_tgt_value(self, value):
        if value.lower() in ['off', 'false']:
            self._unique_tgt = False
        elif value.lower() in ['on', 'true']:
            self._unique_tgt = True
        else:
            sys.stderr.write('\n Error: incorrect value for setting.\n\n')

    # set the value for the same_pos variable
    def _set_same_pos_value(self, value):
        if value.lower() in ['off', 'false']:
            self._same_pos = False
        elif value.lower() in ['on', 'true']:
            self._same_pos = True
        else:
            sys.stderr.write('\n Error: incorrect value for setting.\n\n')

    # set the value for the identical variable
    def _set_identical_value(self, value):
        if value.lower() in ['off', 'false']:
            self._identical = False
        elif value.lower() in ['on', 'true']:
            self._identical = True
        else:
            sys.stderr.write('\n Error: incorrect value for setting.\n\n')

    # set the value for the debug variable
    def _set_explain_value(self, value):
        if value.lower() in ['off', 'false']:
            self._explain = False
        elif value.lower() in ['on', 'true']:
            self._explain = True
        else:
            sys.stderr.write('\n Error: incorrect value for setting.\n\n')

    # set the value for the debug variable
    def _set_debug_value(self, value):
        if value.lower() in ['off', 'false']:
            self._debug = False
        elif value.lower() in ['on', 'true']:
            self._debug = True
        else:
            sys.stderr.write('\n Error: incorrect value for setting.\n\n')

    # set the value for the order variable
    def _set_order_value(self, value):
        if value.lower() in ['random', 'rand']:
            self._order = 'random()'
        elif value.lower() in ['prob', 'pe2e1', 'probability', 'highprobfirst', 'desc', 'down', 'decreasing']:
            self._order = 'highest first'
        elif value.lower() in ['lowprobfirst', 'asc', 'up', 'increasing']:
            self._order = 'lowest first'
        else:
            sys.stderr.write('\n Error: incorrect value for setting.\n\n')

    # set the value for the limit variable
    def _set_limit_value(self, value):
        if value in ['off', 'none']:
            value = -1
        try:
            value = int(value)
            assert value != 0
        except:
            sys.stderr.write('\n Error: incorrect value for setting.\n\n')
        else:
            self._limit = value

    # set the value for the group_by variable
    def _set_group_by_value(self, value):
        if value.lower() in ['none', 'off']:
            self._group_by = ''
        elif value.lower() in ['source', 'target', 'identity', 'srclen', 'tgtlen', 'lendiff', 'relation', 'pivotnum', 'distance', 'samepos', 'tgtdupl']:
            self._group_by = value.lower()
        else:
            sys.stderr.write("\n Error: incorrect value for setting.\n\n")

    # print out the current variable settings
    def _show_settings(self):
        out = ['\n Current settings:']
        out.append('  limit: {}'.format(self._limit))
        out.append('  order: {}'.format(self._order))
        out.append('  identical: {}'.format(self._identical))
        out.append('  same_pos: {}'.format(self._same_pos))
        out.append('  unique_tgt: {}'.format(self._unique_tgt))
        out.append('  group_by: {}'.format(self._group_by))
        out.append('  debug: {}'.format(self._debug))
        out.append('\n')
        sys.stdout.write('\n'.join(out))
        sys.stdout.flush()

    # generate the sql for 'show non-identical', 'show same'
    def _generate_ident_sql(self, results):
        identval = '1' if results.ident in ['same', 'identical'] else '0'
        conditional_part = 'where identity = {}'.format(identval)
        order_part = 'order by random()'
        if self._mode == 'basic':
            # Lili Kotlerman: to remove limit, set limit off
            limit_part = 'limit {}'.format(self._limit) if self._limit > 0 else ''
            finalsql = ' '.join([ParaQueryApp._BASICSQLCMD, conditional_part, order_part, limit_part])
        else:
            #'count'
            # Lili Kotlerman: to remove grouping, set group_by = ''
            group_part = 'group by "{}"'.format(self._group_by)
            finalsql = ' '.join([ParaQueryApp._COUNTSQLCMD.format(self._group_by), conditional_part, group_part, 'order by cnt asc'])
        return finalsql

    # generate the sql for 'show most probable', 'show least probable etc.'
    def _generate_unary_prob_sql(self, results):
        direction = 'desc' if results.adj == 'least' else 'asc'
        conditional_part = 'where identity = {}'.format(int(self._identical)) if not self._identical else ''
        if self._same_pos:
            if conditional_part == '':
                conditional_part = 'where samepos = 1'
            else:
                conditional_part += 'and samepos = 1'
        if self._unique_tgt:
            if conditional_part == '':
                conditional_part = 'where tgtdupl = 0'
            else:
                conditional_part += 'and tgtdupl = 0'
        order_part = 'order by pe2e1 {}'.format(direction)
        if self._mode == 'basic':
            # Lili Kotlerman: to remove limit, set limit < 0
            limit_part = 'limit {}'.format(self._limit) if self._limit > 0 else ''
            finalsql = ' '.join([ParaQueryApp._BASICSQLCMD, conditional_part, order_part, limit_part])
        else:
            #'count'
            # Lili Kotlerman: to remove grouping, set group_by = ''
            group_part = 'group by "{}"'.format(self._group_by)
            finalsql = ' '.join([ParaQueryApp._COUNTSQLCMD.format(self._group_by), conditional_part, group_part, 'order by cnt asc'])
        return finalsql

    def _generate_conditional_sql(self, results):
        conditional_part = []
        order_part = ''
        identity_clause = False

        for cond in results.condition:
            if bool(cond.probval):
                probval = str(round(-math.log(float(cond.probval)), 4))
                op = ParaQueryApp._FLIPPED_OPS[cond.op]
                conditional_part.append(' '.join(['pe2e1', op, probval]))
            elif bool(cond.rhs):
                if cond.op in ['<', '>']:
                    op = ParaQueryApp._FLIPPED_OPS[cond.op] if cond.lhs == 'source' else cond.op
                    if bool(cond.lenclause):
                        lendiff = '-' + cond.lenclause.lendiff if cond.lhs == 'source' and cond.op == '>' else cond.lenclause.lendiff
                        conditional_part.append(' '.join(['lendiff = ', lendiff]))
                    else:
                        conditional_part.append(' '.join(['lendiff', op, '0']))
                else:
                    identval = '1' if cond.op == '=' else '0'
                    conditional_part.append('identity = ' + identval)
                    identity_clause = True
            elif bool(cond.lenclause):
                fieldname = 'srclen' if cond.lhs == 'source' else 'tgtlen'
                conditional_part.append(' '.join([fieldname, cond.op, cond.lenclause.len]))
            elif bool(cond.phrase):
                # we want string literals to always be in single quotes in case
                # the literal is one of the field names in the database
                single_quoted_phrase = cond.phrase.replace('"', "'")
                op = 'GLOB' if single_quoted_phrase.find('*') > 0 else '='
                # phrase = '*' + cond.phrase + '*' if cond.op == 'contains' else cond.phrase
                conditional_part.append(' '.join([cond.lhs, op, single_quoted_phrase]))
            elif bool(cond.relname):
                #Lili Kotlerman: added (WN) relation condition
                relname = cond.relname
                if relname in map(str, range(11)):
                    conditional_part.append(' '.join(['relation', cond.op, relname.replace("'", '')]))
                else:
                    relid = para_wn.get_relation_id(relname.replace('"', '').replace("'", ''))
                    if relid >= 0:
                        conditional_part.append(' '.join(['relation', cond.op, str(relid)]))
            elif bool(cond.pivotnum):
                #Lili Kotlerman: added condition for number of pivots
                pivotnum = cond.pivotnum
                if cond.op == 'include':
                    # In this case pivotnum should hold one pivot's text. Pivots field contains ["pivot:score", "pivot:score",...]
                    conditional_part.append(' '.join(['pivots LIKE', "'%" + '"' + pivotnum.replace('"', '').replace("'", '') + ":%'"]) + " OR" + ' pivots =="' + pivotnum.replace('"', '').replace("'", '') + '"')
                else:
                    conditional_part.append(' '.join(['pivotnum', cond.op, pivotnum]))
            elif bool(cond.wndist):
                #Lili Kotlerman: added condition for WordNet distance
                wndist = cond.wndist
                conditional_part.append(' '.join(['distance', cond.op, wndist]))

        # AND all the conditions for the conditional part
        if not identity_clause and not self._identical:
            conditional_part.append('identity = {}'.format(int(self._identical)))
        if self._same_pos:
            conditional_part.append('samepos = {}'.format(int(self._same_pos)))
        if self._unique_tgt:
            conditional_part.append('tgtdupl = 0')
        conditional_part = 'where ' + ' and '.join(conditional_part)

        # generate the order part
        order_part = 'order by {}'.format(self._ORDER_VALUES[self._order])

        if self._mode == 'basic':
            # Lili Kotlerman: to remove limit, set limit < 0
            limit_part = 'limit {}'.format(self._limit) if self._limit > 0 else ''
            finalsql = ' '.join([ParaQueryApp._BASICSQLCMD, conditional_part, order_part, limit_part])
        else:
            #'count'
            # Lili Kotlerman: to remove grouping, set group_by=''
            group_part = 'group by "{}"'.format(self._group_by)
            finalsql = ' '.join([ParaQueryApp._COUNTSQLCMD.format(self._group_by), conditional_part, group_part, 'order by cnt asc'])
        return finalsql

    # method to take a pyparsing ParseResults object and convert
    # into an appropriate sql query.
    def _generate_sql_from_query(self, query_results):
        # set _mode = 'basic' or 'count' but only for the show command. Nothing else.
        self._mode = 'count' if query_results.count else 'basic'
        if bool(query_results.prob):
            return self._generate_unary_prob_sql(query_results)
        elif bool(query_results.ident):
            return self._generate_ident_sql(query_results)
        elif bool(query_results.condition):
            return self._generate_conditional_sql(query_results)

    # how to display the output of the query
    def _display(self):
        if self._mode == 'basic':
            rows = self._cursor.fetchall()
            if not rows:
                return ''
            newrows = []
            for row in rows:
                src, tgt, pe2e1, rel, pivnum, piv, dist = row
                pe2e1 = math.exp(-float(pe2e1))
                pe2e1str = '{:>6.4}'.format(pe2e1) if pe2e1 < 0.0001 else '{:0<6.4f}'.format(pe2e1)
                rel_or_path = para_wn.get_relation_name(rel)
                if rel_or_path == 'undefined relation':
                    rel_or_path = 'WN distance=' + str(dist) if dist >= 0 else 'not connected in WN'
                newrows.append([src.encode('utf-8'), tgt.encode('utf-8'), pe2e1str, rel_or_path, pivnum, piv.encode('utf-8'), dist])
            srclens = map(len, map(operator.itemgetter(0), newrows))
            trglens = map(len, map(operator.itemgetter(1), newrows))
            probstrlens = map(len, map(operator.itemgetter(2), newrows))
            relationlens = map(len, map(operator.itemgetter(3), newrows))
            maxsrclen, maxtrglen, maxproblen, maxrellen = max(srclens), max(trglens), max(probstrlens), max(relationlens)
            return self._format_display(newrows, self._interactive, maxsrclen, maxtrglen, maxproblen, maxrellen)
        # display the count results
        else:
            rows = self._cursor.fetchall()
            if not rows:
                return ''
            res = ['']
            rows = sorted(rows)
            if self._group_by == 'relation':
                rows = [(para_wn.get_relation_name(group), count) for (group, count) in rows]
            elif self._group_by == 'samepos':
                rows = [(self._POS_IDX_TO_VALUES[group], count) for (group, count) in rows]
            else:
                rows = [(str(group), count) for (group, count) in rows]
            grouplens = map(len, map(operator.itemgetter(0), rows))
            maxgrouplen = max(grouplens)
            for group, count in rows:
                if group == '':
                    res.append(str(count))
                else:
                    res.append('{}\t{}'.format(group.rjust(maxgrouplen), count))
            res.append('')
            return '\n'.join(res)

    # helper formatting method for _display
    def _format_display(self, rows, interactive_mode, maxsrclen, maxtrglen, maxproblen, maxrellen):
        # if the results are to be shown interactively ...
        if interactive_mode:
            out = ['']
            too_wide = maxsrclen > 25 and maxtrglen > 25
            for row in rows:
                src, trg, pe2e1str, relstr, pivnum, piv, dist = row

                pivot_display = ""
                if self._explain:
                    pivots = piv.strip().replace('["', '').replace('"]', '').replace('\n', '').split('", "')
                    cnt = 1
                    for pivot in pivots:
                        pivot_display += "\n    " + str(cnt) + ".  " + pivot.replace(':', ' : ')
                        cnt += 1

                if too_wide:
                    out.append('\n  {} =>\n  {}\n  [{}]  {}  {}'.format(src, trg, pe2e1str.rjust(maxproblen), relstr.ljust(maxrellen), pivot_display))
                else:
                    if self._explain:
                        # if we are displaying pivots then we don't need to make the prob and relation fields look perfectly aligned
                        pivot_display += '\n'
                        out.append('  {} => {} [{}] {} {}'.format(src.rjust(maxsrclen), trg.ljust(maxtrglen), pe2e1str, relstr, pivot_display))
                    else:
                        out.append('  {} => {} [{}] {} {}'.format(src.rjust(maxsrclen), trg.ljust(maxtrglen), pe2e1str.rjust(maxproblen), relstr.ljust(maxrellen), pivot_display))
            out.append('')
        # otherwise generate simple tab-separated output for the script
        else:
            out = []
            for row in rows:
                src, trg, pe2e1str, relstr, pivnum, piv, dist = row
                if self._explain:
                    out.append('{}\t{}\t{}\t{}\t{}'.format(src, trg, pe2e1str, relstr, piv.strip()))
                else:
                    out.append('{}\t{}\t{}\t{}'.format(src, trg, pe2e1str, relstr))
        return '\n'.join(out)

    # method that runs the "show <query>"" command
    def do_show(self, query):
        """
        Run queries on attached paraphrase database. Examples:

        # show all paraphrases of the word "barrier"
        show source = "barrier"

        # show all paraphrases of the word "barrier" and include the identity paraphrase
        set identical on
        show source = "barrier"

        # show all phrases for which "barrier" is a paraphrase
        show target = "barrier"

        # show all paraphrases containing the word \"barrier\" and
        # where the paraphrase is of length 2 words (turn off identity paraphrases)
        set identical off
        show source = "barrier*" and target is 2 words

        # show paraphrases with highest probability
        show most probable

        # show a random set of paraphrases
        show different

        # show a random sample of paraphrases for the word "man" with
        # probability > 0.005 but a random sample instead of being sorted
        # by probability (as is the default)
        set order random
        show source = "man" and prob > 0.005

        # Perform select count(*) by adding "count" in the beginning of the query
        # e.g. show count source="man" and prob > 0.005
        # Pay attention: the returned value is not limited by the "limit" parameter
        """
        # make sure a database is attached
        if not hasattr(self, '_dbfile'):
            sys.stderr.write('\n No database attached.\n Use "index <filename>" to generate a new database.\n Use "attach <path>" to attach a database.\n\n')
            return False

        try:
            results = self._query_parser.parse(query)
        except:
            sys.stderr.write('\n Error: cannot parse query.\n\n')
        else:
            sql_query = self._generate_sql_from_query(results)
            if self._debug:
                sys.stderr.write('\nQuery: ' + sql_query + ';\n')
            self._cursor.execute(sql_query)
            sys.stdout.write(self._display() + '\n')
            sys.stdout.flush()

    # method that runs the "explain <query>"" command
    def do_explain(self, query):
        """
        Same as 'show()' but further explains the results of
        the given query by showing the pivots used to generate them.
        """

        # make sure a database is attached
        if not hasattr(self, '_dbfile'):
            sys.stderr.write('\n No database attached.\n Use "index <filename>" to generate a new database.\n Use "attach <path>" to attach a database.\n\n')
            return False

        # cannot use 'count' queries with 'explain'
        if query.count('count') > 0:
            sys.stderr.write('\n Error: cannot use "count" modifier for explain queries.\n\n')
            return False

        self._set_explain_value('on')
        try:
            results = self._query_parser.parse(query)
        except:
            sys.stderr.write('\n Error: cannot parse query.\n\n')
        else:
            sql_query = self._generate_sql_from_query(results)
            if self._debug:
                sys.stderr.write('\nQuery: ' + sql_query + ';\n')
            self._cursor.execute(sql_query)
            sys.stdout.write(self._display() + '\n')
            sys.stdout.flush()
        self._set_explain_value('off')

    # Lili Kotlerman: added method returning query output
    # method that returns the "<query>" command results
    # as a list rather than printing them out
    def _get_results(self, query):
        """
        Run queries on attached paraphrase database and get their output in return.
        Examples the same as for do_show(), with "get" instead of "show"
        """
        res = []
        try:
            results = self._query_parser.parse(query)
        except:
            raise Exception
        else:
            sql_query = self._generate_sql_from_query(results)
            if self._debug:
                sys.stderr.write('\nQuery: ' + sql_query + ';\n')
            self._cursor.execute(sql_query)
            res = self._cursor.fetchall()
        return res

    # method to set some internal variables for the query shell
    def do_set(self, arg):
        """
        Set internal variables. Run \"set\" to see current settings.
        """
        # show settings if no argument
        if not arg:
            self._show_settings()
            return False
        else:
            args = arg.split('=') if '=' in arg else arg.split()

        # make sure there are the correct number of arguments
        if len(args) != 2:
            sys.stderr.write('Error: incorrect set statement.\n')
        else:
            args = [x.strip() for x in args]

        # make sure that only the appropriate settings are being set
        if args[0] in ['identical', 'order', 'limit', 'debug', 'group_by', 'explain', 'same_pos', 'unique_tgt']:
            exec('self._set_{}_value("{}")'.format(args[0], args[1]))
        else:
            sys.stderr.write('\n Error: incorrect setting name. Use "set" to see current settings.\n\n')

    # method to display information about the paraphrase database
    def do_info(self, arg):
        """
        Show information on current database.
        """
        if hasattr(self, '_dbfile'):
            sys.stdout.write('\n Database {} with {} paraphrase rules.\n\n'.format(self._dbfile, self._num_records))
            sys.stdout.flush()
        else:
            sys.stderr.write('\n No database attached.\n Use "index <filename>" to generate a new database.\n Use "attach <path>" to attach a database.\n\n')
            return False

    def _get_rules(self, arg, query):
        # get the currently set limit value since we may have to override it
        old_limit = self._limit

        rules = []
        if arg.count('top') > 0:
            # expected command is "analyze top N", where N is an int
            top_n_rules = int(arg.split()[1])
            self._set_limit_value(top_n_rules)
            get_arg = query
        elif arg.count('all') > 0:
            # expected command is "analyze all"
            self._set_limit_value(-1)
            get_arg = query
        else:
            # note that here the results are subject to the global limit
            # if the source is not specified then assume it's everything
            get_arg = arg if query == 'source = "*"' else " and ".join([query, arg])

        try:
            rules = self._get_results(get_arg)
        except:
            sys.stderr.write('\n Error: cannot parse query.\n')

        # restore previously set limit value
        self._set_limit_value(old_limit)

        return rules

    # Lili Kotlerman: added method to analyze the database
    def do_analyze(self, arg):
        """
        Analyze the attached paraphrase database / query results and output the results to "analysis.txt" in the current directory
        """
        # make sure we have a database attached
        if not hasattr(self, '_dbfile'):
            sys.stderr.write('\n No database attached.\n Use "index <filename>" to generate a new database.\n Use "attach <path>" to attach a database.\n\n')
            return False

        # analyze commands can only be run in interactive mode
        if not self._interactive:
            sys.stderr.write('\n Error: analyze commands cannot be run from scripts.\n\n')
            return False

        # no counting allowed
        if arg.count('count') > 0:
            sys.stderr.write('\n Error: cannot use "count" modifier for analyze queries.\n\n')
            return False

        if arg.count('using') > 0:
            # no source conditions allowed unless 'using' is not specified
            if arg.count('source') > 0:
                sys.stderr.write('\n Error: cannot specify source condition for analyze queries with external source.\n\n')
                return False
            rules = []
            user_srcs = []
            if arg.count('text') > 0:
                user_srcs = para_analysis.extract_frequent_terms(arg.split('text ')[1], 100)
                user_srcs.sort()
                sys.stdout.write('\nThe {} most frequent terms in the given text are:\n {}\n'.format(len(user_srcs), ', '.join(user_srcs)))
            elif arg.count('terms') > 0:
                user_srcs = para_analysis.extract_terms(arg.split('terms ')[1])
                sys.stdout.write('\n Found {} terms.\n'.format(str(len(user_srcs))))
            else:
                sys.stderr.write('\n Error: cannot parse query.\n\n')
                return False

            sys.stdout.write('\n Retrieving rules from the database ... ')
            sys.stdout.flush()
            for user_src in user_srcs:
                query = 'source = "' + user_src.lower() + '"'
                rules += self._get_rules(arg, query)
        else:
            user_srcs = []
            query = 'source = "*"'
            sys.stdout.flush()
            rules = self._get_rules(arg, query)
            sys.stdout.write('\n Retrieving rules from the database ... ')

        db_size = len(rules)
        if self._limit > 0 and arg.count('using') == 0:
            sys.stdout.write("found {} paraphrase rules (limit = {}).\n".format(db_size, self._limit))
        else:
            sys.stdout.write("found {} paraphrase rules.\n".format(db_size))
        if db_size > 0:
            sys.stdout.write("\n Analyzing...")
            # sort to group rules for each source together, one by one
            rules.sort()
            out_text = ['\n\n\n===================================================== ANALYSIS =================================================================\n']
            out_text.append('Command: {}\n'.format('analyze ' + arg))
            out_text.append(self._dbfile + '\n')
            out_text.append(str(datetime.now()) + '\n\n')
            # write out a warning for non "using" queries if the limit was set
            if self._limit > 0 and arg.count('using') == 0:
                out_text.append('WARNING: this analysis was conducted with limit set to {}, i.e., only the top {} rules for each source string were analyzed. To analyze all rules, please use "set limit none" before running the analysis command.\n\n'.format(self._limit, self._limit))
            if user_srcs:
                out_text.append('Terms analyzed: {}\n'.format(user_srcs))
            # top rules have scores > percentiles[3] percentile, bottom rules have scores < percentiles[0] percentile,
            # middle rules are between percentiles[1] and percentiles[2] percentile
            percentiles = [15, 40, 60, 85]
            out_text.append("Analyzing: " + str(db_size) + " paraphrase rules.\n")
            score_distribution = para_analysis.get_score_distribution(rules)
            out_text.append(para_analysis.scores_and_percentiles_display(score_distribution, para_analysis.intervals, db_size, (0, 1)))
            percentile_scores = para_analysis.get_percentile_scores(percentiles, score_distribution)
            data = para_analysis.analyze_rules(rules, percentile_scores)

            # Add analysis of the whole collection
            analysis_to_print = para_analysis.whole_analysis_display(db_size, data)
            out_text.append(analysis_to_print)
            sys.stdout.write(analysis_to_print + '\n\n')
            sys.stdout.flush()

            if db_size > 1000:
                for part in para_analysis.parts:
                    out_text.append(para_analysis.part_analysis_display(part, data, percentile_scores, percentiles))

            f = open('analysis.txt', 'a')
            f.write(''.join(out_text))
            f.flush()
            f.close()

if __name__ == '__main__':

    # check if there are any input arguments
    args = sys.argv[1:]

    if len(args) > 0:

        # if there is a directory argument provided, assume that it is a folder containing
        # a paraphrase database and send it to do_attach
        if os.path.isdir(args[0]):
            # instantiate the interactive version of the app
            interactive_app = ParaQueryApp()
            interactive_app.do_attach(args[0])
            interactive_app.cmdloop()

        # if the input argument is a file, treat it as a script
        elif os.path.isfile(args[0]):
            with open(args[0], 'rt') as input:
                noninteractive_app = ParaQueryApp(stdin=input)
                noninteractive_app.use_rawinput = False
                noninteractive_app.prompt = ''
                noninteractive_app._interactive = False
                noninteractive_app.cmdloop()

    # if no arguments at all, then simply drop into the loop
    else:
        # instantiate the interactive version of the app
        interactive_app = ParaQueryApp()
        interactive_app.cmdloop()

redpajama_set_name: RedPajamaGithub


FEEDBACK RECORDINGS' second compilation ,« PSYTRANCE WIZARD IS BACK » is compiled by DJ TSUYOSHI and will be out in October 2005 !!!!!!! DJ TSUYOSHI is back. Two whole anticipated years since his last mix CD release, Psytrance legend DJ Tsuyoshi comes down with another prize collection. Featuring a stellar lineup, the compilation mix includes Exaile from Chemical Crew (Skazi, et al), newcomer Black & White from Israel's top label Hommega and promising and widely popular Eskimo. DJ Tsuyoshi kicks off the anthology with his very own rare production; this is sure to be one of the biggest trance anthems of the year. Make sure to grab it off the horizon.


Costa Rica is bursting with natural charm and beauty. Although it makes up just 0.03% of the world's surface area, it accounts for over 6% of its biodviersity. Visiting Costa Rica means not having to choose between a relaxing beach vacation and an adventurous, action-packed holiday - you get the best of both all in one! The beaches are warm, inviting and blessed with plenty of sunshine, while the country's interior rolls out an endless array of natural wonders to be conquered from thundering waterfalls and rainforests alive with spider monkeys and tree frogs to brooding volcanoes and dramatic geysers. Gallo Pinto, which has a literal meaning of "spotted rooster," is the national dish of Costa Rica. Consisting of rice and beans stir-fried together, it is usually served for breakfast and washed down with a deliciously-strong cup of hot, steaming Costa Rican coffee.
What to buy: The island of Costa Rica is known as the most thrilling place of the Carribean due to its exciting excursions and wild life. A good present to bring back home would be a souvenir bottle of volcanic ash or sand. How about a native tribe mask?


The above three tools, i.e. glossary, translation memory, and style guide, can serve well in helping maintain consistency, but to produce a high quality work widely accepted by the end users, it has to be ensured by a QA process from Translation, Editing, and Proofreading (TEP). We rely on a complete process instead of a particular individual to guarantee the quality.
At each stage of the process, a general checklist is provided and the assigned resource is supposed to strictly follow the checklist before handing off to the next stage. For each individual project, an additional project checklist is created according to the specific requirements of the client.
The project manager is supposed to strictly follow the project checklist before delivering the project. While a well defined process sets the keynote of the quality of the service and delivery, the personnel engaged in performing the QA role is the key to the success of the process and the project.
The key QA personnel have to be qualified, experienced and knowledgeable in its field and most of all, be deeply rooted in the sense of responsibility. That's why we are saying it's a forever challenging task – right people do the right things in the right time – which is also what we have been pursuing.
10. Checklists are user-defined searches that you can run in batch against your ongoing translation. For example, with checklists you can search for banned words or typical translator pitfalls.