Shape-constrained semantic word cloud automatic generation method

By constructing a weighted undirected graph and a network community partitioning algorithm, combined with a simple polygonal Veno graph and a spiral generation method, a semantic word cloud is automatically laid out. This solves the problem of semantically related words not being close together in existing technologies, and realizes automatic generation and user-customizable shape word cloud layout.

CN115546353BActive Publication Date: 2026-04-21HANGZHOU DIANZI UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU DIANZI UNIV
Filing Date
2022-09-30
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing shape-based word cloud visualization methods cannot automatically guarantee that semantically related words are also located close to each other within the shape, and the user interaction adjustment process is time-consuming.

Method used

By constructing a weighted undirected graph and using a network community partitioning algorithm to group words, and combining the Venn diagram of a simple polygon and a spiral generation method, the vector field inside the shape is calculated. Words are automatically laid out to ensure that words with similar meanings are placed close together inside the shape, and user interaction functions are provided to customize directional constraints.

Benefits of technology

It enables the generation of semantic word clouds without user interaction, automatically ensures that semantically related words are positioned close to each other within the shape, and provides a user-customizable layout adjustment function to generate word cloud layouts that meet user preferences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115546353B_ABST
    Figure CN115546353B_ABST
Patent Text Reader

Abstract

This invention discloses an automatic method for generating shape-constrained semantic word clouds. The technical solution of this invention involves the processing of text and shapes. The text processing flow includes: extracting words from the text; converting words into word vectors using the word2vec model and calculating the similarity between words; constructing an undirected graph based on the similarity and grouping words using a network community partitioning algorithm. The shape processing flow includes: extracting shape boundary points to form simple polygons; calculating the central axis of the simple polygons; obtaining the Venn diagram of the simple polygons based on the central axis, thereby generating spirals inside the shapes; and calculating vector fields based on direction constraints. After processing the text and shapes, a word cloud layout is performed to obtain a shape-constrained semantic word cloud. The word cloud generated using this technology satisfies both the characteristic of semantically similar words being close to each other in the word cloud layout and the characteristic of shape-constrained word clouds where words are placed inside arbitrary shapes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer data visualization, and more specifically to a method for automatically generating semantic word clouds with shape constraints. Background Technology

[0002] In the era of big data, visualization technology has received increasing attention. Visualization presents data in an intuitive way, enabling the organization of complex information and the discovery of patterns within the data. Word cloud visualization, as a visualization technique, has been widely used in text data visualization since 1997. A word cloud is a visual summary presented after analyzing text data, effectively conveying an overview of the text. The size of the words in a word cloud represents their frequency of occurrence in the text; therefore, larger words highlight the text's theme and attract more attention.

[0003] Existing word cloud visualization techniques can generate various types of word clouds, including semantic word clouds, shape word clouds, and temporal word clouds. Semantic word clouds focus on representing word relevance; semantically similar words are positioned close together in the cloud. Besides encoding word frequency information by word size, the color of words in a semantic word cloud encodes grouping information to represent different text topics. Shape word clouds focus on arranging words within arbitrary shapes, rather than simply placing them within a rectangular canvas. While current shape word cloud visualization methods can generate compact shape word cloud layouts, they cannot represent the semantic information of words; that is, they cannot guarantee that semantically related words are also positioned close together within the shape. Even though word generation systems offer many interactive features, allowing users to manually edit and adjust word positions to generate shape word clouds that convey semantic information, this process is very time-consuming. Summary of the Invention

[0004] To address the aforementioned problems, this invention provides a shape-constrained semantic word cloud automatic generation method that requires no user interaction and can automatically arrange words within a given shape. At the same time, it ensures that words with similar semantics are also positioned close to each other within the shape, thus solving the problems existing in current shape-based word cloud generation methods.

[0005] The technical solution provided by this invention is as follows:

[0006] Step 1: Parse the text uploaded by the user, extract the words in the text, and calculate the frequency of the words;

[0007] Step 2: Embed each word to obtain a set of word vectors, and use the word vectors to calculate the similarity of each pair of words;

[0008] Step 3: Construct a weighted undirected graph and use a network community partitioning algorithm to obtain multiple word groups;

[0009] Step 4: Extract the outline points of the shape uploaded by the user to obtain a simple polygon, and calculate the centerline of the simple polygon;

