son-logic-engine 0.2.3__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {son_logic_engine-0.2.3 → son_logic_engine-0.2.4}/Cargo.lock +1 -1
- {son_logic_engine-0.2.3 → son_logic_engine-0.2.4}/Cargo.toml +1 -1
- {son_logic_engine-0.2.3 → son_logic_engine-0.2.4}/PKG-INFO +1 -1
- son_logic_engine-0.2.4/encoding_map.json +29 -0
- {son_logic_engine-0.2.3 → son_logic_engine-0.2.4}/pyproject.toml +1 -1
- {son_logic_engine-0.2.3 → son_logic_engine-0.2.4}/src/lib.rs +3 -3
- son_logic_engine-0.2.3/encoding_map.json +0 -150
- {son_logic_engine-0.2.3 → son_logic_engine-0.2.4}/README.md +0 -0
- {son_logic_engine-0.2.3 → son_logic_engine-0.2.4}/sample_data/README.md +0 -0
- {son_logic_engine-0.2.3 → son_logic_engine-0.2.4}/sample_data/anscombe.json +0 -0
- {son_logic_engine-0.2.3 → son_logic_engine-0.2.4}/sample_data/california_housing_test.csv +0 -0
- {son_logic_engine-0.2.3 → son_logic_engine-0.2.4}/sample_data/california_housing_train.csv +0 -0
- {son_logic_engine-0.2.3 → son_logic_engine-0.2.4}/sample_data/mnist_test.csv +0 -0
- {son_logic_engine-0.2.3 → son_logic_engine-0.2.4}/sample_data/mnist_train_small.csv +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"a": 0.1,
|
|
3
|
+
"b": 0.2,
|
|
4
|
+
"c": 0.3,
|
|
5
|
+
"d": 0.4,
|
|
6
|
+
"e": 0.5,
|
|
7
|
+
"f": 0.6,
|
|
8
|
+
"g": 0.7,
|
|
9
|
+
"h": 0.8,
|
|
10
|
+
"i": 0.9,
|
|
11
|
+
"j": 1.0,
|
|
12
|
+
"k": 1.1,
|
|
13
|
+
"l": 1.2,
|
|
14
|
+
"m": 1.3,
|
|
15
|
+
"n": 1.4,
|
|
16
|
+
"o": 1.5,
|
|
17
|
+
"p": 1.6,
|
|
18
|
+
"q": 1.7,
|
|
19
|
+
"r": 1.8,
|
|
20
|
+
"s": 1.9,
|
|
21
|
+
"t": 2.0,
|
|
22
|
+
"u": 2.1,
|
|
23
|
+
"v": 2.2,
|
|
24
|
+
"w": 2.3,
|
|
25
|
+
"x": 2.4,
|
|
26
|
+
"y": 2.5,
|
|
27
|
+
"z": 2.6,
|
|
28
|
+
" ": 0.0
|
|
29
|
+
}
|
|
@@ -5,7 +5,7 @@ build-backend = "maturin"
|
|
|
5
5
|
|
|
6
6
|
[project]
|
|
7
7
|
name = "son_logic_engine"
|
|
8
|
-
version = "0.2.3
|
|
8
|
+
version = "0.2.4" # Tạm thời để 0.2.3, sẽ được cập nhật lên 0.2.4
|
|
9
9
|
description = "High-performance Rust search engine for RAG systems"
|
|
10
10
|
authors = [{name = "Son", email = "sonbuwin@gmail.com"}]
|
|
11
11
|
readme = "README.md"
|
|
@@ -20,7 +20,7 @@ fn load_mapping(path: String) -> PyResult<HashMap<char, f64>> {
|
|
|
20
20
|
// Hàm helper mới: Trả về (Nội dung để search, Toàn bộ Object dưới dạng JSON String)
|
|
21
21
|
fn process_item_full(item: &Bound<'_, PyAny>, field_name: &Option<String>, flat_db: &mut Vec<(String, String)>) {
|
|
22
22
|
let py = item.py();
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
// Nếu là Dictionary
|
|
25
25
|
if let Ok(dict_obj) = item.extract::<HashMap<String, Bound<'_, PyAny>>>() {
|
|
26
26
|
// Convert toàn bộ dict sang JSON string để lưu trữ
|
|
@@ -35,14 +35,14 @@ fn process_item_full(item: &Bound<'_, PyAny>, field_name: &Option<String>, flat_
|
|
|
35
35
|
// Nếu không chọn field, gộp toàn bộ text trong dict để search
|
|
36
36
|
let mut all_text = String::new();
|
|
37
37
|
for (_, val) in dict_obj {
|
|
38
|
-
if let Ok(s) = val.extract::<String>() {
|
|
38
|
+
if let Ok(s) = val.extract::<String>() {
|
|
39
39
|
all_text.push_str(&s);
|
|
40
40
|
all_text.push(' ');
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
flat_db.push((all_text, full_json));
|
|
44
44
|
}
|
|
45
|
-
}
|
|
45
|
+
}
|
|
46
46
|
// Nếu là List
|
|
47
47
|
else if let Ok(list_any) = item.extract::<Vec<Bound<'_, PyAny>>>() {
|
|
48
48
|
for sub_item in list_any {
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"a": 1.0,
|
|
3
|
-
"b": 2.0,
|
|
4
|
-
"c": 3.0,
|
|
5
|
-
"d": 4.0,
|
|
6
|
-
"e": 5.0,
|
|
7
|
-
"f": 6.0,
|
|
8
|
-
"g": 7.0,
|
|
9
|
-
"h": 8.0,
|
|
10
|
-
"i": 9.0,
|
|
11
|
-
"j": 10.0,
|
|
12
|
-
"k": 11.0,
|
|
13
|
-
"l": 12.0,
|
|
14
|
-
"m": 13.0,
|
|
15
|
-
"n": 14.0,
|
|
16
|
-
"o": 15.0,
|
|
17
|
-
"p": 16.0,
|
|
18
|
-
"q": 17.0,
|
|
19
|
-
"r": 18.0,
|
|
20
|
-
"s": 19.0,
|
|
21
|
-
"t": 20.0,
|
|
22
|
-
"u": 21.0,
|
|
23
|
-
"v": 22.0,
|
|
24
|
-
"w": 23.0,
|
|
25
|
-
"x": 24.0,
|
|
26
|
-
"y": 25.0,
|
|
27
|
-
"z": 26.0,
|
|
28
|
-
"A": 27.0,
|
|
29
|
-
"B": 28.0,
|
|
30
|
-
"C": 29.0,
|
|
31
|
-
"D": 30.0,
|
|
32
|
-
"E": 31.0,
|
|
33
|
-
"F": 32.0,
|
|
34
|
-
"G": 33.0,
|
|
35
|
-
"H": 34.0,
|
|
36
|
-
"I": 35.0,
|
|
37
|
-
"J": 36.0,
|
|
38
|
-
"K": 37.0,
|
|
39
|
-
"L": 38.0,
|
|
40
|
-
"M": 39.0,
|
|
41
|
-
"N": 40.0,
|
|
42
|
-
"O": 41.0,
|
|
43
|
-
"P": 42.0,
|
|
44
|
-
"Q": 43.0,
|
|
45
|
-
"R": 44.0,
|
|
46
|
-
"S": 45.0,
|
|
47
|
-
"T": 46.0,
|
|
48
|
-
"U": 47.0,
|
|
49
|
-
"V": 48.0,
|
|
50
|
-
"W": 49.0,
|
|
51
|
-
"X": 50.0,
|
|
52
|
-
"Y": 51.0,
|
|
53
|
-
"Z": 52.0,
|
|
54
|
-
"0": 53.0,
|
|
55
|
-
"1": 54.0,
|
|
56
|
-
"2": 55.0,
|
|
57
|
-
"3": 56.0,
|
|
58
|
-
"4": 57.0,
|
|
59
|
-
"5": 58.0,
|
|
60
|
-
"6": 59.0,
|
|
61
|
-
"7": 60.0,
|
|
62
|
-
"8": 61.0,
|
|
63
|
-
"9": 62.0,
|
|
64
|
-
"!": 63.0,
|
|
65
|
-
"\"": 64.0,
|
|
66
|
-
"#": 65.0,
|
|
67
|
-
"$": 66.0,
|
|
68
|
-
"%": 67.0,
|
|
69
|
-
"&": 68.0,
|
|
70
|
-
"'": 69.0,
|
|
71
|
-
"(": 70.0,
|
|
72
|
-
")": 71.0,
|
|
73
|
-
"*": 72.0,
|
|
74
|
-
"+": 73.0,
|
|
75
|
-
",": 74.0,
|
|
76
|
-
"-": 75.0,
|
|
77
|
-
".": 76.0,
|
|
78
|
-
"/": 77.0,
|
|
79
|
-
":": 78.0,
|
|
80
|
-
";": 79.0,
|
|
81
|
-
"<": 80.0,
|
|
82
|
-
"=": 81.0,
|
|
83
|
-
">": 82.0,
|
|
84
|
-
"?": 83.0,
|
|
85
|
-
"@": 84.0,
|
|
86
|
-
"[": 85.0,
|
|
87
|
-
"\\": 86.0,
|
|
88
|
-
"]": 87.0,
|
|
89
|
-
"^": 88.0,
|
|
90
|
-
"_": 89.0,
|
|
91
|
-
"`": 90.0,
|
|
92
|
-
"{": 91.0,
|
|
93
|
-
"|": 92.0,
|
|
94
|
-
"}": 93.0,
|
|
95
|
-
"~": 94.0,
|
|
96
|
-
" ": 95.0,
|
|
97
|
-
"̑": 96.0,
|
|
98
|
-
"̆": 97.0,
|
|
99
|
-
"̂": 98.0,
|
|
100
|
-
"đ": 99.0,
|
|
101
|
-
"̀": 100.0,
|
|
102
|
-
"́": 101.0,
|
|
103
|
-
"̉": 102.0,
|
|
104
|
-
"̃": 103.0,
|
|
105
|
-
"̣": 104.0,
|
|
106
|
-
"̛": 105.0,
|
|
107
|
-
"→": 106.0,
|
|
108
|
-
"⇒": 107.0,
|
|
109
|
-
"∑": 108.0,
|
|
110
|
-
"≈": 109.0,
|
|
111
|
-
"≠": 110.0,
|
|
112
|
-
"≤": 111.0,
|
|
113
|
-
"≥": 112.0,
|
|
114
|
-
"∆": 113.0,
|
|
115
|
-
"∞": 114.0,
|
|
116
|
-
"∫": 115.0,
|
|
117
|
-
"π": 116.0,
|
|
118
|
-
"±": 117.0,
|
|
119
|
-
"×": 118.0,
|
|
120
|
-
"÷": 119.0,
|
|
121
|
-
"√": 120.0,
|
|
122
|
-
"∂": 121.0,
|
|
123
|
-
"µ": 122.0,
|
|
124
|
-
"€": 123.0,
|
|
125
|
-
"£": 124.0,
|
|
126
|
-
"¥": 125.0,
|
|
127
|
-
"©": 126.0,
|
|
128
|
-
"®": 127.0,
|
|
129
|
-
"™": 128.0,
|
|
130
|
-
"§": 129.0,
|
|
131
|
-
"°": 130.0,
|
|
132
|
-
"¬": 131.0,
|
|
133
|
-
"¶": 132.0,
|
|
134
|
-
"…": 133.0,
|
|
135
|
-
"«": 134.0,
|
|
136
|
-
"»": 135.0,
|
|
137
|
-
"‹": 136.0,
|
|
138
|
-
"›": 137.0,
|
|
139
|
-
"“": 138.0,
|
|
140
|
-
"”": 139.0,
|
|
141
|
-
"‘": 140.0,
|
|
142
|
-
"’": 141.0,
|
|
143
|
-
"•": 142.0,
|
|
144
|
-
"·": 143.0,
|
|
145
|
-
"‐": 144.0,
|
|
146
|
-
"‑": 145.0,
|
|
147
|
-
"‒": 146.0,
|
|
148
|
-
"–": 147.0,
|
|
149
|
-
"—": 148.0
|
|
150
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|