wp2txt 1.1.3 → 2.1.0
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.
- checksums.yaml +4 -4
- data/.dockerignore +12 -0
- data/.github/workflows/ci.yml +13 -13
- data/.gitignore +14 -0
- data/CHANGELOG.md +284 -0
- data/DEVELOPMENT.md +415 -0
- data/DEVELOPMENT_ja.md +415 -0
- data/Dockerfile +19 -10
- data/Gemfile +2 -8
- data/README.md +259 -123
- data/README_ja.md +375 -0
- data/Rakefile +4 -0
- data/bin/wp2txt +863 -161
- data/lib/wp2txt/article.rb +98 -13
- data/lib/wp2txt/bz2_validator.rb +239 -0
- data/lib/wp2txt/category_cache.rb +313 -0
- data/lib/wp2txt/cli.rb +319 -0
- data/lib/wp2txt/cli_ui.rb +428 -0
- data/lib/wp2txt/config.rb +158 -0
- data/lib/wp2txt/constants.rb +134 -0
- data/lib/wp2txt/data/html_entities.json +2135 -0
- data/lib/wp2txt/data/language_metadata.json +4769 -0
- data/lib/wp2txt/data/language_tiers.json +59 -0
- data/lib/wp2txt/data/mediawiki_aliases.json +12366 -0
- data/lib/wp2txt/data/template_aliases.json +193 -0
- data/lib/wp2txt/data/wikipedia_entities.json +12 -0
- data/lib/wp2txt/extractor.rb +545 -0
- data/lib/wp2txt/file_utils.rb +91 -0
- data/lib/wp2txt/formatter.rb +352 -0
- data/lib/wp2txt/global_data_cache.rb +353 -0
- data/lib/wp2txt/index_cache.rb +258 -0
- data/lib/wp2txt/magic_words.rb +353 -0
- data/lib/wp2txt/memory_monitor.rb +236 -0
- data/lib/wp2txt/multistream.rb +1383 -0
- data/lib/wp2txt/output_writer.rb +182 -0
- data/lib/wp2txt/parser_functions.rb +606 -0
- data/lib/wp2txt/ractor_worker.rb +215 -0
- data/lib/wp2txt/regex.rb +396 -12
- data/lib/wp2txt/section_extractor.rb +354 -0
- data/lib/wp2txt/stream_processor.rb +271 -0
- data/lib/wp2txt/template_expander.rb +830 -0
- data/lib/wp2txt/text_processing.rb +337 -0
- data/lib/wp2txt/utils.rb +629 -270
- data/lib/wp2txt/version.rb +1 -1
- data/lib/wp2txt.rb +53 -26
- data/scripts/benchmark_regex.rb +161 -0
- data/scripts/fetch_html_entities.rb +94 -0
- data/scripts/fetch_language_metadata.rb +180 -0
- data/scripts/fetch_mediawiki_data.rb +334 -0
- data/scripts/fetch_template_data.rb +186 -0
- data/scripts/profile_memory.rb +139 -0
- data/spec/article_spec.rb +402 -0
- data/spec/auto_download_spec.rb +314 -0
- data/spec/bz2_validator_spec.rb +193 -0
- data/spec/category_cache_spec.rb +226 -0
- data/spec/category_fetcher_spec.rb +504 -0
- data/spec/cleanup_spec.rb +197 -0
- data/spec/cli_options_spec.rb +678 -0
- data/spec/cli_spec.rb +876 -0
- data/spec/config_spec.rb +194 -0
- data/spec/constants_spec.rb +138 -0
- data/spec/file_utils_spec.rb +170 -0
- data/spec/fixtures/samples.rb +181 -0
- data/spec/formatter_sections_spec.rb +382 -0
- data/spec/global_data_cache_spec.rb +186 -0
- data/spec/index_cache_spec.rb +210 -0
- data/spec/integration_spec.rb +543 -0
- data/spec/magic_words_spec.rb +261 -0
- data/spec/markers_spec.rb +476 -0
- data/spec/memory_monitor_spec.rb +192 -0
- data/spec/multistream_spec.rb +690 -0
- data/spec/output_writer_spec.rb +400 -0
- data/spec/parser_functions_spec.rb +455 -0
- data/spec/ractor_worker_spec.rb +197 -0
- data/spec/regex_spec.rb +281 -0
- data/spec/section_extractor_spec.rb +397 -0
- data/spec/spec_helper.rb +63 -0
- data/spec/stream_processor_spec.rb +579 -0
- data/spec/template_data_spec.rb +246 -0
- data/spec/template_expander_spec.rb +472 -0
- data/spec/template_processing_spec.rb +217 -0
- data/spec/text_processing_spec.rb +312 -0
- data/spec/utils_spec.rb +195 -16
- data/spec/wp2txt_spec.rb +510 -0
- data/wp2txt.gemspec +5 -3
- metadata +146 -18
- data/.rubocop.yml +0 -80
- data/data/output_samples/testdata_en.txt +0 -23002
- data/data/output_samples/testdata_en_category.txt +0 -132
- data/data/output_samples/testdata_en_summary.txt +0 -1376
- data/data/output_samples/testdata_ja.txt +0 -22774
- data/data/output_samples/testdata_ja_category.txt +0 -206
- data/data/output_samples/testdata_ja_summary.txt +0 -1560
- data/data/testdata_en.bz2 +0 -0
- data/data/testdata_ja.bz2 +0 -0
- data/image/screenshot.png +0 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"description": "Language tier configuration for validation framework",
|
|
4
|
+
"version": "1.1.0",
|
|
5
|
+
"updated_at": "2026-01-08"
|
|
6
|
+
},
|
|
7
|
+
"tiers": {
|
|
8
|
+
"tier1": {
|
|
9
|
+
"name": "Primary",
|
|
10
|
+
"description": "Core quality assurance - English as reference language",
|
|
11
|
+
"languages": {
|
|
12
|
+
"en": 10000
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"tier2": {
|
|
16
|
+
"name": "Multilingual Validation",
|
|
17
|
+
"description": "Keyword and namespace validation for major languages",
|
|
18
|
+
"languages": {
|
|
19
|
+
"ja": 5000,
|
|
20
|
+
"zh": 3000,
|
|
21
|
+
"ru": 3000,
|
|
22
|
+
"ar": 3000,
|
|
23
|
+
"ko": 3000
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"tier3": {
|
|
27
|
+
"name": "Coverage",
|
|
28
|
+
"description": "Major language coverage testing",
|
|
29
|
+
"default_sample_size": 50,
|
|
30
|
+
"languages": [
|
|
31
|
+
"de", "fr", "es", "pt", "it", "nl", "pl", "sv", "vi", "uk",
|
|
32
|
+
"fa", "he", "id", "cs", "fi", "hu", "ro", "tr", "th", "da",
|
|
33
|
+
"no", "sk", "bg", "hr", "sr", "sl", "lt", "lv", "et", "el",
|
|
34
|
+
"ca", "ms", "hi", "bn", "ta", "te", "mr", "ml", "kn", "gu",
|
|
35
|
+
"pa", "ur", "az", "ka", "hy", "be", "kk", "uz", "tg", "ky"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"tier4": {
|
|
39
|
+
"name": "Smoke Test",
|
|
40
|
+
"description": "Basic functionality verification for all other languages",
|
|
41
|
+
"default_sample_size": 10,
|
|
42
|
+
"languages": "_remaining"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"test_levels": {
|
|
46
|
+
"smoke": {
|
|
47
|
+
"description": "Quick smoke test - uses tier-defined sample sizes",
|
|
48
|
+
"multiplier": 1.0
|
|
49
|
+
},
|
|
50
|
+
"standard": {
|
|
51
|
+
"description": "Standard validation - uses tier-defined sample sizes",
|
|
52
|
+
"multiplier": 1.0
|
|
53
|
+
},
|
|
54
|
+
"thorough": {
|
|
55
|
+
"description": "Thorough validation - 2x tier-defined sample sizes",
|
|
56
|
+
"multiplier": 2.0
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|