[0010] Step 5: Obtain the Venn diagram of the simple polygon by using its central axis;

[0011] Step Six: Group the regions in the Venn diagram to determine the placement of words in each group;

[0012] Step 7: Generate a spiral and determine the direction of movement of the spiral based on the current location of the spiral in the Vinograph region;

[0013] Step 8: Calculate the vector field inside the shape based on the central axis constraint, center constraint, and user-defined direction constraint;

[0014] Step 9: Determine the position and direction of each word based on the spiral, vector field, and word region grouping.

[0015] Preferably, in step two, a word2vec model is trained using the Yelp dataset, the trained model is used to embed words, and then the cosine similarity between each pair of words is calculated.

[0016] Preferably, in step three, a weighted undirected graph is constructed, where each word corresponds to a node in the graph, and the weight of each edge in the graph is the cosine similarity between the two words. The Louvain community detection algorithm is used to group the graph nodes, resulting in multiple word groups.

[0017] Preferably, in step four, the RL sequence algorithm is used to quickly calculate the central axis of the simple polygon, ultimately obtaining the central axis represented by a binary tree. In step five, several sides are added to the central axis to obtain the Venn diagram of the simple polygon, thereby obtaining multiple shape regions.

[0018] Preferably, in step six, a shape region is assigned to each word group. Specifically, through... To obtain an optimal region allocation scheme, where A i This represents the size of the region currently assigned to the i-th word group. Let ω be the area of ​​the region corresponding to the area grouped by the i-th word, and σ be the adjustable weight. k The variance of the number of parts of the k-th narrow region occupied by each word group.

[0019] Preferably, in step seven, the formula is used. The spiral inside the shape is generated step by step, where dx and dy are the current step sizes of the spiral along the x and y axes, respectively; r is the distance of the spiral's current position from its starting point; a and dθ are user-specified parameters that control the spiral's step size and the distance between two adjacent curves; N and T are the normal and tangential vectors of the spiral's current position, respectively. T can be obtained from the region where the spiral's current position is located. If the current region is associated with an edge of a simple polygon, then T is the direction parallel to that edge; if the current region is associated with a concave point of a simple polygon, then T is the direction perpendicular to the line connecting the current position and the concave point.

[0020] Preferably, in step seven, a multi-center spiral is generated. A distance field is generated inside the shape. If the distance field value of a point is greater than the distance field values ​​of its surrounding points, then that point can be considered a candidate center point. All candidate center points are sorted in descending order of their distance field values. Selection begins with the point with the largest distance field value. If the distance between this point and all selected center points is greater than a given threshold, this point is added to the set of selected center points. Starting from the selected center point with the largest distance field value, the spiral is generated incrementally, tracking the distance field value at each position of the spiral. The process stops when the distance field value decreases by val (an adjustable parameter), resulting in a central spiral segment. This process is then repeated starting from the next selected center point, stopping when the last spiral segment crosses the shape boundary, ultimately yielding a multi-center spiral.

[0021] Preferably, in step eight, by Calculate the vector field inside the shape. Here, T represents each triangle obtained after triangulation; i and j are a pair of vertices in the triangle; R... i =(cos 2θ) i sin2θ i );θ i Let ω represent the direction of the vector field at vertex i of the triangle; k represents the number of direction constraint terms for the vector field; ω k The weight of the k-th constraint term; l k This represents the number of triangle vertices subject to directional constraints in the k-th constraint term; This refers to the constraint direction of the triangle vertex subject to direction constraints in the k-th constraint term. The constraint directions of the vector field include the central axis constraint, the center constraint, and user-defined constraints.

[0022] Preferably, in step nine, the position and orientation of each word are determined based on the spiral, vector field, and word region allocation information. The region containing each point on the spiral is determined, resulting in the points on the spiral contained within the region of each group. The grouped words are laid out independently. The points on the spiral contained within the region of each word are traversed. For each point, the directional bounding box algorithm is used to determine whether the word collides with other words at the current point, and then whether the word exceeds its region. If no collision is detected and the word does not exceed its region, the word can be placed at the current point, with the placement direction being the vector field direction of the current point.

