Image generation device, image generation method, and program
The image generation device addresses the lack of color consideration in infographic generation by using template and hue data to apply polarity-based colors, improving the visual representation of information.
Patent Information
- Application Number
- JP2021084883
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-05-19
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2041-05-19
AI Technical Summary
Existing methods for generating infographics from text do not adequately consider the influence of color on visual representation, limiting the ability to effectively convey information.
An image generation device that includes template data for positioning numerical representations, numerical names, and polar colors, along with hue definition data to set positive and negative hues, allowing the device to acquire and apply polarities to input text to generate infographics with appropriate color representations.
Enables more effective visual representation of information by incorporating color polarity based on the sentiment of the input text, enhancing the viewer's perception of positive or negative impressions.
Smart Images

Figure 0007704401000001 
Figure 0007704401000002 
Figure 0007704401000003
Abstract
Description
Technical Field
[0001] The present invention relates to an image generation device, an image generation method, and a program.
Background Art
[0002] Infographics are known as a method of visualizing information. Infographics are a visual representation that combines information with images. Combined with the attraction of the visual effect, the information to be conveyed is easily remembered, so infographics are used in many scenes such as news, signs, and meeting materials.
[0003] An approach to automatically generate infographics from text has been studied (Non-Patent Document 1). Non-Patent Document 1 extracts terms related to infographics such as "n%", "m in n", "m out of n", and "half of" from the text. By applying the extracted terms to a template, infographics are generated from the text.
Prior Art Documents
Non-Patent Documents
[0004]
Non-Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0005] Generally, since the influence of color on the visual effect is significant, Non-Patent Document 1 discloses or suggests nothing about color. By focusing on color to generate an infographic, it is considered possible to more appropriately visually represent information.
[0006] The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a technique capable of more appropriately visually representing information.
Means for Solving the Problems
[0007] An image generation device according to an aspect of the present invention includes template data that defines positions for drawing numerical representations representing numbers, positions for drawing numerical names of the numerical representations, and positions for polar colors in image data, a storage device that stores hue definition data that defines positive and negative hue values in a color space specified by a plurality of elements including hue, input text, an acquisition unit that acquires either a positive or negative polarity for the input text, an extraction unit that extracts numerical representations and numerical names from the input text, draws the numerical representations and the numerical names extracted by the extraction unit at the positions of the numerical representations and the numerical names defined by the template data, acquires the hue value of the polarity of the hue acquired by the acquisition unit from the hue definition data, sets, at the position of the polar color, a color obtained by changing the hue of the color corresponding to the numerical name to the acquired hue value, and an output unit that outputs image data.
[0008] An image generation method according to an aspect of the present invention includes steps in which a computer defines, in image data, template data that defines positions for drawing numerical representations representing numbers, positions for drawing numerical names of the numerical representations, and positions for polar colors, stores hue definition data that defines positive and negative hue values in a color space specified by a plurality of elements including hue, obtains an input text and a polarity, either positive or negative, for the input text, extracts a numerical representation and a numerical name from the input text, draws the extracted numerical representation and the numerical name at the positions of the numerical representation and the numerical name defined by the template data, obtains a hue value of the polarity obtained in the obtaining step from the hue definition data, sets, at the position of the polar color, a color obtained by changing the hue of the color corresponding to the numerical name to the obtained hue value, and outputs the image data.
[0009] One aspect of the present invention is a program that causes a computer to function as the above-described image generation device.
Advantages of the Invention
[0010] According to the present invention, it is possible to provide a technique capable of more appropriately visually representing information.
Brief Description of the Drawings
[0011]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
DETAILED DESCRIPTION OF THE INVENTION
[0012] Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the description of the drawings, the same reference numerals are given to the same parts and the description thereof is omitted.
[0013] (Image Generation Apparatus) The image generation apparatus 1 according to the embodiment of the present invention generates image data 26 which is an infographic related to the numerical expression from the input text including the numerical expression. The input text is data representing one or more sentences in a data format processable by a computer, and is typically text format data.
[0014] Generally, the input text including the numerical expression may have a positive feeling or a negative feeling depending on the attributes of the person presenting it. For example, in the case of an input text regarding the increase in land prices, the seller feels positively while the buyer feels negatively.
[0015] Therefore, the image generation device 1 acquires the polarity together with the input text, and generates the image data 26 in a color corresponding to the polarity. The polarity is set to two values, positive or negative. The polarity indicates whether the impression on the input text is positive or negative. As a result, the image generation device 1 can more appropriately visually represent information by expressing the impression held by the viewer in color in the image data 26.
[0016] As shown in FIG. 1, the image generation device 1 includes each data of hue definition data 11, numerical name color data 12, numerical change definition data 13, template definition data 14, template group data 15, input text 21, polarity 22, numerical name 23, numerical expression 24, template data 25, and image data 26, and each function of an acquisition unit 31, an extraction unit 32, a selection unit 33, and an output unit 34. Each data is stored in a storage device such as a memory 902 or a storage 903. The hue definition data 11, the numerical name color data 12, the numerical change definition data 13, the template definition data 14, and the template group data 15 are stored in the image generation device 1 in advance prior to the process in which the image generation device 1 generates the image data 26 from the input text 21. The input text 21, the polarity 22, the numerical name 23, the numerical expression 24, the template data 25, and the image data 26 are stored in the image generation device 1 along with the process in which the image generation device 1 generates the image data 26 from the input text 21. Each function is implemented in a CPU 901.
[0017] The hue definition data 11 defines a positive hue value and a negative value in a color space specified by a plurality of elements including hue. The color space specified by a plurality of elements including hue is, for example, the HSB system (H: hue, S: saturation, B: brightness), the HSV system (H: hue, S: saturation, B: value), or the like. When expressing a color in the HSB system, the hue is expressed by a value of 0 to 360. As shown in FIG. 2, the hue definition data 11 associates the range of the hue value for each of the positive and negative polarities.
[0018] In an embodiment of the present invention, for the hue values of each polarity, hue definition data 11 is generated with reference to the two-dimensional emotion wheel of plutchik. The hue values for positive are 0 to 135 corresponding to anger, anticipation, joy, trust, etc. in the two-dimensional emotion wheel of plutchik. The hue values for positive are 136 to 360 corresponding to trust, fear, surprise, sadness, disgust, and anger in the two-dimensional emotion wheel of plutchik. In the hue definition data 11, for each of the positive and negative polarities, the hue values may be defined so that the impression received by a person corresponds to the polarity, and they may be defined in any way.
[0019] Numerical name color data 12 is data that defines a color corresponding to a numerical name. The numerical name is the name of the expression target of the numerical expression included in the input text. When the numerical expression is a price such as "200 yen", the numerical name is "price".
[0020] As shown in FIG. 3, the numerical name color data 12 may associate a numerical name, an icon, and a representative color. One icon and one representative color are associated with one numerical name. A plurality of numerical names may be associated with one icon. The icon is an image that reminds of the numerical name. The icon may be set in the image data 26. The representative color is a color reminded of from the numerical name 23. In the example shown in FIG. 3, the representative color represents each value of RGB in two digits of hexadecimal numbers. The representative color may be expressed by a color name or by each value of HSB.
[0021] The representative color is determined by an arbitrary method. It may be determined from the colors of the icons listed in FIG. 3. Alternatively, the representative color may be determined from the colors of a plurality of icons generally used as numerical names. Also, since white or black is generally used frequently, a condition may be provided that the color determined from the icon or the like is not adopted as the representative color when "r > 200, g > 200 and b > 200" or "r < 55, g < 55 and b < 55".
[0022] The numerical change definition data 13 associates terms related to numerical changes with numerical change labels indicating either an increase or a decrease in the numerical values meant by those terms. As shown in FIG. 4, the numerical change definition data 13 associates with each numerical change label the term and part of speech corresponding to that numerical change label. Any label may be used as the numerical change label as long as it indicates either an increase or a decrease in the numerical value. In other embodiments, a numerical change label meaning no change in the numerical value may also be used.
[0023] In the example shown in FIG. 4, the numerical change labels are "UP" representing an increase in the numerical value and "DOWN" representing a decrease in the numerical value. In the example shown in FIG. 4, since the term "exceed" evokes an increase in the numerical value, the numerical change label "UP" is associated with it. Since the term "slump" evokes a decrease in the numerical value, the numerical change label "DOWN" is associated with it.
[0024] The template definition data 14 defines the attributes of a plurality of template data held by the template group data 15 of the image generation device 1. As shown in FIG. 5, the template definition data 14 associates an identifier of the template data with the number of numerical expressions represented by the template data and the number of changes in the numerical expressions. The change in the numerical expression is a change with respect to the numerical expression to be compared and is expressed as a percentage notation or a magnification. The input text includes not only numerical values by numerical expressions but also changes in the numerical expressions and is used when expressing the change in the numerical expression in the image data 26. The number of changes in the numerical expression corresponds to the number of figures representing the percentage or magnification included in the template data.
[0025] The template group data 15 is data that identifies a plurality of template data referred to when generating the image data 26. The template data defines the positions for drawing each part included in the image data 26, such as the position for drawing a numerical representation that represents a number, the position for drawing the numerical name of the numerical representation, the position of the polarity color, the position for drawing an icon, and the drawing position of the change of the numerical representation. The templates included in the template group data 15 are associated with the identifiers of the templates defined by the template definition data 14.
[0026] Referring to FIGS. 6(a) and (b), the template data will be described. Note that each of FIGS. 7(a) and (b) is an example of the image data 26 generated by the image generation device 1 using the template data shown in FIGS. 6(a) and (b).
[0027] The template in FIG. 6(a) includes a numerical representation display section P1 for drawing a numerical representation, a numerical name display section P2 for drawing a numerical name, and an icon display section P3 for displaying an icon. As shown in FIG. 7(a), the image data 26 shows specific data at the respective positions of the numerical representation display section P1, the numerical name display section P2, and the icon display section P3.
[0028] The template in FIG. 6(b) includes, in addition to the numerical representation display section P1, the numerical name display section P2, and the icon display section P3 included in the template in FIG. 6(a), a percentage display section P4 for displaying the numerical value of the change of a numerical representation such as a percentage form. As shown in FIG. 7(b), the image data 26 shows specific data at the respective positions of the numerical representation display section P1, the numerical name display section P2, the icon display section P3, and the percentage display section P4. The partially missing circle in the percentage display section P4 in FIG. 7(b) may have a different shape depending on the value represented by the percentage display section P4. As shown in FIG. 7(b), the percentage display section P4 indicates "90%". When this numerical value is even lower, the circle represented by the percentage display section P4 will be more missing. For example, when the percentage display section P4 represents "50%", the circle represented by the percentage display section P4 will be a semi-circle.
[0029] Figures 6(a) and 6(b) each provide a polarity color display section P5 in a frame. The polarity color display section P5 is a part that displays a color set according to the polarity 22 acquired by the acquisition section 31. Specifically, when the polarity 22 is positive, a color that reminds of positive is displayed on the polarity color display section P5. When the polarity 22 is negative, a color that reminds of negative is displayed on the polarity color display section P5. In the examples shown in Figures 6(a) and (b), the polarity color display section P5 is a frame surrounding the numerical expression display section P1 etc., but is not limited to this. The polarity color display section P5 may be provided as a part constituting a part of the template data, such as a pattern or a background in the template data.
[0030] Also, in one template data, a plurality of polarity color display sections P5 may be defined. Each polarity color display section P5 may be displayed in the same color or in different colors. When each polarity color display section P5 is displayed in a different color, the template data 25 associates an identifier for specifying the color to be displayed for each of the polarity color display sections P5. The template data 25 may associate a hue shift amount with respect to the reference polarity color for each of the polarity color display sections P5. For each of the polarity color display sections P5, colors with only different hues and the same saturation and lightness are displayed. The shift amount is the difference with respect to the hue value of the polarity color and is expressed as +30, -50, etc.
[0031] The input text 21 is data input to the image generation device 1. The input text 21 specifies the text for which the image generation device 1 generates the image data 26. The input text 21 includes a numerical expression representing a number and the numerical name of the numerical expression. In the embodiments of the present invention, the "number" is a word that can be expressed by numbers such as quantity, amount, percentage, etc. The number includes not only words that can be expressed as integers, but also words that can be expressed as any number such as decimals and fractions.
[0032] Polarity 22 is the data input to the image generation device 1. Polarity 22 is positive or negative. The image generation device 1 changes the hue of the polarity color display section P5 in the image data 26 according to the value set by the polarity 22. In the embodiments of the present invention, the polarity is positive or negative, but three or more polarities may be set.
[0033] The numerical name 23 and the numerical expression 24 are each data extracted from the input text 21. The numerical name 23 and the numerical expression 24 are each extracted by the extraction unit 32. The input text 21 includes at least one numerical expression 24.
[0034] The template data 25 is one template data selected from the template group data 15. The template data 25 is selected by the selection unit 33.
[0035] The image data 26 is data generated by the image generation device 1 from the input text 21 and the polarity 22. The image data 26 is generated by the output unit 34. The image data 26 is an infographic generated from the input text 21 and the polarity 22. The image data 26 has a color corresponding to the polarity 22, making it possible to express the impression corresponding to the polarity 22 in color.
[0036] The acquisition unit 31 acquires the input text 21 and either the positive or negative polarity 22 for the input text 21. The acquisition unit 31 acquires, for example, the input text 21 and the polarity 22 input by the user.
[0037] The extraction unit 32 extracts the numerical name 23 and the numerical expression 24 from the input text 21. The extraction unit 32 extracts the subject in the input text 21 as the numerical name 23. When the input text 21 contains a plurality of numerical expressions such as three or more, the extraction unit 32 extracts two numerical expressions 24 related to the subject in the input text 21. Among the plurality of numerical expressions included in the input text 21, the extraction unit 32 extracts the numerical expression 24 most related to the subject and the numerical expression 24 with the same label as the label of this numerical expression. As will be described later, the label identifies the type of number. The numerical expression 24 extracted in this way is considered to modify the numerical name that is the subject and is appropriate as a numerical expression for the numerical name.
[0038] The extraction unit 32 performs morphological analysis and named-entity extraction processing on the input text 21, and performs dependency syntax analysis and part-of-speech tagging on the input text 21. The extraction unit 32 determines the subject-predicate pair in the input text 21, and determines the numerical name and the numerical expression from the determined subject-predicate pair. In the embodiment of the present invention, the case where spaCy, Sudachi, and GiNZA of the Japanese Universal Dependencies model are used as the NPL (Natural Language Processing) library will be described, but it is not limited thereto.
[0039] The extraction unit 32 performs morphological analysis on the input text 21 using Sudachi. The extraction unit 32 passes the analysis result to spaCy. The extraction unit 32 performs dependency structure analysis and part-of-speech tagging of the input text 21 using the numerical change definition data 13 and the Japanese Universal Dependencies model. As a result, the input text 21 is treated as a set of tokens split into word units.
[0040] The extraction unit 32 assigns an entity expression, a numerical expression, and a numerical change label to each token. The entity expression is a proper noun. The numerical expression is a word expressed by a number such as a quantity, an amount of money, or a percentage. Among the labels classified as numerical expressions, the extraction unit 32 defines a label representing a number as a numerical expression. Labels representing numbers are, for example, "number of people (N_Person)", "number of organizations (N_Organization)", "number of locations (N_Location)", "number of locations - others (N_Location_Other)", "number of countries (N_Country)", "number of facilities (N_Facility)", "number of products (N_Product)", "number of events (N_Event)", "number of natural objects (N_Natural_Object)", "number of natural objects - others (N_Natural_Object_Othrer)", "number of animals (N_Animal)", "number of plants (N_Flora)", "amount expression (Money)", "percentage expression (Percent)", "multiplication expression (Multiplication)", "frequency expression (Frequency)", and "age (Age)".
[0041] The result of the extraction unit 32 performing word segmentation on the sentence "The price of vegetables has dropped from 200 yen to 150 yen" and assigning numerical expressions and numerical change labels is shown in Fig. 8(a). The delimiters in Fig. 8(a) are the delimiters of the segmented words. The extraction unit 32 assigns a label of amount expression to each of "200 yen" and "150 yen". The extraction unit 32 assigns a numerical change label to "has dropped".
[0042] Fig. 8(b) shows the dependency syntax analysis result. Fig. 8(b) associates a part of speech with each word segmented from the sentence "The price of vegetables has dropped from 200 yen to 150 yen", and further shows the dependency of each part of speech.
[0043] Next, the extraction unit 32 determines pairs of a subject and a predicate in the input text 21. The extraction unit 32 first extracts a plurality of subject - predicate pairs and then explains the case of determining one subject - predicate pair.
[0044] First, the process of extracting the numerical names 23 included in the input text 21 will be described. The extraction unit 32 searches for tokens that can be the subject as the numerical name. The extraction unit 32 searches for tokens with the dependency tag nsubj meaning the subject noun or obj meaning the object from the beginning of the sentence, and sets the searched tokens as subject word candidates. At this time, if the subject word candidate token is obj, the extraction unit 32 determines whether each of the two conditions, "the obj token does not contain the target numerical expression" and "an nmod token meaning a noun modifier appears before the obj token", is satisfied. If both conditions are satisfied, the extraction unit 32 sets this obj token as the subject word candidate. On the other hand, if either condition is not satisfied, specifically, if "the obj token contains the target numerical expression" or "the nmod token does not appear", the extraction unit 32 excludes this obj token from the subject word candidates. These conditions are considered because when the input text 21 is "The number of infected people with the new coronavirus in the United States exceeded 20 million 7,000, with a cumulative total of over 20 million.", the subject is adopted as "infected people" instead of "20 million". Also, when a numerical expression comes to obj in the sentence structure, it is often the case that another word nmod that can be the subject has already appeared in the text.
[0045] The extraction unit 32 extracts the subject in the input text 21 and identifies the predicate corresponding to the subject.
[0046] When there are multiple pairs of subject and predicate extracted by the extraction unit 32, the extraction unit 32 narrows down from the multiple pairs to one pair. Here, the subject of the subject-predicate pair to be narrowed down is likely to be a numerical name. The extraction unit 32 obtains the distance between the subject of each subject-predicate pair and a token with any label of numerical expressions in the input text 21. The distance here is the number of tokens existing between the two target tokens. Also, when the subject token is one character, since it is often not appropriate as a subject, in the case of a one-character subject, the extraction unit 32 may add a weight so that the distance between the subject and the numerical expression becomes 1.5 times. The extraction unit 32 calculates the average value of the distances between the subject of each subject-predicate pair and each numerical expression token in the input text 21, and adopts the one with the smallest average value of the distances, that is, the one with the closest subject from multiple numerical expressions, as the final subject-predicate pair. Also, the subject of the final subject-predicate pair becomes a numerical name.
[0047] In the input text 21, there may also be a case where no subject-predicate relationship can be obtained. In that case, the extraction unit 32 obtains a plurality of keywords from the input text 21 and determines the subject from these keywords. The keywords are composed of a noun and a word explaining the noun, and are, for example, proper noun tokens having an obj tag. The extraction unit 32 counts the number of noun tags NOUN and the number of other tags for each part-of-speech tag of each word included in the keyword for each keyword. The extraction unit 32 uses, as the subject, the keyword having the largest number of words with noun tags among the plurality of keywords. When there are a plurality of keywords having the largest number of words with noun tags, the extraction unit 32 uses, as the subject, the keyword having the smallest number of words with part-of-speech tags other than nouns among those keywords. The extraction unit 32 obtains the tokens related to the subject as the predicate.
[0048] From the above process, the extraction unit 32 can obtain the numerical name in the input text 21, but the extended subject may also be used as the numerical name. The extended subject is represented by, for example, "B of A" or "ABC". "B of A" is, for example, "sales of 'games'". Even if the subject is "sales", when "games" is set as the modifier of the sales, the extraction unit 32 may use "sales of games" as the subject. "ABC" is, for example, "new virus-infected persons". Even if the subject as a word is "infected persons", when "new virus" is set as the modifier of the infected persons, the extraction unit 32 may use "new virus-infected persons" as the subject. Also, when the subject is one character and the modifier of the subject is one character, assuming that the subject on the sentence head side has a greater role as the subject, a proper noun of two or more characters before the adopted modifier may be adopted as the extended subject.
[0049] Next, the process of extracting the numerical expression 24 included in the input text 21 will be described. The extraction unit 32 determines the numerical expression 24 from the subject-predicate pair. When the input text 21 contains one numerical expression, that numerical expression is used as the numerical expression 24 of the input text.
[0050] When the input text 21 contains a plurality of numerical expressions, the extraction unit 32 obtains the relevance between the subject and each numerical expression, excluding "Percent" and "Multiplication" which mean ratio. First, when the word with the numerical expression tag and the subject are in a dependency relationship or a modification relationship, the extraction unit 32 increments the relevance degree between the subject and the corresponding numerical expression by 1. At this time, when the numerical expression token is the subject itself, the extraction unit 32 does not change the relevance degree.
[0051] The extraction unit 32 finally uses the numerical expression token with the highest degree of relevance as the numerical expression candidate in the input text 21. Here, the numerical expression includes multiple types of expressions such as "number of products (N_Product)" and "monetary expression (Money)". If there are tokens with the same type of numerical expression as the candidate numerical expression, those tokens are adopted as the numerical expression 24 in the input text 21. For example, consider the case where the input text 21 is "The new product comes in 3 pieces and costs from 200 yen to 220 yen." In this input text 21, a monetary expression is assigned to each of "200 yen" and "220 yen", and a product quantity is assigned to "3 pieces". When the subject is "new product", the degree of relevance of "220 yen" to the "new product" is higher than that of "3 pieces" and "200 yen". Therefore, the extraction unit 32 uses "220 yen", which has the highest degree of relevance to the subject, and "200 yen", which is the same type of numerical expression as this numerical expression, as numerical expression candidates, and excludes "3 pieces" from the numerical expression candidates.
[0052] Here, words with the labels of "percentage expression (Percent)" and "multiplication expression (Multiplication)" are treated as changes in the adopted numerical expression. If there are no changes in the numerical expressions included in the input text 21 after removing "Percent" and "Multiplication" in advance, words with the label of "percentage expression (Percent)" or "multiplication expression (Multiplication)" may be adopted as changes in the numerical expressions in the input text 21.
[0053] Next, the extraction unit 32 determines the numerical variation in the input text 21. Here, tokens with numerical change labels in the numerical change definition data 13 are referenced.
[0054] First, when a numerical change label is assigned to a predicate, the extraction unit 32 uses the numerical change label assigned to the predicate as the numerical variation in the input text 21. When a word with a numerical change label assigned to it is related to the predicate, the extraction unit 32 uses the numerical change label assigned to the word related to the predicate as the numerical variation in the input text 21. When a word with a numerical change label assigned to it is the subject, the extraction unit 32 uses the numerical change label assigned to the subject as the numerical variation in the input text 21. When a word with a numerical change label assigned to it, or a word in a dependency relationship with that word, is related to a numerical expression, the extraction unit 32 uses the numerical change label assigned to that word as the numerical variation.
[0055] When the input text 21 contains multiple numerical change labels, the extraction unit 32 uses the numerical change label closest to the end of the text as the numerical variation in the input text 21. Also, when the input text 21 does not contain a word with a numerical change label assigned to it, but a token of "Percent" or "Multiplication" is related to a word related to UP or DOWN, the extraction unit 32 determines the numerical variation based on this label classification. For example, when "a 20% increase" is included in two tokens, "20%" and "increase", "Percent", "20%", and "increase" related to UP have a continuous relationship. When "a 20% increase" is split into one token, this token and the word "increase" related to UP have an inclusion relationship. Alternatively, when a token of "N_xxx" such as "number of people (N_Person)" contains a word related to UP or DOWN, the extraction unit 32 determines the numerical variation based on this label classification. Here, words related to UP are "increase", "up", "exceed", etc. Words related to DOWN are "decrease", "down", etc.
[0056] For example, when a word indicating a numerical change follows a word with the token "Percent" or "Multiplication", the value converted from these words is represented in a graph or the like represented by the image data 26. For example, "a 10% decrease" is converted to "90%", "a 30% increase" is converted to "130%", and "1.5 times" is converted to "150%". Also, the numerical variation may be converted to be normalized and reflected in a graph or the like represented in the infographic. For example, when expressing the phrase "a 10% reduction" in an infographic, "90%", which is the value obtained by converting "10%" to be normalized, may be represented in a graph or the like.
[0057] Through the above processing, the extraction unit 32 extracts the numerical name 23 and the numerical expression 24 in the input text 21. Also, the extraction unit 32 obtains the numerical value of the change in the numerical expression, which is a percentage or multiple such as "Percent" or "Multiplication". Note that the extraction unit 32 only needs to be able to extract at least the numerical name 23 and the numerical expression 24, and these may be extracted by a process different from the above process.
[0058] The selection unit 33 extracts the template data 25 from the template group data 15 based on the number of numerical expressions 24 extracted by the extraction unit 32 and the number of changes in the numerical expressions. The selection unit 33 refers to the template definition data 14 to identify the identifier of the template that can represent the number of numerical expressions 24 extracted by the extraction unit 32 and the number of changes in the numerical expressions. The selection unit 33 selects the template data 25 corresponding to the identified identifier from the template group data 15.
[0059] The output unit 34 outputs the image data 26 according to the template data 25 selected in the selection unit 33. The output unit 34 draws each piece of information of the numerical expression 24 and the numerical name 23 extracted by the extraction unit 32 at the positions of the numerical expression and the numerical name defined in the template data 25. The output unit 34 draws the numerical name 23 and the numerical expression 24 extracted by the extraction unit 32 in the numerical name display part P2 and the numerical expression display part P1 of the template data 25. Further, the output unit 34 extracts an icon associated with the numerical name 23 from the numerical name color data 12, and draws the extracted icon in the icon display part P3. In the numerical name color data 12, when there is no record including the numerical name that matches the numerical name 23, an icon may be extracted from a record including a synonymous numerical name of the numerical name 23 or a record including a numerical name with a high similarity to the numerical name 23. When the extraction unit 32 extracts a plurality of numerical names 23, the output unit 34 draws an icon corresponding to any one of the numerical names. When the template data 25 has a percentage display part P4 for displaying the change in the numerical expression, it draws according to the change in the numerical expression extracted by the extraction unit 32.
[0060] Further, the output unit 34 draws the polarity color display part P5 of the template data 25 with the color acquired by the color acquisition unit 35 described later. The color acquisition unit 35 acquires the color of the polarity color display part P5 in the template data.
[0061] The color acquisition unit 35 acquires the hue value of the polarity hue acquired by the acquisition unit 31 from the hue definition data 11. Further, the color acquisition unit 35 acquires the representative color (color) corresponding to the numerical name 23 extracted by the extraction unit 32 from the numerical name color data 12. In the numerical name color data 12, when there is no record including the numerical name that matches the numerical name 23, the representative color may be extracted from a record including a numerical name that is a synonym of the numerical name 23 or a record including a numerical name having a high similarity to the numerical name 23. When the hue of the representative color is within the range of the hue value acquired from the hue definition data 11, the color acquisition unit 35 sets the representative color as the polarity color. When the hue of the representative color is not within the range of the hue value acquired from the hue definition data 11, the color acquisition unit 35 changes the hue of the representative color to the hue value acquired from the hue definition data 11, and sets the color having the chroma and lightness of the representative color as the polarity color. The polarity color display unit P5 of the template data 25 is displayed with the polarity color acquired by the color acquisition unit 35, and the image data 26 is generated.
[0062] The hue of the polarity color acquired by the color acquisition unit 35 only needs to be within the range of the hue value of the polarity acquired by the acquisition unit 31 in the hue definition data 11.
[0063] For example, when the template data 25 associates an identifier for specifying the color to be displayed in each of the polarity color display units P5 with the polarity color display unit P5, the color acquisition unit 35 acquires a plurality of colors used in the polarity color display unit P5. One of the plurality of colors is the polarity color, and the other colors are colors with the hue of the polarity color changed. The color acquisition unit 35 may generate the image data 26 using a color with the hue of the polarity color further changed. In the template data 25, when there are a plurality of polarity color display units P5, colors with only different hues may be displayed for each of them. The color acquisition unit 35 acquires the polarity color and a color obtained by changing the hue by ±30 with respect to the polarity color, for example, so that the polarity color display units P5 are displayed with analogous colors.
[0064] An example of a method for determining the hue of the color acquired by the color acquisition unit 35 will be described. Here, a case where three colors are used in the polarity color display unit P5 in the template data 25 will be described.
[0065] The color acquisition unit 35 first maps the representative color (A) corresponding to the numerical name 23 onto the HSB color phase ring. The color on the mapping is referred to as A'. Based on A', while fixing the S (saturation) and B (brightness) to the saturation and brightness of the representative color, the triad colors (B1, B2) with H (hue) being ±120, or the tetrad colors (C1, C2, C3) with H being ±90 are acquired. Next, the color acquisition unit 35 determines one color among A', B1, B2, C1, C2, and C3 that is included in the range corresponding to the polarity 22 acquired by the acquisition unit 31 in the hue definition data 11.
[0066] Let the determined one color be D. If the saturation or brightness of D is low, the colors selected based on D will also become dark. Therefore, the color acquisition unit 35 may adjust the color of D with the lower limit of the saturation value of D being 50 and the lower limit of the brightness value of D being 60. Let the adjusted color be D'1. The color acquisition unit 35 selects two colors based on D'1. For example, the color acquisition unit 35 acquires the colors (D'2, D'3) with the hue of D'1 being ±30. Here, the difference in the hue between D'1 and D'2, and between D'1 and D'3 is set to 30, but the value of the difference may be set appropriately. The color acquisition unit 35 determines D'1, D'2, and D'3 as the colors to be displayed on the polarity color display unit P5. The output unit 34 causes the polarity color display unit P5 to display D'1, D'2, and D'3.
[0067] Referring to FIG. 9, when the color corresponding to the numerical name 23 is the color code #6aaa30, the three colors acquired by the color acquisition unit 35 will be described. Here, it is assumed that the polarity 22 is positive.
[0068] The color acquisition unit 35 converts the color code #6aaa30 into the HSB system (92, 72, 67). Based on (92, 72, 67), the color acquisition unit 35 uses the triad method to obtain two colors (1, 72, 67), (211, 72, 67), and (311, 72, 67), and uses the tetrad method to obtain three colors (181, 72, 67), (271, 72, 67), (1, 72, 67) as candidate polar colors. The hues of the two colors (1, 72, 67), (211, 72, 67), and (311, 72, 67) obtained by the triad method are shown in Fig. 9(a). The hues of the three colors (181, 72, 67), (271, 72, 67), (1, 72, 67) obtained by the tetrad method are shown in Fig. 9(b).
[0069] In the embodiment of the present invention, the hues positively associated with the hue definition data 11 are 0 - 135. Among the six colors selected as candidate polar colors by the color acquisition unit 35, the color acquisition unit 35 selects the polar colors from (92, 72, 67) and (1, 72, 67) whose hues are within the range of 0 - 135. When the color acquisition unit 35 selects (92, 72, 67) as the polar color, it acquires the analogous colors (121, 72, 67), (61, 72, 67) with the H value adjusted by ±30. Therefore, the polar color display unit P5 is colored with (92, 72, 67), (121, 72, 67), or (61, 72, 67) shown in Fig. 9(c).
[0070] Referring to Fig. 10, the image generation method by the image generation device 1 according to the embodiment of the present invention will be described.
[0071] First, in step S1, the image generation device 1 acquires the input text 21 and the polarity 22. In step S2, the image generation device 1 extracts the numerical name 23 and the numerical representation 24 from the input text 21.
[0072] In step S3, the image generation device 1 selects template data 25 from the numerical representation number and the like extracted in step S2. In step S4, the image generation device 1 changes the hue of the color corresponding to the numerical name 23 extracted in step S2 to the value of the hue corresponding to the polarity 22 obtained in step S1. Note that when the hue of the color corresponding to the numerical name 23 extracted in step S2 is within the range of the hue associated with the polarity obtained in step S1, the image generation device 1 does not have to change the hue of the color corresponding to the numerical name 23.
[0073] In step S5, the image generation device 1 sets the numerical representation 24 and the numerical name 23 extracted in step S2 in the template data 25 selected in step S3, and generates image data 26 using the color whose hue was changed in step S4.
[0074] The image generation device 1 according to the embodiment of the present invention acquires the input text 21 necessary for generating the infographic image data 26, and acquires the polarity 22 set to positive or negative. The polarity 22 indicates whether a person who refers to the image data 26 has a positive feeling or a negative feeling towards the input text 21. The image generation device 1 generates the image data 26 using a color according to the polarity 22. As a result, a person who refers to the image data 26 is likely to have a positive or negative feeling from the image data 26. Also, whether a numerical value is positive or negative differs depending on the position of the person who refers to it. The image generation device 1 can generate the image data 26 according to the position of the person who refers to the infographic.
[0075] In addition, in the embodiment of the present invention, the case where the polarity 22 is input has been described, but it is not limited thereto. Instead of the polarity 22, the person to be referred to for the image data 26 may be input, and the image generation device 1 may determine the polarity 22. The image generation device 1 may refer to polarity dictionary data (not shown) in which the numerical change of UP or DOWN and the polarity are associated with the person to be referred to, and identify the polarity 22 from the input person to be referred to and the numerical change determined by the extraction unit 32, and generate the image data 26 according to the identified polarity 22.
[0076] In this way, the image generation device 1 can more appropriately generate the image data 26 capable of visually expressing information.
[0077] The image generation device 1 described above is realized by, for example, a general-purpose computer system including a CPU (Central Processing Unit), a memory 902, a storage 903 (HDD: Hard Disk Drive, SSD: Solid State Drive), a communication device 904, an input device 905, and an output device 906. In this computer system, each function of the image generation device 1 is realized by the CPU 901 executing a program loaded on the memory 902.
[0078] Note that the image generation device 1 may be implemented by one computer or may be implemented by a plurality of computers. Further, the image generation device 1 may be a virtual machine implemented on a computer.
[0079] The program of the image generation device 1 can be stored in a computer-readable recording medium such as an HDD, an SSD, a USB (Universal Serial Bus) memory, a CD (Compact Disc), or a DVD (Digital Versatile Disc), or can be distributed via a network.
[0080] Note that the present invention is not limited to the above-described embodiment, and various modifications are possible within the scope of the gist thereof.
Explanation of Symbols
[0081] 1 Image generation device 11 Hue definition data 12 Numerical name color data 13 Numerical change definition data 14 Template definition data 15 Template group data 21 Input text 22 Polarity 23 Numerical name 24 Numerical expression 25 Template data 26 Image data 31 Acquisition unit 32 Extraction unit 33 Selection unit 34 Output unit 35 Color acquisition unit 901 CPU 902 Memory 903 Storage 904 Communication device 905 Input device 906 Output device P1 Numerical expression display unit P2 Numerical name display unit P3 Icon display unit P4 Percentage display unit P5 Polarity color display unit
Claims
1. In image data, template data that defines positions for drawing numerical representations that represent numbers, positions for drawing numerical names of the numerical representations, and positions for polarity colors, and a storage device that stores hue definition data that defines positive hue values and negative values in a color space specified by a plurality of elements including hue; input text, and an acquisition unit that acquires a polarity that is either positive or negative for the impression of the input text; an extraction unit that extracts a numerical representation and a numerical name from the input text; draws the numerical representation and the numerical name extracted by the extraction unit at the positions of the numerical representation and the numerical name defined by the template data; acquires the hue value of the polarity acquired by the acquisition unit from the hue definition data; an output unit that sets, at the position of the polarity color, a color obtained by changing the hue of the color corresponding to the numerical name to the acquired hue value, and outputs image data An image generation device comprising:
2. The output unit further generates the image data using a color obtained by changing the hue of the polarity color The image generation device according to claim 1.
3. The extraction unit extracts the subject in the input text as the numerical name The image generation device according to claim 1 or 2.
4. When the input text includes a plurality of numerical representations, the extraction unit extracts numerical representations related to the subject in the input text The image generation device according to any one of claims 1 to 3.
5. A computer, in image data, template data that defines positions for drawing numerical representations that represent numbers, positions for drawing numerical names of the numerical representations, and positions for polarity colors, and a step of storing hue definition data that defines positive hue values and negative values in a color space specified by a plurality of elements including hue; a step in which the computer acquires input text and a polarity that is either positive or negative for the impression of the input text; a step in which the computer extracts a numerical representation and a numerical name from the input text; a step in which the computer draws the numerical representation and the numerical name extracted in the extraction step at the positions of the numerical representation and the numerical name defined by the template data; acquires the hue value of the polarity acquired in the acquisition step from the hue definition data A step of outputting image data by setting, at the position of the polar color, a color obtained by changing the hue of the color corresponding to the numerical name to the obtained hue value An image generation method comprising the above. [
6. ] A program for causing a computer to function as the image generation device according to any one of claims 1 to 4.
Citation Information
Patent Citations
Device for processing merchandise sales registration
JP2001256555A
Securities order server, and securities order program
JP2009271856A
Portable electronic apparatus and image projection unit
JP2011250206A