Filter data out into separate files

This commit is contained in:
2025-05-16 09:22:28 +02:00
parent cf95f85caa
commit d7f7f9cd19
5 changed files with 1893 additions and 2156 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,18 @@
const Map<int, List<String>> RADICALS = {
1: ['', '', '', '', '', ''],
2: ['', '', '', '', '𠆢', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '𠂉'],
3: ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '广', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''],
4: ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''],
5: ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''],
6: ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '西'],
7: ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''],
8: ['', '', '', '', '', '', '', '', '', '', '', ''],
9: ['', '', '', '', '', '', '', '', '', '', ''],
10: ['', '', '', '', '', '', '', '', '', ''],
11: ['', '', '', '鹿', '', '', '', '', ''],
12: ['', '', '', ''],
13: ['', '', '', ''],
14: ['', ''],
17: [''],
};

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,9 @@
import 'package:collection/collection.dart';
import 'package:jadb/util/jouyou_kanji.dart';
import 'package:jadb/const_data/kanji_grades.dart';
import 'package:test/test.dart';
void main() {
test("Assert 2136 kanji in jouyou set", () {
expect(JOUYOU_KANJI.values.flattenedToSet.length, 2136);
expect(JOUYOU_KANJI_BY_GRADES.values.flattenedToSet.length, 2136);
});
}

View File

@@ -1,4 +1,4 @@
import 'package:jadb/util/jouyou_kanji.dart';
import 'package:jadb/const_data/kanji_grades.dart';
import 'package:test/test.dart';
import 'setup_database_connection.dart';
@@ -12,7 +12,7 @@ void main() {
});
group("Search all jouyou kanji", () {
JOUYOU_KANJI.forEach((grade, characters) {
JOUYOU_KANJI_BY_GRADES.forEach((grade, characters) {
test("Search all kanji in grade $grade", () async {
final connection = await setup_database_connection();