[0023] The beneficial effects of this invention are as follows: Current methods for generating shape word clouds based on spirals arrange words sequentially along the spiral according to their frequency, ignoring the semantic relationships between words and failing to guarantee that semantically similar words are also close together within the shape. This invention solves the aforementioned problems by constraining the placement of words using the Venn diagram of a simple polygon, and can generate word clouds that satisfy both semantic and shape word clouds. Furthermore, this invention calculates a vector field based on directional constraints within the shape, providing user interaction functionality. Users can customize the constraint directions of words at certain positions within the shape using a drawing tool, generating a word cloud layout that meets their preferences. Attached Figure Description

[0024] Figure 1 This is a flowchart of a shape-constrained semantic word cloud generation technique according to the present invention.

[0025] Figure 2 This is a Venn diagram of a simple polygon, representing a shape-constrained semantic word cloud generation technique of the present invention.

[0026] Figure 3 This is a grouping diagram of word regions for a shape-constrained semantic word cloud generation technique in this invention.

[0027] Figure 4 This is a schematic diagram of a multi-center spiral in a shape-constrained semantic word cloud generation technique of the present invention.

[0028] Figure 5 This is a schematic diagram of the orientation field constraint of a shape-constrained semantic word cloud generation technology in this invention.

[0029] Figure 6 This is a diagram illustrating the word cloud layout effect of a shape-constrained semantic word cloud generation technology according to the present invention.

[0030] Figure 7 This refers to a user-defined directional constraint in a shape-constrained semantic word cloud generation technique of the present invention.

[0031] Figure 8This is a layout effect diagram of a semantic word cloud generated based on user-defined directional constraints using a shape-constrained semantic word cloud generation technology of the present invention. Detailed Implementation Plan

[0032] To further illustrate the present invention in detail, the present invention will be described in further detail below with reference to the accompanying drawings and specific embodiments.

[0033] like Figures 1 to 8 As shown, this invention proposes a flow of a shape-constrained semantic word cloud generation method, which involves the processing of text and shape.

[0034] The text processing workflow includes: extracting words from the text, word embedding, calculating word similarity, and word grouping. Specifically:

[0035] Word extraction: Extract all words from the text, remove stop words, and calculate the frequency of the remaining words. Since there may be many words in the text, users cannot focus on all of them; therefore, only the most important N words need to be shown to the user. Words are divided into two categories: core words, including the N most frequent words, which appear more often in the text and should receive more user attention; and non-core words, which are less important and are used to fill the blank spaces within the shape, making the overall word cloud layout look more aesthetically pleasing.

[0036] Word embedding: Converting words into vectors facilitates the calculation of word similarity. The word2vec model is used for word embedding. Figure 6 In the word cloud layout example shown, word embeddings are performed using a pre-trained word2vec model. Specifically, the Yelp public dataset was used as training data, and a continuous bag-of-words model was employed for training. Words with a frequency below 3 were ignored during training. The model was trained 50 times, and the generated word vectors had a dimension of 350.

[0037] Calculating similarity: After obtaining the vector representation of each word, the similarity between words can be calculated very easily. For each pair of words, the cosine similarity between the words is calculated as a measure of the semantic similarity between the two words.

[0038] Word Grouping: After obtaining the similarity between words, a weighted undirected graph can be constructed. Each word corresponds to a node in the graph, and the weight of each edge is the cosine similarity between the two words. Understandably, when the number of nodes in the graph is N, the number of edges in the graph is... To reduce the number of edges in the graph, edges with weights less than a certain threshold are deleted. Figure 6In the example, the threshold was set to 0.15. Furthermore, the Louvain community detection algorithm was used to calculate groups for the graph nodes. Each resulting group can represent a topic in the text, and the words in the group should be close to each other in the final word cloud layout.

[0039] The shape processing workflow includes: extracting the shape outline, calculating the central axis of a simple polygon, dividing the shape into regions, allocating word regions, generating a spiral, and calculating the vector field. Specifically:

[0040] Shape contour extraction: The user-uploaded RGB image is converted to a grayscale image, and then the grayscale image is converted to a binary image. Discrete contour points are obtained using a boundary tracking algorithm. A subset of these discrete points is sampled as the shape's contour points. The shape's contour points can form a simple polygon.

