diff --git a/Sources/SweetCardScanner/CreditCardScanner/ImageAnalyzer.swift b/Sources/SweetCardScanner/CreditCardScanner/ImageAnalyzer.swift index bf2be41..cb2c6a6 100644 --- a/Sources/SweetCardScanner/CreditCardScanner/ImageAnalyzer.swift +++ b/Sources/SweetCardScanner/CreditCardScanner/ImageAnalyzer.swift @@ -54,9 +54,9 @@ final class ImageAnalyzer { let creditCardNumber: Regex = #"(?:\d[ -]*?){13,16}"# let month: Regex = #"(\d{2})\/\d{2}"# let year: Regex = #"\d{2}\/(\d{2})"# - let wordsToSkip = ["mastercard", "jcb", "visa", "express", "bank", "card", "platinum", "reward", "check", "credit", "american", "express"] + let wordsToSkip = ["mastercard", "jcb", "visa", "express", "bank", "card", "platinum", "reward", "check", "credit", "american", "express", "cashbag", "keb", "nhcard", "global", "hyundai", "zero", "kakaobank", "thru", "authorized", "signature", "authorized signature", "hyundai card", "nonghyup", "payon", "money"] // These may be contained in the date strings, so ignore them only for names - let invalidNames = ["expiration", "valid", "since", "from", "until", "month", "year", "member", "since"] + let invalidNames = ["expiration", "valid", "since", "from", "until", "month", "year", "member"] let name: Regex = #"([A-z]{2,}\h([A-z.]+\h)?[A-z]{2,})"# guard let results = request.results as? [VNRecognizedTextObservation] else { return } diff --git a/Tests/SweetCardScannerTests/SweetCardScannerTests.swift b/Tests/SweetCardScannerTests/SweetCardScannerTests.swift index 8bde47e..81861e1 100644 --- a/Tests/SweetCardScannerTests/SweetCardScannerTests.swift +++ b/Tests/SweetCardScannerTests/SweetCardScannerTests.swift @@ -6,7 +6,7 @@ final class SweetCardScannerTests: XCTestCase { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct // results. - XCTAssertEqual(SweetCardScanner().text, "Hello, World!") +// XCTAssertEqual(SweetCardScanner().text, "Hello, World!") } static var allTests = [