-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataGenerator.java
More file actions
92 lines (75 loc) · 3.24 KB
/
DataGenerator.java
File metadata and controls
92 lines (75 loc) · 3.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
package byteblocks;
import java.util.*;
public class DataGenerator {
private static final Random random = new Random();
// Adjective/descriptor words
private static final String[] ADJECTIVES = {
"Smart", "Quick", "Dynamic", "Advanced", "Modern", "Secure", "Rapid",
"Efficient", "Flexible", "Robust", "Elegant", "Powerful", "Simple",
"Clean", "Fast", "Intelligent", "Adaptive", "Scalable", "Reliable"
};
// Action/verb words
private static final String[] ACTIONS = {
"Stream", "Process", "Build", "Create", "Manage", "Handle", "Track",
"Monitor", "Parse", "Transform", "Analyze", "Generate", "Execute",
"Control", "Navigate", "Connect", "Sync", "Flow", "Bridge", "Forge"
};
// Object/noun words
private static final String[] OBJECTS = {
"Engine", "Core", "Hub", "Portal", "Gateway", "Manager", "Builder",
"Processor", "Handler", "Controller", "Monitor", "Tracker", "Analyzer",
"Generator", "Connector", "Bridge", "Flow", "Stream", "Cache", "Store",
"Service", "Tool", "Utility", "Framework", "Platform", "System"
};
// Tech-related words
private static final String[] TECH_WORDS = {
"Data", "Code", "Logic", "Config", "System", "Network", "Cloud",
"API", "Service", "Client", "Server", "Database", "File", "Task",
"Event", "Message", "Request", "Response", "Session", "Cache"
};
// Project categories with specific word combinations
private static final String[][] CATEGORIES = {
{"Velocity", "Nexus", "Catalyst", "Prism", "Phoenix", "Quantum", "Digital"},
{"Byte", "Logic", "Config", "Task", "File", "System", "Process"},
{"Invoice", "Client", "Report", "Workflow", "Business", "Enterprise"},
{"Pixel", "Action", "Game", "Play", "Arena", "Quest", "Adventure"},
{"Data", "Analytics", "Transform", "Parse", "Stream", "Mining"}
};
public static String generatePatternName() {
String adjective = randomElement(ADJECTIVES);
String object = randomElement(OBJECTS);
return adjective + object;
}
public static String generateCategoryName() {
String[] category = randomElement(CATEGORIES);
String prefix = randomElement(category);
String suffix = randomElement(OBJECTS);
return prefix + suffix;
}
public static String generateCompoundName() {
String action = randomElement(ACTIONS);
String object = randomElement(OBJECTS);
return action + object;
}
public static String generateTechName() {
String tech = randomElement(TECH_WORDS);
String suffix = randomElement(OBJECTS);
return tech + suffix;
}
public static String randomName() {
int pattern = random.nextInt(4);
switch (pattern) {
case 1:
return generateCategoryName();
case 2:
return generateCompoundName();
case 3:
return generateTechName();
default:
return generatePatternName();
}
}
private static <T> T randomElement(T[] array) {
return array[random.nextInt(array.length)];
}
}