[0041] Calculating the central axis of a simple polygon: The RL sequence algorithm is used to quickly calculate the central axis of a simple polygon, ultimately resulting in a central axis represented by a binary tree. Each node in the binary tree has attributes including a branch along the central axis and node coordinates. The node coordinates of leaf nodes in the binary tree correspond to the coordinates of a convex point of the simple polygon, while the node coordinates of non-leaf nodes correspond to the coordinates of the intersection points of branches along the central axis. Nodes in the binary tree are connected by branches, which consist of a set of straight lines and parabolas.

[0042] Dividing the shape into regions: The central axis divides the shape into multiple regions. Adding edges to the central axis further yields the Vino map of the simple polygon, resulting in more subdivided shape regions. Specifically, for each concave point, two Vino edges are added, originating from that concave point and perpendicular to the two edges of the simple polygon containing that concave point. These newly added edges will always intersect with the endpoints of a branch on the central axis, ultimately resulting in the Vino map of the simple polygon. The Vino map divides the simple polygon into multiple regions, each region associated with either an edge or a concave point on the simple polygon.

[0043] Word Region Allocation: After obtaining each region within the shape, assign regions to each word in a group. When allocating regions, it is essential to ensure that semantically similar words are also located close together within the shape in the final word cloud. Processing steps before region allocation: Calculate the area of ​​each word to obtain the total area of ​​all words and the total area of ​​words in each group; calculate the area of ​​each region to obtain the area inside the entire shape; allocate proportionally distributed regions to each group of words based on the ratio of the total area of ​​words in the group to the total area of ​​all words; obtain all narrow regions based on the central axis and distance field.

[0044] The region allocation process consists of two stages. Stage 1 allocation: Starting from a given region, regions are allocated sequentially to each group, selecting regions clockwise along the shape boundary until the total area of ​​the selected regions reaches the area to be allocated to that group. Then, regions are allocated to the next group. Stage 2 allocation: Based on the results of the previous step, the regions for each group of words are redistributed so that the area allocated to each group is as close as possible to the area to be allocated to that group. Specifically, the solution... The minimum value of A is used to obtain an optimal region allocation scheme, where A i This represents the size of the region currently assigned to the i-th word group. Let ω be the area of ​​the region corresponding to the area grouped by the i-th word, and σ be the adjustable weight. k The variance of the number of parts of the k-th narrow region occupied by each word group.

[0045] Generating a multi-center spiral: via the formula The spiral inside the shape is generated step by step, where dx and dy are the step sizes of the spiral's current movement along the x and y axes, respectively; r is the distance of the spiral's current position from its starting point; a and dθ are user-specified parameters that control the spiral's step size and the distance between two adjacent curves; N and T are the normal and tangential vectors of the spiral's current position, respectively. T can be obtained from the region where the spiral's current position is located. Specifically, if the current region is associated with an edge of a simple polygon, then T is the direction parallel to that edge; if the current region is associated with a concave point of a simple polygon, then T is the direction perpendicular to the line connecting the current position and the concave point. Since N and T are perpendicular to each other, N can be obtained after obtaining T.

[0046] To avoid the problem that the trajectory of a spiral originating from a single center cannot pass through the surrounding positions of other centers, a multi-center spiral generation method is adopted. Specifically, a distance field is generated inside the shape. If the distance field value of a point is greater than the distance field values ​​of its surrounding points, then that point can be used as a candidate center point. All candidate center points are sorted in descending order of distance field value. The selection starts from the point with the largest distance field value. If the distance of this point to all selected center points is greater than a given threshold, then this point is added to the set of selected center points. Starting from the selected center point with the largest distance field value, the spiral is generated step by step, tracking the distance field value at each position of the spiral. The process stops when the distance field value decreases by val (an adjustable parameter that affects the length of each spiral segment), resulting in a spiral segment with one center. Then, the process continues from the next selected center point, repeating the above steps. The process stops when the last spiral segment crosses the shape boundary, ultimately obtaining a spiral generated from multiple centers.

[0047] Calculating the vector field: Calculate the vector field values for each pixel point inside the shape to determine the orientation of the word at its location. To speed up the calculation of the vector field, triangulate the shape, then calculate the vector field directions at the vertices of each triangle after triangulation, and then interpolate to obtain the vector field directions for each pixel inside the shape. The method for calculating the vector field is as follows: where T represents each triangle obtained after triangulation; i and j are a pair of vertices in the triangle; R i =(cos2θ i , sin2θ i ); θ i is the vector field direction of vertex i of the triangle; k represents the number of direction constraint terms of the vector field; ω k is the weight of the k-th constraint term; l k is the number of triangle vertices subject to direction constraints in the k-th constraint term; is the constraint direction of the triangle vertices subject to direction constraints in the k-th constraint term.

