releaseparser: adopt fixed positional model, auto-detect catalogues, add GB doc-blocks
Parse releases with an explicit fixed positional model and document the whole logic in British English doc-blocks. Model: - [0]=Artist, [1]=Title are fixed and never matched against dictionaries, so titles like "Split"/"Demo"/"De" are never eaten. - [len-1]=Group is always read from the line, not from the query key. - [len-2]=Year when it is a 4-digit 19xx|20xx token; otherwise the slot is resolved as a middle-zone token (e.g. FLAC still picked up as format). - The middle zone is resolved via case-insensitive dictionaries in the order format -> source -> bit-depth -> resolution -> edition -> language -> catalogue number. Position within the zone is irrelevant. Catalogue numbers: - Any "(...)" token in the middle zone is a catalogue number regardless of content (digits, roman numerals, dots, underscores, mixed case). Removed the hasDigit requirement and character whitelist that rejected real catalogues like (DYN.3140-2) and (GOWP_DCCCLXXXIX). - Splitting never breaks tokens inside parentheses. Case handling: lookups are case-insensitive; stored values keep their original case from the line. Documentation: replaced Ukrainian comments in parser.go and analyzer.go with British-English doc-blocks describing the model, tail resolution order, catalogue rule and confidence scoring. Tests: - Add TestParseCatalogNumberWithDotAndRoman for (DYN.3140-2)/(GOWP_DCCCLXXXIX). - Update case-insensitive, split-title, no-year and language expectations. - go build, go vet and go test all pass.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
# {bit_depth}
|
||||
16BIT
|
||||
24BIT
|
||||
32BIT
|
||||
DE16BIT
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
REPACK
|
||||
REAL_REPACK
|
||||
READNFO
|
||||
READNFO
|
||||
PROPER
|
||||
RERIP
|
||||
|
||||
@@ -17,4 +17,41 @@ LIMITED_EDITION_BOXSET
|
||||
REMASTERED_EP
|
||||
10TH_ANNIVERSARY_EDITION
|
||||
OST
|
||||
XX_Legacy_Edition
|
||||
REISSUE_DEMO
|
||||
JP_Deluxe_Edition
|
||||
Remastered_Edition
|
||||
Anniversary_Edition
|
||||
Limited_Edition
|
||||
CDS
|
||||
CDM
|
||||
RETAIL
|
||||
JP_RETAIL
|
||||
JP_REISSUE
|
||||
DEMO_REMASTERED
|
||||
EU_RETAIL
|
||||
DE_RETAIL
|
||||
REISSUE_DELUXE_EDITION
|
||||
RETAIL_REISSUE
|
||||
SPECIAL_EDITION
|
||||
SPECIAL_COLLECTORS_EDITION_REMASTERED
|
||||
30_YEARS_SPECIAL_COLLECTORS_EDITION_REMASTERED
|
||||
LIMITED_EDITION_REMASTERED
|
||||
DEMO_REISSUE
|
||||
REMASTERED_REISSUE
|
||||
PROMO_DEMO
|
||||
REISSUE_EP
|
||||
MAG
|
||||
REISSUE_BOXSET
|
||||
30TH_ANNIVERSARY_EDITION_REMASTERED
|
||||
Deluxe_Edition_Reissue
|
||||
INSTRUMENTAL
|
||||
REISSUE_EXPANDED_EDITION
|
||||
BOOTLEG
|
||||
EXPANDED_EDITION
|
||||
ADVANCE
|
||||
15TH_ANNIVERSARY_DELUXE_EDITION
|
||||
TOUR_EDITION
|
||||
REMASTERED_DEMO
|
||||
REMASTERED_DELUXE_EDITION
|
||||
30TH_ANNIVERSARY_EDITION
|
||||
@@ -17,3 +17,17 @@ AT
|
||||
IS
|
||||
UA
|
||||
JP
|
||||
GR
|
||||
CN
|
||||
RU
|
||||
ID
|
||||
PH
|
||||
BY
|
||||
CZ
|
||||
RS
|
||||
DA
|
||||
HI
|
||||
CH
|
||||
LU
|
||||
CY
|
||||
EE
|
||||
@@ -1,6 +1,7 @@
|
||||
# {resolution} — частота дискретизації
|
||||
44KHZ
|
||||
48KHZ
|
||||
48.0kHz
|
||||
88KHZ
|
||||
96KHZ
|
||||
176KHZ
|
||||
|
||||
@@ -8,4 +8,25 @@ VINYL
|
||||
TAPE
|
||||
CDR
|
||||
17CD
|
||||
3CD
|
||||
3CD
|
||||
4CD
|
||||
18CD
|
||||
3CDEP
|
||||
DVD
|
||||
7CD
|
||||
2CDR
|
||||
10CD
|
||||
6CD
|
||||
2CDEP
|
||||
2VINYL
|
||||
CDREP
|
||||
LP
|
||||
2LP
|
||||
3TAPE
|
||||
25CD
|
||||
WEBFLAC
|
||||
2TAPE
|
||||
BLURAY
|
||||
VLS
|
||||
MCD
|
||||
24BIT_WEB
|
||||
Reference in New Issue
Block a user