Skip to content

Commit e3e07fc

Browse files
committed
improve: extract an imperforation flag from more number of abbreviations.
Fix #1353
1 parent 1ec7639 commit e3e07fc

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

src/main/java/ru/mystamps/web/feature/series/importing/SeriesInfoExtractorServiceImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,13 @@ public SeriesExtractedInfo extract(String pageUrl, RawParsedDataDto data) {
297297

298298
boolean withoutPerforation =
299299
StringUtils.containsIgnoreCase(fragment, "б/з")
300+
|| StringUtils.containsIgnoreCase(fragment, \\з")
300301
|| StringUtils.containsIgnoreCase(fragment, "б.з.")
301302
|| StringUtils.containsIgnoreCase(fragment, "БЗ")
302303
|| StringUtils.containsIgnoreCase(fragment, "без зуб")
303304
|| StringUtils.containsIgnoreCase(fragment, "беззубцовые")
305+
|| StringUtils.containsIgnoreCase(fragment, "без перф.")
306+
|| StringUtils.containsIgnoreCase(fragment, "неперфорированный")
304307
|| StringUtils.containsIgnoreCase(fragment, "б/перфорации")
305308
|| StringUtils.containsIgnoreCase(fragment, "без перфорации");
306309
if (withoutPerforation) {

src/test/groovy/ru/mystamps/web/feature/series/importing/SeriesInfoExtractorServiceImplTest.groovy

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -449,17 +449,20 @@ class SeriesInfoExtractorServiceImplTest extends Specification {
449449
expect:
450450
service.extractPerforated(fragment) == false
451451
where:
452-
fragment | _
453-
'б.з.' | _
454-
'б/з' | _
455-
'Б/З' | _
456-
'БЗ' | _
457-
'беззубцовые' | _
458-
'БЕЗЗУБЦОВЫЕ' | _
459-
'Без перфорации' | _
460-
'б/перфорации' | _
461-
'без зуб' | _
462-
'без зубцов' | _
452+
fragment | _
453+
'б.з.' | _
454+
'б/з' | _
455+
'Б/З' | _
456+
'БЗ' | _
457+
'беззубцовые' | _
458+
'БЕЗЗУБЦОВЫЕ' | _
459+
'Без перфорации' | _
460+
'б/перфорации' | _
461+
'без перф.' | _
462+
'без зуб' | _
463+
'без зубцов' | _
464+
'Динозавры (б\\з)' | _
465+
'Динозавры (неперфорированный, красный)' | _
463466
}
464467

465468
//

0 commit comments

Comments
 (0)