[0048] Direction field direction constraint one: To keep the words in the central area of the shape horizontal, add a central constraint inside the shape. Specifically, for each pixel point inside the shape, if the distance field value of this point is greater than a certain threshold (assumed to be threshold1), then this point needs to be a point in the current constraint term. For the points in such constraints, their constraint directions are all horizontal directions, that is, θ = 0.

[0049] Direction field direction constraint two: To make the direction of the vector field conform to the shape characteristics, add a central axis constraint inside the shape. Specifically, first perform a pruning and merging on the binary tree representing the central axis. If the sibling node of a leaf node is not a leaf node, then delete this leaf node and the central axis branch associated with this leaf node. If the sibling node of a leaf node is also a leaf node, then merge these two leaf nodes into a new node, and the branch of this node is the reverse extension line of the branches of the parent node of the two leaf nodes, and the coordinates of the node are the intersection points of this reverse extension line and the shape boundary. Traverse the binary tree. For the currently traversed node, uniformly sample on the branch contained in this node. If the distance field value of the sampled point is less than a certain threshold (assumed to be threshold2, threshold2 < threshold1), then this point needs to be a point in the current constraint term. For all points in such constraints, their constraint directions are the tangent directions of this point on the central axis.

[0050] Orientation field constraint three: To allow users to define the orientation of certain regions within a shape, user-defined orientation constraints are added. Specifically, through the interactive functions provided by the system, users can use the drawing tool to draw a curve at a certain location inside the shape, representing the desired vector field orientation at those locations. The system then samples this curve, and the resulting discrete points are used as points in the current constraint term. For all points in this type of constraint, the constraint direction is the tangent direction on the curve at that point.

[0051] It is important to note that during triangulation, the aforementioned directional constraint points are passed in as vertex parameters to ensure that the final triangle includes these directional constraint points.

[0052] After processing the text and shapes, a word cloud is laid out based on the results, generating a shape-constrained semantic word cloud. Before laying out the word cloud, preprocessing is performed: each group of words is sorted from highest to lowest frequency; the spiral is traversed, recording the region to which each position on the spiral belongs and the word group to which that region belongs, resulting in a list of coordinates of the points on the spiral contained in each word group. Word cloud layout process: Layout each group of words from the list of that group. The search is performed on each point in the list. The oriented bounding box algorithm is used to determine if a word collides with other words at that point, and then whether the word exceeds its designated area. If no collision is detected and the word does not exceed its designated area, it is placed at that position, with the placement direction determined by the vector field value at that position. After laying out each group of words, non-core words are used to fill in the shapes, making the overall word cloud layout more aesthetically pleasing. In the final word cloud layout, words from the same group will only be located in specific shape areas belonging to that group; that is, semantically similar words will be positioned close together in the word cloud.

[0053] The above description is merely a basic embodiment of the present invention, and is intended only to help understand the technical solution and core ideas of the present invention. It should be noted that those skilled in the art can make various improvements and modifications to the present invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

Claims

1. A method for automatically generating semantic word clouds with shape constraints, characterized in that, Includes the following steps: Step 1: Parse the text uploaded by the user, extract the words in the text, and calculate the frequency of the words; Step 2: Embed each word to obtain a set of word vectors, and use the word vectors to calculate the cosine similarity of each pair of words; Step 3: Construct a weighted undirected graph and use a network community partitioning algorithm to obtain multiple word groups; Step 4: Extract the outline points of the shape uploaded by the user to obtain a simple polygon, and calculate the centerline of the simple polygon; Step 5: Obtain the Venn diagram of the simple polygon by using its central axis; Step Six: Group the regions in the Venn diagram to determine the placement of words in each group; Step 7: Generate a spiral and determine the direction of movement of the spiral based on the current location of the spiral in the Vinograph region; Step 8: Calculate the vector field inside the shape based on the central axis constraint, center constraint, and user-defined direction constraint; Step 9: Determine the position and direction of each word based on the spiral line, vector field, and word region grouping, and arrange the words in this position and direction.

2. The method for automatically generating semantic word clouds with shape constraints according to claim 1, characterized in that, In step two, a word2vec model is trained using the Yelp dataset, the trained model is used to embed words, and then the cosine similarity between each pair of words is calculated.

3. The method for automatically generating semantic word clouds with shape constraints according to claim 1, characterized in that, In step three, a weighted undirected graph is constructed, where each word corresponds to a node in the graph, and the weight of the edge in the graph is the cosine similarity between two words; the Louvain community detection algorithm is used to group the graph nodes, resulting in multiple word groups.

4. The method for automatically generating semantic word clouds with shape constraints according to claim 1, characterized in that, In step four, the RL sequence algorithm is used to quickly calculate the central axis of a simple polygon, and finally the central axis is represented by a binary tree. In step five, several sides are added to the central axis to obtain a simple polygonal Veno diagram, which in turn yields multiple shape regions.

5. The method for automatically generating semantic word clouds with shape constraints according to claim 1, characterized in that, In step six, a shape region is assigned to each word group; pass: To obtain an optimal region allocation scheme; Where A i This represents the size of the region currently assigned to the i-th word group. Let ω be the area of ​​the region corresponding to the area grouped by the i-th word, and σ be the adjustable weight. k The variance of the number of parts of the k-th narrow region occupied by each word group.

6. The method for automatically generating semantic word clouds with shape constraints according to claim 1, characterized in that, In step seven, the formula is used. Gradually generate the spiral lines inside the shape; Where dx and dy are the current step sizes of the helix along the x and y axes, respectively; r is the distance between the current position of the helix and the starting point of the helix; a and dθ are user-specified parameters that can control the step size of the helix and the distance between two adjacent curves; N and T are the normal and tangential vectors of the current position of the helix, respectively. T can be obtained from the region where the current position of the spiral is located; If the current region is associated with an edge of a simple polygon, then T is the direction parallel to that edge; If the current region is associated with a concave point of a simple polygon, then T is the direction perpendicular to the line connecting the current position and the concave point.

7. The method for automatically generating semantic word clouds with shape constraints according to claim 1, characterized in that, In step seven, a multi-center spiral is generated: Generate a distance field inside the shape. If the distance field value of a point is greater than the distance field values ​​around that point, then that point can be used as a candidate center point. Sort all candidate center points in descending order of their distance field values, and start selecting from the point with the largest distance field value; If the distance between the point and all selected center points is greater than a given threshold, add the point to the set of selected center points. Start generating a spiral line from the selected center point with the largest distance field value, track the distance field value at each position of the spiral line, and stop when the distance field value decreases by val (an adjustable parameter), thus obtaining a central spiral line segment. Then continue from the next selected center point and repeat the above process. Stop when the last spiral line segment crosses the shape boundary, and finally obtain a multi-center spiral line.

8. The method for automatically generating semantic word clouds with shape constraints according to claim 1, characterized in that, In step eight, the following is achieved: Calculate the vector field inside the shape; Where T represents each triangle obtained after triangulation; i and j are a pair of vertices in the triangle; R i =(cos2θ) i sin2θ i );θ i Let be the direction of the vector field at vertex i of the triangle; k represents the number of directional constraint terms for the vector field. ω k The weight of the k-th constraint term; l k This represents the number of triangle vertices subject to directional constraints in the k-th constraint term; The constraint direction is the direction of the triangle vertex that is subject to direction constraints in the k-th constraint term; The constraint directions of a vector field include central axis constraints, center constraints, and user-defined constraints.

9. The method for automatically generating semantic word clouds with shape constraints according to claim 1, characterized in that, In step nine, the position and direction of each word are determined based on the spiral, vector field, and word region allocation information; the region where each point on the spiral is located is determined, and the points on the spiral contained in the region of each group are obtained. Group words are laid out independently. Iterate through the points on the spiral line contained in the region to which the word belongs. For each point, use the directional bounding box algorithm to determine whether the word collides with other words at the current point, and then determine whether the word exceeds its region. If no collision is detected and the word does not exceed its area, the word can be placed at the current point, with the placement direction being the vector field direction of the current point.

Citation Information

Patent Citations

  • Method and device for generating shape word cloud

    CN110189393A

  • Shape-constrained directional word cloud rapid generation method

    CN113033184A