commit b15d7b644227befd00c20675fc37c2f04ffdb19e
parent 800f184698ba15ffbad1e479b21e1b03cb23e752
Author: Vint Leenaars <vl.software@leenaa.rs>
Date: Thu, 8 May 2025 17:33:19 +0200
Add entity matching
Diffstat:
14 files changed, 1146 insertions(+), 1000 deletions(-)
diff --git a/config.dhall b/config.dhall
@@ -6,14 +6,15 @@
-- Verbosity levels
let Verbosity = < Test | Silent | Info | Errors | Debug >
-in { verbosity = Verbosity.Silent
- , ssl_location = "files/consolidated-list_2024-07-30.xml"
- , threshold_ratio = 0.8 -- Percentage
- , threshold_points = 200 -- Points needed to flag entry as match
- , perfect_points = 300 -- Amount of points required to get 100% confidence
- , points_address = 150
- , points_date = 100
- , points_id = 200
- , points_name = 125
- , points_nationality = 50
+in { verbosity = Verbosity.Silent
+ , ssl_location = "files/consolidated-list_2024-07-30.xml"
+ , threshold_ratio = 0.8 -- Percentage
+ , threshold_points = 200 -- Points needed to flag entry as match
+ , threshold_confidence = 0.67 -- Minimun confidence needed to pass
+ , perfect_points = 300 -- Amount of points required to get 100% confidence
+ , points_address = 150
+ , points_date = 100
+ , points_id = 200
+ , points_name = 125
+ , points_nationality = 50
}
diff --git a/src/KYCheck/Check.hs b/src/KYCheck/Check.hs
@@ -41,7 +41,7 @@ data Score = Score
{ match_quality :: Float
, confidence :: Float
, expiration :: Int
- , references :: [Int]
+ , reference :: Int
} deriving (Show, Eq)
suspicious_dates :: (Int, Int)
@@ -52,29 +52,33 @@ type QualityFloat = Quality Float
checkEntity :: Config -> Map Int Entity -> LegalEntity -> [Score]
-checkEntity config entities' entity = map (\(confidence', reference') ->
- Score { match_quality = 0
- , confidence = confidence'
- , expiration = 0
- , references = [reference']
- }
- ) $ findMatchingEntities config entity $ toList entities'
-
-findMatchingEntities :: Config -> LegalEntity -> [(Int, Entity)] -> [(Float, Int)]
+checkEntity config entities' entity = findMatchingEntities config entity $ toList entities'
+
+findMatchingEntities :: Config -> LegalEntity -> [(Int, Entity)] -> [Score]
findMatchingEntities _ _ [] = []
findMatchingEntities config entity ((ssid,ent):ents) =
let
- points = compareEntity config entity ent
- score = if points >= 300 then 1 else points / 300
+ points = compareEntity config entity ent
+ max_points = foldl1 (+) [ if toList (entity_addresses ent) == [] then 0 else weight_address config
+ , if toList (entity_names ent) == [] then 0 else weight_name config
+ ]
in
- if points >= threshold_points config
- then (score,ssid):findMatchingEntities config entity ents
+ if points >= threshold_points config || points / max_points >= threshold_confidence config
+ then let
+ score = Score { match_quality = if points >= perfect_points config then 1 else points / perfect_points config
+ , confidence = points / max_points
+ , expiration = 0
+ , reference = ssid
+ }
+ in
+ score:findMatchingEntities config entity ents
else findMatchingEntities config entity ents
compareEntity :: Config -> LegalEntity -> Entity -> Float
compareEntity config legal_entity entity =
foldl1 (+) [ multFloats 300 address_score (removeQuality . removeSSID)
, multFloats 300 name_score (removeQuality . removeSSID)
+ -- TODO: add additional information to score (phone, email, ...)
-- , multFloats 300 info_score removeSSID
]
where address_score = checkAddress config (entity_addresses entity) (address legal_entity)
@@ -83,17 +87,12 @@ compareEntity config legal_entity entity =
-checkPersons :: Config -> Map Int Individual -> NaturalPerson -> Score
-checkPersons config individuals' person = Score { match_quality = 0
- , confidence = confidence'
- , expiration = 0
- , references = references'
- }
- where (confidence', references') = checkPersons' config person (0, []) $ toList individuals'
+checkPersons :: Config -> Map Int Individual -> NaturalPerson -> [Score]
+checkPersons config individuals' person = checkPersons' config person $ toList individuals'
-checkPersons' :: Config -> NaturalPerson -> (Float, [Int]) -> [(Int, Individual)] -> (Float, [Int])
-checkPersons' _ _ score [] = score
-checkPersons' config person (score, ssids) ((ssid,ind):inds) =
+checkPersons' :: Config -> NaturalPerson -> [(Int, Individual)] -> [Score]
+checkPersons' _ _ [] = []
+checkPersons' config person ((ssid,ind):inds) =
let
points = checkPerson config person ind
max_points = foldl1 (+) [ if toList (addresses ind) == [] then 0 else weight_address config
@@ -102,13 +101,17 @@ checkPersons' config person (score, ssids) ((ssid,ind):inds) =
, if toList (names ind) == [] then 0 else weight_name config
, if toList (nationalities ind) == [] then 0 else weight_nationality config
]
- new_score = if max_points >= threshold_points config
- then if points >= 300 then 1 else points / 300
- else points / max_points
in
- if new_score >= 2 / 3
- then checkPersons' config person (max score new_score, ssid:ssids) inds
- else checkPersons' config person (score, ssids) inds
+ if points >= threshold_points config || points / max_points >= threshold_confidence config
+ then let
+ score = Score { match_quality = if points >= perfect_points config then 1 else points / perfect_points config
+ , confidence = points / max_points
+ , expiration = 0
+ , reference = ssid
+ }
+ in
+ score:checkPersons' config person inds
+ else checkPersons' config person inds
checkPerson :: Config -> NaturalPerson -> Individual -> Float
checkPerson config person individual = foldl1 (+) [ address_points
diff --git a/src/KYCheck/Config.hs b/src/KYCheck/Config.hs
@@ -27,39 +27,42 @@ import System.FilePath
inputToConfig :: DhallConfig -> Maybe CommandLine -> Config
inputToConfig dhall commandline =
let
- d_v = dhall_verbosity dhall
- d_ssl = dhall_ssl_location dhall
- d_pct = realToFrac $ dhall_threshold_ratio dhall
- d_pts = fromIntegral $ dhall_threshold_points dhall
- d_pp = fromIntegral $ dhall_perfect_points dhall
- d_addr = fromIntegral $ dhall_weight_address dhall
- d_date = fromIntegral $ dhall_weight_date dhall
- d_id = fromIntegral $ dhall_weight_id dhall
- d_name = fromIntegral $ dhall_weight_name dhall
- d_nat = fromIntegral $ dhall_weight_nationality dhall
+ d_v = dhall_verbosity dhall
+ d_ssl = dhall_ssl_location dhall
+ d_pct = realToFrac $ dhall_threshold_ratio dhall
+ d_pts = fromIntegral $ dhall_threshold_points dhall
+ d_conf = realToFrac $ dhall_threshold_confidence dhall
+ d_pp = fromIntegral $ dhall_perfect_points dhall
+ d_addr = fromIntegral $ dhall_weight_address dhall
+ d_date = fromIntegral $ dhall_weight_date dhall
+ d_id = fromIntegral $ dhall_weight_id dhall
+ d_name = fromIntegral $ dhall_weight_name dhall
+ d_nat = fromIntegral $ dhall_weight_nationality dhall
in
case commandline of
- Just cl -> Config { verbosity = case cl_verbosity cl of Just v -> v; Nothing -> d_v
- , ssl_location = case cl_ssl_location cl of Just l -> l; Nothing -> d_ssl
- , threshold_ratio = case cl_threshold_ratio cl of Just p -> p; Nothing -> d_pct
- , threshold_points = case cl_threshold_points cl of Just p -> p; Nothing -> d_pts
- , perfect_points = case cl_perfect_points cl of Just p -> p; Nothing -> d_pp
- , weight_address = case cl_weight_address cl of Just p -> p; Nothing -> d_addr
- , weight_date = case cl_weight_date cl of Just p -> p; Nothing -> d_date
- , weight_id = case cl_weight_id cl of Just p -> p; Nothing -> d_id
- , weight_name = case cl_weight_name cl of Just p -> p; Nothing -> d_name
- , weight_nationality = case cl_weight_nationality cl of Just p -> p; Nothing -> d_nat
+ Just cl -> Config { verbosity = case cl_verbosity cl of Just v -> v; Nothing -> d_v
+ , ssl_location = case cl_ssl_location cl of Just l -> l; Nothing -> d_ssl
+ , threshold_ratio = case cl_threshold_ratio cl of Just p -> p; Nothing -> d_pct
+ , threshold_points = case cl_threshold_points cl of Just p -> p; Nothing -> d_pts
+ , threshold_confidence = case cl_threshold_confidence cl of Just p -> p; Nothing -> d_conf
+ , perfect_points = case cl_perfect_points cl of Just p -> p; Nothing -> d_pp
+ , weight_address = case cl_weight_address cl of Just p -> p; Nothing -> d_addr
+ , weight_date = case cl_weight_date cl of Just p -> p; Nothing -> d_date
+ , weight_id = case cl_weight_id cl of Just p -> p; Nothing -> d_id
+ , weight_name = case cl_weight_name cl of Just p -> p; Nothing -> d_name
+ , weight_nationality = case cl_weight_nationality cl of Just p -> p; Nothing -> d_nat
}
- Nothing -> Config { verbosity = d_v
- , ssl_location = d_ssl
- , threshold_ratio = d_pct
- , threshold_points = d_pts
- , perfect_points = d_pp
- , weight_address = d_addr
- , weight_date = d_date
- , weight_id = d_id
- , weight_name = d_name
- , weight_nationality = d_nat
+ Nothing -> Config { verbosity = d_v
+ , ssl_location = d_ssl
+ , threshold_ratio = d_pct
+ , threshold_points = d_pts
+ , threshold_confidence = d_conf
+ , perfect_points = d_pp
+ , weight_address = d_addr
+ , weight_date = d_date
+ , weight_id = d_id
+ , weight_name = d_name
+ , weight_nationality = d_nat
}
checkConfig :: Config -> IO Bool
@@ -146,6 +149,10 @@ commandLine = CommandLine
<> metavar "Integer"
<> help "Points needed to flag entry as match" ) )
<*> optional ( option auto
+ ( long "threshold-confidence"
+ <> metavar "Float"
+ <> help "Minimum confidence level between 0-1" ) )
+ <*> optional ( option auto
( long "perfect-points"
<> metavar "Integer"
<> help "Amount of points required to get a 100% confidence result" ) )
diff --git a/src/KYCheck/Type.hs b/src/KYCheck/Type.hs
@@ -58,31 +58,33 @@ removeSSID (WithSSID _ x) = x
-- | Data type containing all configuration information (config.dhall)
data Config = Config
- { verbosity :: Verbosity
- , ssl_location :: FilePath
- , threshold_ratio :: Float
- , threshold_points :: Float
- , perfect_points :: Float
- , weight_address :: Float
- , weight_date :: Float
- , weight_id :: Float
- , weight_name :: Float
- , weight_nationality :: Float
+ { verbosity :: Verbosity
+ , ssl_location :: FilePath
+ , threshold_ratio :: Float
+ , threshold_points :: Float
+ , threshold_confidence :: Float
+ , perfect_points :: Float
+ , weight_address :: Float
+ , weight_date :: Float
+ , weight_id :: Float
+ , weight_name :: Float
+ , weight_nationality :: Float
} deriving (Show, Eq, Generic)
data Verbosity = Test | Silent | Info | Errors | Debug deriving (Show, Eq, Generic, Ord)
data DhallConfig = DhallConfig
- { dhall_verbosity :: Verbosity
- , dhall_ssl_location :: FilePath
- , dhall_threshold_ratio :: Double
- , dhall_threshold_points :: Natural
- , dhall_perfect_points :: Natural
- , dhall_weight_address :: Natural
- , dhall_weight_date :: Natural
- , dhall_weight_id :: Natural
- , dhall_weight_name :: Natural
- , dhall_weight_nationality :: Natural
+ { dhall_verbosity :: Verbosity
+ , dhall_ssl_location :: FilePath
+ , dhall_threshold_ratio :: Double
+ , dhall_threshold_points :: Natural
+ , dhall_threshold_confidence :: Double
+ , dhall_perfect_points :: Natural
+ , dhall_weight_address :: Natural
+ , dhall_weight_date :: Natural
+ , dhall_weight_id :: Natural
+ , dhall_weight_name :: Natural
+ , dhall_weight_nationality :: Natural
} deriving (Show, Eq, Generic)
instance FromDhall DhallConfig where
@@ -91,14 +93,15 @@ instance FromDhall Verbosity
-- | Data type for user configuration via commandline
data CommandLine = CommandLine
- { cl_verbosity :: Maybe Verbosity
- , cl_ssl_location :: Maybe FilePath
- , cl_threshold_ratio :: Maybe Float
- , cl_threshold_points :: Maybe Float
- , cl_perfect_points :: Maybe Float
- , cl_weight_address :: Maybe Float
- , cl_weight_date :: Maybe Float
- , cl_weight_id :: Maybe Float
- , cl_weight_name :: Maybe Float
- , cl_weight_nationality :: Maybe Float
+ { cl_verbosity :: Maybe Verbosity
+ , cl_ssl_location :: Maybe FilePath
+ , cl_threshold_ratio :: Maybe Float
+ , cl_threshold_points :: Maybe Float
+ , cl_threshold_confidence :: Maybe Float
+ , cl_perfect_points :: Maybe Float
+ , cl_weight_address :: Maybe Float
+ , cl_weight_date :: Maybe Float
+ , cl_weight_id :: Maybe Float
+ , cl_weight_name :: Maybe Float
+ , cl_weight_nationality :: Maybe Float
} deriving (Show, Eq, Generic)
diff --git a/test/Tests/Check.hs b/test/Tests/Check.hs
@@ -16,10 +16,9 @@ import Data.Map (Map, toList)
import KYCheck.Check
import KYCheck.GLS.Type as GLS
import KYCheck.SSL as SSL
-import KYCheck.Type
+import KYCheck.Type hiding (threshold_confidence)
-import Tests.Targets.Real
-import Tests.Targets.Fake
+import Tests.Targets.Individuals
import Test.Tasty
import Test.Tasty.HUnit
@@ -39,26 +38,33 @@ data Distribution = Distribution
} deriving (Show, Eq)
-
--- | Test fake target (found in target_SSID.xml, not found in sanction list)
-testFakeTarget :: Config -> Bool -> Int -> NaturalPerson -> Map Int Individual -> Distribution -> TestTree
-testFakeTarget config verbose number target sanction_list distribution =
- testGroup ("Test fake target " ++ show number)
- [ testSingleTarget config verbose number target distribution Nothing
- , dontFindTarget config verbose target sanction_list ("target " ++ show number)
+testEntity :: Config -> Bool -> Int -> LegalEntity -> Map Int Entity -> Distribution -> TestTree
+testEntity config verbose number entity sanction_list distribution =
+ testGroup ("Test entity " ++ show number)
+ []
+ -- [ testSingleEntity config verbose number entity distribution Nothing
+ -- , dontFindEntity config verbose target sanction_list ("individual " ++ show number)
+ -- ]
+
+-- | Test trusted individual (found in target_SSID.xml, not found in sanction list)
+testTrustedIndividual :: Config -> Bool -> Int -> NaturalPerson -> Map Int Individual -> Distribution -> TestTree
+testTrustedIndividual config verbose number target sanction_list distribution =
+ testGroup ("Test trusted individual " ++ show number)
+ [ testSingleIndividual config verbose number target distribution Nothing
+ , dontFindIndividual config verbose target sanction_list ("target " ++ show number)
]
--- | Test real target (found in target_SSID.xml, found in sanction list)
-testTarget :: Config -> Bool -> Int -> NaturalPerson -> Map Int Individual -> Distribution -> TestTree
-testTarget config verbose number target sanction_list distribution =
- testGroup ("Test target " ++ show number)
- [ testSingleTarget config verbose number target distribution Nothing
- , findRealTarget config verbose number target distribution sanction_list
+-- | Test sanctioned individual (found in target_SSID.xml, found in sanction list)
+testSanctionedIndividual :: Config -> Bool -> Int -> NaturalPerson -> Map Int Individual -> Distribution -> TestTree
+testSanctionedIndividual config verbose number target sanction_list distribution =
+ testGroup ("Test individual " ++ show number)
+ [ testSingleIndividual config verbose number target distribution Nothing
+ , findRealIndividual config verbose number target distribution sanction_list
]
-testTargetVersions :: Config -> Bool -> Int -> Map Int Individual -> [(NaturalPerson, String, Distribution)] -> TestTree
-testTargetVersions config verbose number sanction_list versions =
+testIndividualVersions :: Config -> Bool -> Int -> Map Int Individual -> [(NaturalPerson, String, Distribution)] -> TestTree
+testIndividualVersions config verbose number sanction_list versions =
withResource getResource (\_ -> pure ()) $ \ssl ->
testGroup ("Test versions of target " ++ show number)
[ testCase "Sanction list parsing" $ do
@@ -69,10 +75,10 @@ testTargetVersions config verbose number sanction_list versions =
testGroup "Versions:" $
map (\(target, title, dist) ->
testGroup ("Test target version " ++ title)
- [ testSingleTarget config verbose number target dist $ Just ssl
+ [ testSingleIndividual config verbose number target dist $ Just ssl
, case (threshold_confidence dist) of
- Nothing -> dontFindTarget config verbose target sanction_list ("target " ++ show number)
- _ -> findRealTarget config verbose number target dist sanction_list
+ Nothing -> dontFindIndividual config verbose target sanction_list ("target " ++ show number)
+ _ -> findRealIndividual config verbose number target dist sanction_list
]
) versions
]
@@ -81,29 +87,29 @@ testTargetVersions config verbose number sanction_list versions =
return ssl
-- | Find target in sanction list
-findRealTarget :: Config -> Bool -> Int -> NaturalPerson -> Distribution -> Map Int Individual -> TestTree
-findRealTarget config verbose number target distribution sanction_list =
+findRealIndividual :: Config -> Bool -> Int -> NaturalPerson -> Distribution -> Map Int Individual -> TestTree
+findRealIndividual config verbose number target distribution sanction_list =
testCase ("Find target " ++ show number ++ " in Swiss Sanction List") $ do
let score = checkPersons config sanction_list target
when verbose $ print score
- compareScore (threshold_confidence distribution) (confidence score) "Score"
- assertBool ("Should find target " ++ show number ++ ", but found " ++ (show . references) score ++ " instead") (number `elem` references score)
+ compareScore (threshold_confidence distribution) score "Score"
+ assertBool ("Should find target " ++ show number ++ ", but found " ++ (show . map reference) score ++ " instead") (number `elem` (map reference score))
-- | Dont find target in sanction list
-dontFindTarget :: Config -> Bool -> NaturalPerson -> Map Int Individual -> String -> TestTree
-dontFindTarget config verbose target sanction_list title =
+dontFindIndividual :: Config -> Bool -> NaturalPerson -> Map Int Individual -> String -> TestTree
+dontFindIndividual config verbose target sanction_list title =
testCase ("Do not find " ++ title ++ " in Swiss Sanction List") $ do
let score = checkPersons config sanction_list target
when verbose $ print score
- compareScore (Just 0) (confidence score) "Score"
- assertBool ("Should not find " ++ title ++ ", but found " ++ (show . references) score ++ " instead") (references score == [])
+ compareScore Nothing score "Score"
+ assertBool ("Should not find " ++ title ++ ", but found " ++ (show . map reference) score ++ " instead") (score == [])
-- | Test if target matches target described in target_SSID.xml
-testSingleTarget :: Config -> Bool -> Int -> NaturalPerson -> Distribution -> Maybe (IO (Map Int Individual)) -> TestTree
-testSingleTarget config verbose number target distribution ssl_target =
+testSingleIndividual :: Config -> Bool -> Int -> NaturalPerson -> Distribution -> Maybe (IO (Map Int Individual)) -> TestTree
+testSingleIndividual config verbose number target distribution ssl_target =
testCase ("Find target " ++ show number ++ " in test file") $ do
ssl <- case ssl_target of
Just ssl -> ssl
@@ -126,71 +132,79 @@ testSingleTarget config verbose number target distribution ssl_target =
total_score = checkPersons config ssl target
when verbose $ print total_score
- compareScore (threshold_address distribution) address_score "Address"
- compareScore (threshold_date distribution) date_score "Date"
- compareScore (threshold_id distribution) id_score "ID"
- compareScore (threshold_name distribution) name_score "Name"
- compareScore (threshold_nationality distribution) nationality_score "Nationality"
+ comparePoints (threshold_address distribution) address_score "Address"
+ comparePoints (threshold_date distribution) date_score "Date"
+ comparePoints (threshold_id distribution) id_score "ID"
+ comparePoints (threshold_name distribution) name_score "Name"
+ comparePoints (threshold_nationality distribution) nationality_score "Nationality"
+
+ compareScore (threshold_confidence distribution) total_score "Total score"
- compareScore (threshold_confidence distribution) (confidence total_score) "Total score"
+-- | Compare expected points to outcome
+comparePoints :: Maybe Float -> Float -> String -> Assertion
+comparePoints maybe_threshold points title =
+ case maybe_threshold of
+ Just pts -> assertBool (title ++ " should return >= " ++ show pts ++ " points, but got " ++ show points ++ " instead") (points >= pts)
+ Nothing -> assertBool (title ++ " should return 0 points, but got " ++ show points ++ " instead") (points == 0 )
+
-- | Compare expected score to real score
-compareScore :: Maybe Float -> Float -> String -> Assertion
+compareScore :: Maybe Float -> [Score] -> String -> Assertion
compareScore maybe_threshold score title =
case maybe_threshold of
- Just pts -> assertBool (title ++ " should return >= " ++ show pts ++ " points, but got " ++ show score ++ " instead") (score >= pts)
- Nothing -> assertBool (title ++ " should return 0 points, but got " ++ show score ++ " instead") (score == 0 )
+ Just conf -> assertBool (title ++ " should return confidence >= " ++ show conf ++ ", but got " ++ show score ++ " instead") (foldl (\b sc -> b || confidence sc >= conf) False score)
+ Nothing -> assertBool (title ++ " should return not matches , but got " ++ show score ++ " instead") (score == [])
-- | Test individuals
personTests :: Config -> Map Int Individual -> TestTree
personTests config sanction_list =
let
- testT = testTarget config False
- testFT = testFakeTarget config False
- dontFindT = dontFindTarget config False
+ testSI = testSanctionedIndividual config False
+ testTI = testTrustedIndividual config False
+ dontFindI = dontFindIndividual config False
toMaybe float = case float of 0 -> Nothing; f -> Just f
distribution addr date id' name nat conf = Distribution (toMaybe addr) (toMaybe date) (toMaybe id') (toMaybe name) (toMaybe nat) (toMaybe conf)
in
testGroup "Individuals"
[ testGroup "Known Sanctioned"
- {- testTarget False SSID target_SSID sanction_list $ distribution ADDRESS DATE ID NAME NATIONALITY CONFIDENCE
- MAX_SCORE 150 100 200 125 50 0.75 -}
- [ testT 5144 target_5144 sanction_list $ distribution 125 100 0 125 0 0.9
- , testT 5266 target_5266 sanction_list $ distribution 0 0 0 125 0 0.5
- , testT 43462 target_43462 sanction_list $ distribution 0 100 0 125 0 0.75
- , testT 43616 target_43616 sanction_list $ distribution 0 0 0 125 0 0.75
- , testT 43641 target_43641 sanction_list $ distribution 0 100 0 125 0 0.75
- , testT 43718 target_43718 sanction_list $ distribution 0 100 0 125 0 0.75
- , testT 43662 target_43662 sanction_list $ distribution 0 100 0 125 0 0.75
- , testT 43611 target_43611 sanction_list $ distribution 0 0 0 125 0 0.75
- , testT 29723 target_29723 sanction_list $ distribution 0 100 0 125 0 0.75
- , testT 68815 target_68815 sanction_list $ distribution 75 100 0 125 50 0.75
-
- {- testTargetVersions False SSID sanction_list $
+ {- testSI SSID target_SSID sanction_list $ distribution ADDRESS DATE ID NAME NATIONALITY CONFIDENCE
+ MAX_SCORE 150 100 200 125 50 0.75 -}
+ [ testSI 5144 target_5144 sanction_list $ distribution 125 100 0 125 0 0.9
+ , testSI 5266 target_5266 sanction_list $ distribution 0 0 0 125 0 1
+ , testSI 43462 target_43462 sanction_list $ distribution 0 100 0 125 0 0.75
+ , testSI 43616 target_43616 sanction_list $ distribution 0 0 0 125 0 1
+ , testSI 43641 target_43641 sanction_list $ distribution 0 100 0 125 0 0.75
+ , testSI 43718 target_43718 sanction_list $ distribution 0 100 0 125 0 0.75
+ , testSI 43662 target_43662 sanction_list $ distribution 0 100 0 125 0 0.75
+ , testSI 43611 target_43611 sanction_list $ distribution 0 0 0 125 0 1
+ , testSI 29723 target_29723 sanction_list $ distribution 0 100 0 125 0 0.75
+ , testSI 68815 target_68815 sanction_list $ distribution 75 100 0 125 50 0.75
+
+ {- testIndividualVersions False SSID sanction_list $
, (target_SSID_vN, "vN", distribution ADDRESS DATE ID NAME NATIONALITY CONFIDENCE -}
- , testTargetVersions config False 49816 sanction_list $
+ , testIndividualVersions config False 49816 sanction_list $
[ (target_49816_v1, "v1", distribution 0 100 0 125 0 0.75) -- Name and date
, (target_49816_v2, "v2", distribution 0 100 0 0 0 0 ) -- First name and date
, (target_49816_v3, "v3", distribution 0 0 0 0 0 0 ) -- Nothing
, (target_49816_v4, "v4", distribution 0 100 0 125 0 0.75) -- Name
]
- , testTargetVersions config False 38925 sanction_list $
- [ (target_38925_v1, "v1", distribution 100 0 0 0 0 0.75) -- Only address
+ , testIndividualVersions config False 38925 sanction_list $
+ [ (target_38925_v1, "v1", distribution 100 0 0 0 0 0.5 ) -- Only address
, (target_38925_v2, "v2", distribution 0 0 0 125 0 0 ) -- Only name
, (target_38925_v3, "v3", distribution 0 100 0 0 0 0 ) -- Only birthdate
- , (target_38925_v4, "v4", distribution 100 0 0 0 0 0.75) -- Only address
+ , (target_38925_v4, "v4", distribution 100 0 0 0 0 0.5 ) -- Only address
, (target_38925_v5, "v5", distribution 100 100 0 125 0 0.75) -- Address + name + birthdate
]
- , testTargetVersions config False 57355 sanction_list $
+ , testIndividualVersions config False 57355 sanction_list $
[ (target_57355_v1, "v1", distribution 100 100 0 125 50 0.75) -- Name, date and address
, (target_57355_v2, "v2", distribution 100 100 0 0 50 0.75) -- Alias, date and address
- , (target_57355_v3, "v3", distribution 100 0 0 100 50 0.75) -- Name, address
+ , (target_57355_v3, "v3", distribution 100 0 0 100 50 0.5 ) -- Name, address
, (target_57355_v4, "v4", distribution 0 0 0 100 50 0 ) -- Name with spelling mistake
- , (target_57355_v5, "v5", distribution 0 100 0 100 50 0.75) -- Name with spelling mistake and date
+ , (target_57355_v5, "v5", distribution 0 100 0 100 50 0.5 ) -- Name with spelling mistake and date
, (target_57355_v6, "v6", distribution 0 0 0 100 50 0 ) -- Shortened name
]
@@ -199,19 +213,19 @@ personTests config sanction_list =
, testGroup "Fake target with XML file"
{- testFT SSID target_SSID sanction_list $ distribution ADDRESS DATE ID NAME NATIONALITY CONFIDENCE
150 100 200 125 50 0.75 -}
- [ testFT 6 target_6 sanction_list $ distribution 0 100 0 125 0 0.75
+ [ testTI 6 target_6 sanction_list $ distribution 0 100 0 125 0 0.75
]
, testGroup "Public and imaginary figures"
- [ dontFindT public_figure_1 sanction_list "Hergé"
- , dontFindT public_figure_2 sanction_list "Bezos"
- , dontFindT public_figure_3 sanction_list "Lincoln"
- , dontFindT public_figure_4 sanction_list "Willem-Alexander"
- , dontFindT public_figure_5 sanction_list "Da Vinci"
- , dontFindT imaginary_figure_1 sanction_list "Smurf"
- , dontFindT imaginary_figure_2 sanction_list "Donald"
- , dontFindT imaginary_figure_3 sanction_list "Wonka"
- , dontFindT imaginary_figure_4 sanction_list "Bilbo"
- , dontFindT imaginary_figure_5 sanction_list "Batman"
+ [ dontFindI public_figure_1 sanction_list "Hergé"
+ , dontFindI public_figure_2 sanction_list "Bezos"
+ , dontFindI public_figure_3 sanction_list "Lincoln"
+ , dontFindI public_figure_4 sanction_list "Willem-Alexander"
+ , dontFindI public_figure_5 sanction_list "Da Vinci"
+ , dontFindI imaginary_figure_1 sanction_list "Smurf"
+ , dontFindI imaginary_figure_2 sanction_list "Donald"
+ , dontFindI imaginary_figure_3 sanction_list "Wonka"
+ , dontFindI imaginary_figure_4 sanction_list "Bilbo"
+ , dontFindI imaginary_figure_5 sanction_list "Batman"
]
]
diff --git a/test/Tests/Targets/Entities.hs b/test/Tests/Targets/Entities.hs
@@ -0,0 +1,12 @@
+-- SPDX-FileCopyrightText: 2025 LNRS
+--
+-- SPDX-License-Identifier: AGPL-3.0-or-later
+-- SPDX-License-Identifier: EUPL-1.2
+
+module Tests.Targets.Entities
+ ( module Tests.Targets.Entities.Sanctioned
+ , module Tests.Targets.Entities.Trusted
+ ) where
+
+import Tests.Targets.Entities.Sanctioned
+import Tests.Targets.Entities.Trusted
diff --git a/test/Tests/Targets/Entities/Sanctioned.hs b/test/Tests/Targets/Entities/Sanctioned.hs
@@ -0,0 +1,35 @@
+-- SPDX-FileCopyrightText: 2025 LNRS
+--
+-- SPDX-License-Identifier: AGPL-3.0-or-later
+-- SPDX-License-Identifier: EUPL-1.2
+
+{-# LANGUAGE OverloadedStrings #-}
+
+module Tests.Targets.Entities.Sanctioned
+ (
+ ) where
+
+import Data.CountryCodes
+import Data.Time.Calendar
+
+import KYCheck.GLS.Type as GLS
+
+import Prelude hiding (id)
+
+-- target :: LegalEntity
+-- target = LegalEntity
+-- { company_name =
+-- , contact_person_name = Nothing
+-- , phone = Nothing
+-- , email = Nothing
+-- , id = "012345ABCDEF"
+-- , address = GLS.Address { GLS.country =
+-- , street_name =
+-- , street_number =
+-- , GLS.lines =
+-- , building_name =
+-- , building_number =
+-- , zipcode =
+-- , town_location =
+-- , town_district =
+-- , country_subdivision =
diff --git a/test/Tests/Targets/Entities/Trusted.hs b/test/Tests/Targets/Entities/Trusted.hs
@@ -0,0 +1,58 @@
+-- SPDX-FileCopyrightText: 2025 LNRS
+--
+-- SPDX-License-Identifier: AGPL-3.0-or-later
+-- SPDX-License-Identifier: EUPL-1.2
+
+{-# LANGUAGE OverloadedStrings #-}
+
+module Tests.Targets.Entities.Trusted
+ (
+ ) where
+
+import Data.CountryCodes
+import Data.Time.Calendar
+
+import KYCheck.GLS.Type as GLS
+
+import Prelude hiding (id)
+
+
+-- target :: LegalEntity
+-- target = LegalEntity
+-- { company_name =
+-- , contact_person_name =
+-- , phone =
+-- , email =
+-- , id = "012345ABCDEF"
+-- , address = GLS.Address { GLS.country =
+-- , street_name =
+-- , street_number =
+-- , GLS.lines =
+-- , building_name =
+-- , building_number =
+-- , zipcode =
+-- , town_location =
+-- , town_district =
+-- , country_subdivision =
+-- }
+-- }
+
+target :: LegalEntity
+target = LegalEntity
+ { company_name = "NLnet"
+ , contact_person_name = Just "Bob Goudriaan"
+ , phone = Just "+31 (0)20 8884252"
+ , email = Just "example@nlnet.nl"
+ , id = "012345ABCDEF"
+ , address = GLS.Address { GLS.country = NL
+ , street_name = "Science Park"
+ , street_number = "400"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Nothing
+ , zipcode = "1098XH"
+ , town_location = Just "Amsterdam"
+ , town_district = Nothing
+ , country_subdivision = Just "Zuid-Holland"
+ }
+ }
diff --git a/test/Tests/Targets/Fake.hs b/test/Tests/Targets/Fake.hs
@@ -1,264 +0,0 @@
--- SPDX-FileCopyrightText: 2025 LNRS
---
--- SPDX-License-Identifier: AGPL-3.0-or-later
--- SPDX-License-Identifier: EUPL-1.2
-
-{-# LANGUAGE OverloadedStrings #-}
-
-module Tests.Targets.Fake
- ( target_6
- , public_figure_1
- , public_figure_2
- , public_figure_3
- , public_figure_4
- , public_figure_5
- , imaginary_figure_1
- , imaginary_figure_2
- , imaginary_figure_3
- , imaginary_figure_4
- , imaginary_figure_5
- ) where
-
-import Data.CountryCodes
-import Data.Time.Calendar
-
-import KYCheck.GLS.Type as GLS
-
-
--- target :: NaturalPerson
--- target = NaturalPerson
--- { full_name =
--- , last_name =
--- , birthdate =
--- , nationality =
--- , national_id =
--- , residential = GLS.Address { GLS.country =
--- , street_name =
--- , street_number =
--- , GLS.lines =
--- , building_name =
--- , building_number =
--- , zipcode =
--- , town_location =
--- , town_district =
--- , country_subdivision =
-
-public_figure_1 :: NaturalPerson
-public_figure_1 = NaturalPerson
- { full_name = "Georges Prosper Remi"
- , last_name = "Remi"
- , birthdate = YearMonthDay 1907 05 22
- , nationality = BE
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = BE
- , street_name = "Non existent"
- , street_number = "Non existent"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Nothing
- , zipcode = "Non existent"
- , town_location = Just "Etterbeek"
- , town_district = Just "Bruxelles"
- , country_subdivision = Just "Brussels"
- }
- }
-
-public_figure_2 :: NaturalPerson
-public_figure_2 = NaturalPerson
- { full_name = "Jeffrey Preston Bezos"
- , last_name = "Bezos"
- , birthdate = YearMonthDay 1964 01 12
- , nationality = US
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = US
- , street_name = "Negra Arroyo Lane"
- , street_number = "308"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Nothing
- , zipcode = "87112"
- , town_location = Just "Albuquerque"
- , town_district = Just "Bernalillo"
- , country_subdivision = Just "New Mexico"
- }
- }
-
-public_figure_3 :: NaturalPerson
-public_figure_3 = NaturalPerson
- { full_name = "Abraham Lincoln"
- , last_name = "Lincoln"
- , birthdate = YearMonthDay 1809 02 12
- , nationality = US
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = US
- , street_name = "Lincoln Farm Road"
- , street_number = "2995"
- , GLS.lines = Nothing
- , building_name = Just "Abraham Lincoln Birthplace"
- , building_number = Nothing
- , zipcode = "42748"
- , town_location = Just "Hodgenville"
- , town_district = Just "LaRue"
- , country_subdivision = Just "Kentucky"
- }
- }
-
-public_figure_4 :: NaturalPerson
-public_figure_4 = NaturalPerson
- { full_name = "Willem-Alexander Claus George Ferdinand van Oranje-Nassau"
- , last_name = "van Oranje-Nassau"
- , birthdate = YearMonthDay 1980 04 30
- , nationality = NL
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = NL
- , street_name = "'s-Gravenhaagse Bos"
- , street_number = "10"
- , GLS.lines = Nothing
- , building_name = Just "Huis ten Bosch"
- , building_number = Nothing
- , zipcode = "2594BD"
- , town_location = Just "'s-Gravenhage"
- , town_district = Nothing
- , country_subdivision = Just "Zuid-Holland"
- }
- }
-
-public_figure_5 :: NaturalPerson
-public_figure_5 = NaturalPerson
- { full_name = "Leonardo di ser Piero da Vinci"
- , last_name = "da Vinci"
- , birthdate = YearMonthDay 1452 04 15
- , nationality = IT
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = IT
- , street_name = "Non existent"
- , street_number = "Non existent"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Nothing
- , zipcode = "2594BD"
- , town_location = Just "Vinci"
- , town_district = Just "Florence"
- , country_subdivision = Just "Tuscany"
- }
- }
-
-imaginary_figure_1 :: NaturalPerson
-imaginary_figure_1 = NaturalPerson
- { full_name = "Papa Smurf"
- , last_name = "Smurf"
- , birthdate = YearMonthDay 1958 10 23
- , nationality = FR
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = FR
- , street_name = "Non existent"
- , street_number = "Non existent"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Nothing
- , zipcode = "Non existent"
- , town_location = Nothing
- , town_district = Nothing
- , country_subdivision = Just "Smurf Village"
- }
- }
-
-imaginary_figure_2 :: NaturalPerson
-imaginary_figure_2 = NaturalPerson
- { full_name = "Donald Fauntleroy Duck"
- , last_name = "Duck"
- , birthdate = YearMonthDay 1934 06 09
- , nationality = US
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = US
- , street_name = "South Harbor Boulevard"
- , street_number = "1313"
- , GLS.lines = Nothing
- , building_name = Just "Disneyland"
- , building_number = Nothing
- , zipcode = "92802"
- , town_location = Just "Anaheim"
- , town_district = Just "Orange"
- , country_subdivision = Just "California"
- }
- }
-
-imaginary_figure_3 :: NaturalPerson
-imaginary_figure_3 = NaturalPerson
- { full_name = "Willy Wonka"
- , last_name = "Wonka"
- , birthdate = YearMonthDay 1964 01 17
- , nationality = GB
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = GB
- , street_name = "Non existent"
- , street_number = "Non existent"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Nothing
- , zipcode = "Non existent"
- , town_location = Just "Cardiff"
- , town_district = Nothing
- , country_subdivision = Just "Wales"
- }
- }
-
-imaginary_figure_4 :: NaturalPerson
-imaginary_figure_4 = NaturalPerson
- { full_name = "Bilbo Baggins"
- , last_name = "Baggins"
- , birthdate = YearMonthDay 1937 09 21
- , nationality = GB
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = GB
- , street_name = "Bagshot Row"
- , street_number = "Non existent"
- , GLS.lines = Nothing
- , building_name = Just "Bag End"
- , building_number = Nothing
- , zipcode = "Non existent"
- , town_location = Just "Hobbiton"
- , town_district = Just "Westfarthing"
- , country_subdivision = Just "The Shire"
- }
- }
-
-imaginary_figure_5 :: NaturalPerson
-imaginary_figure_5 = NaturalPerson
- { full_name = "Bruce Wayne"
- , last_name = "Wayne"
- , birthdate = YearMonthDay 1972 02 19
- , nationality = US
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = US
- , street_name = "Park Drive"
- , street_number = "224"
- , GLS.lines = Nothing
- , building_name = Just "Wayne Manor"
- , building_number = Nothing
- , zipcode = "19007"
- , town_location = Just "Bristol Township"
- , town_district = Just "Bucks"
- , country_subdivision = Just "Pennsylvania"
- }
- }
-
-target_6 :: NaturalPerson
-target_6 = NaturalPerson
- { full_name = "Bowser"
- , last_name = "Bowser"
- , birthdate = YearMonthDay 1985 09 13
- , nationality = JP
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = JP
- , street_name = "Non existent"
- , street_number = "Non existent"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Nothing
- , zipcode = "Non existent"
- , town_location = Nothing
- , town_district = Nothing
- , country_subdivision = Nothing
- }
- }
diff --git a/test/Tests/Targets/Individuals.hs b/test/Tests/Targets/Individuals.hs
@@ -0,0 +1,12 @@
+-- SPDX-FileCopyrightText: 2025 LNRS
+--
+-- SPDX-License-Identifier: AGPL-3.0-or-later
+-- SPDX-License-Identifier: EUPL-1.2
+
+module Tests.Targets.Individuals
+ ( module Tests.Targets.Individuals.Sanctioned
+ , module Tests.Targets.Individuals.Trusted
+ ) where
+
+import Tests.Targets.Individuals.Sanctioned
+import Tests.Targets.Individuals.Trusted
diff --git a/test/Tests/Targets/Individuals/Sanctioned.hs b/test/Tests/Targets/Individuals/Sanctioned.hs
@@ -0,0 +1,558 @@
+-- SPDX-FileCopyrightText: 2025 LNRS
+--
+-- SPDX-License-Identifier: AGPL-3.0-or-later
+-- SPDX-License-Identifier: EUPL-1.2
+
+{-# LANGUAGE OverloadedStrings #-}
+
+module Tests.Targets.Individuals.Sanctioned
+ ( target_5144
+ , target_5266
+ , target_49816_v1
+ , target_49816_v2
+ , target_49816_v3
+ , target_49816_v4
+ , target_43462
+ , target_43616
+ , target_43641
+ , target_43718
+ , target_43662
+ , target_43611
+ , target_29723
+ , target_38925_v1
+ , target_38925_v2
+ , target_38925_v3
+ , target_38925_v4
+ , target_38925_v5
+ , target_68815
+ , target_57355_v1
+ , target_57355_v2
+ , target_57355_v3
+ , target_57355_v4
+ , target_57355_v5
+ , target_57355_v6
+ ) where
+
+import Data.CountryCodes
+import Data.Time.Calendar
+
+import KYCheck.GLS.Type as GLS
+
+
+-- target :: NaturalPerson
+-- target = NaturalPerson
+-- { full_name =
+-- , last_name =
+-- , birthdate =
+-- , nationality =
+-- , national_id =
+-- , residential = GLS.Address { GLS.country =
+-- , street_name =
+-- , street_number =
+-- , GLS.lines =
+-- , building_name =
+-- , building_number =
+-- , zipcode =
+-- , town_location =
+-- , town_district =
+-- , country_subdivision =
+
+target_5144 :: NaturalPerson
+target_5144 = NaturalPerson
+ { full_name = "Dmitri Aliaksandravich Lukashenko"
+ , last_name = "Lukashenko"
+ , birthdate = YearMonthDay 1980 03 23
+ , nationality = BY
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = BY
+ , street_name = "ул. Старовиленская"
+ , street_number = "4"
+ , GLS.lines = Just "President's Sports Club"
+ , building_name = Nothing
+ , building_number = Nothing
+ , zipcode = "220029"
+ , town_location = Just "г. Минск"
+ , town_district = Nothing
+ , country_subdivision = Nothing
+ }
+ }
+
+target_5266 :: NaturalPerson
+target_5266 = NaturalPerson
+ { full_name = "Natallia Alexeeuna Chatviartkova"
+ , last_name = "Chatviartkova"
+ , birthdate = YearMonthDay 1960 01 01 -- Made up birth date
+ , nationality = RU
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = RU
+ , street_name = "Non existent"
+ , street_number = "Non existent"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Nothing
+ , zipcode = "Non existent"
+ , town_location = Nothing
+ , town_district = Nothing
+ , country_subdivision = Nothing
+ }
+ }
+
+target_49816_v1 :: NaturalPerson
+target_49816_v1 = NaturalPerson
+ { full_name = "Vladimir Vladimirovich Putin"
+ , last_name = "Putin"
+ , birthdate = YearMonthDay 1952 10 07
+ , nationality = RU
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = RU
+ , street_name = "Инжирный переулок"
+ , street_number = "1"
+ , GLS.lines = Nothing
+ , building_name = Just "Bocharov Ruchey"
+ , building_number = Nothing
+ , zipcode = "354008"
+ , town_location = Just "Sochi"
+ , town_district = Just "Town district of Sochi"
+ , country_subdivision = Just "Krasnodar Krai"
+ }
+ }
+
+target_49816_v2 :: NaturalPerson
+target_49816_v2 = NaturalPerson
+ { full_name = "Vladimir Mouse"
+ , last_name = "Mouse"
+ , birthdate = YearMonthDay 1952 10 07
+ , nationality = RU
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = RU
+ , street_name = "Инжирный переулок"
+ , street_number = "1"
+ , GLS.lines = Nothing
+ , building_name = Just "Bocharov Ruchey"
+ , building_number = Nothing
+ , zipcode = "354008"
+ , town_location = Just "Sochi"
+ , town_district = Just "Town district of Sochi"
+ , country_subdivision = Just "Krasnodar Krai"
+ }
+ }
+
+target_49816_v3 :: NaturalPerson
+target_49816_v3 = NaturalPerson
+ { full_name = "Mickey Mouse"
+ , last_name = "Mouse"
+ , birthdate = YearMonthDay 1951 04 12
+ , nationality = RU
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = RU
+ , street_name = "Инжирный переулок"
+ , street_number = "1"
+ , GLS.lines = Nothing
+ , building_name = Just "Bocharov Ruchey"
+ , building_number = Nothing
+ , zipcode = "354008"
+ , town_location = Just "Sochi"
+ , town_district = Just "Town district of Sochi"
+ , country_subdivision = Just "Krasnodar Krai"
+ }
+ }
+
+target_49816_v4 :: NaturalPerson
+target_49816_v4 = NaturalPerson
+ { full_name = "Vladimir Vladimirovich Putin"
+ , last_name = "Putin"
+ , birthdate = YearMonthDay 1952 10 07
+ , nationality = FR
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = FR
+ , street_name = "Non existent"
+ , street_number = "Non existent"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Nothing
+ , zipcode = "Non existent"
+ , town_location = Nothing
+ , town_district = Nothing
+ , country_subdivision = Nothing
+ }
+ }
+
+target_43462 :: NaturalPerson
+target_43462 = NaturalPerson
+ { full_name = "Aleksandr Petrovich Barsukov"
+ , last_name = "Barsukov"
+ , birthdate = YearMonthDay 1965 04 29
+ , nationality = BY
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = BY
+ , street_name = "Non existent"
+ , street_number = "Non existent"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Nothing
+ , zipcode = "Non existent"
+ , town_location = Nothing
+ , town_district = Nothing
+ , country_subdivision = Nothing
+ }
+ }
+
+target_43616 :: NaturalPerson
+target_43616 = NaturalPerson
+ { full_name = "Oleg Anatolievich Chernyshev"
+ , last_name = "Chernyshev"
+ , birthdate = YearMonthDay 1985 07 27 -- Made up birth date
+ , nationality = RU
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = RU
+ , street_name = "Non existent"
+ , street_number = "Non existent"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Nothing
+ , zipcode = "Non existent"
+ , town_location = Nothing
+ , town_district = Nothing
+ , country_subdivision = Nothing
+ }
+ }
+
+target_43641 :: NaturalPerson
+target_43641 = NaturalPerson
+ { full_name = "Vadzim Dzmitryevich Ipatau"
+ , last_name = "Ipatau"
+ , birthdate = YearMonthDay 1964 10 30
+ , nationality = BY
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = BY
+ , street_name = "Non existent"
+ , street_number = "Non existent"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Nothing
+ , zipcode = "Non existent"
+ , town_location = Nothing
+ , town_district = Nothing
+ , country_subdivision = Nothing
+ }
+ }
+
+target_43718 :: NaturalPerson
+target_43718 = NaturalPerson
+ { full_name = "Irina Aliaksandrauna Tselikavets"
+ , last_name = "Tselikavets"
+ , birthdate = YearMonthDay 1976 11 02
+ , nationality = BY
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = BY
+ , street_name = "Non existent"
+ , street_number = "Non existent"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Nothing
+ , zipcode = "Non existent"
+ , town_location = Nothing
+ , town_district = Nothing
+ , country_subdivision = Nothing
+ }
+ }
+
+target_43662 :: NaturalPerson
+target_43662 = NaturalPerson
+ { full_name = "Olga Leonidovna Doroshenko"
+ , last_name = "Doroshenko"
+ , birthdate = YearMonthDay 1976 09 02 -- Made up birth month and day
+ , nationality = BY
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = BY
+ , street_name = "Non existent"
+ , street_number = "Non existent"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Nothing
+ , zipcode = "Non existent"
+ , town_location = Nothing
+ , town_district = Nothing
+ , country_subdivision = Nothing
+ }
+ }
+
+target_43611 :: NaturalPerson
+target_43611 = NaturalPerson
+ { full_name = "Vladimir Viktorovich Kalach"
+ , last_name = "Kalach"
+ , birthdate = YearMonthDay 1960 12 22 -- Made up birth date
+ , nationality = BY
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = BY
+ , street_name = "Non existent"
+ , street_number = "Non existent"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Nothing
+ , zipcode = "Non existent"
+ , town_location = Nothing
+ , town_district = Nothing
+ , country_subdivision = Nothing
+ }
+ }
+
+target_29723 :: NaturalPerson
+target_29723 = NaturalPerson
+ { full_name = "Равиль Закариевич Халиков"
+ , last_name = "Халиков"
+ , birthdate = YearMonthDay 1969 02 23
+ , nationality = RU
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = RU
+ , street_name = "Non existent"
+ , street_number = "Non existent"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Nothing
+ , zipcode = "Non existent"
+ , town_location = Nothing
+ , town_district = Nothing
+ , country_subdivision = Nothing
+ }
+ }
+
+target_38925_v1 :: NaturalPerson
+target_38925_v1 = NaturalPerson
+ { full_name = "Solomon Grundy"
+ , last_name = "Grundy"
+ , birthdate = YearMonthDay 1800 06 06
+ , nationality = BE
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = HT
+ , street_name = "Kryzhizhanovskogo str."
+ , street_number = "5A"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Just "64"
+ , zipcode = "Non existent"
+ , town_location = Just "Gresovskoe"
+ , town_district = Nothing
+ , country_subdivision = Nothing
+ }
+ }
+
+target_38925_v2 :: NaturalPerson
+target_38925_v2 = NaturalPerson
+ { full_name = "Natalia Ivanovna Bezruchenko"
+ , last_name = "Bezruchenko"
+ , birthdate = YearMonthDay 1913 02 27
+ , nationality = BE
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = BE
+ , street_name = "Non existent"
+ , street_number = "Non existent"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Nothing
+ , zipcode = "Non existent"
+ , town_location = Nothing
+ , town_district = Nothing
+ , country_subdivision = Nothing
+ }
+ }
+
+target_38925_v3 :: NaturalPerson
+target_38925_v3 = NaturalPerson
+ { full_name = "Mickey Bezruchenko"
+ , last_name = "Bezruchenko"
+ , birthdate = YearMonthDay 1979 08 22
+ , nationality = BE
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = HT
+ , street_name = "Non existent"
+ , street_number = "Non existent"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Nothing
+ , zipcode = "Non existent"
+ , town_location = Nothing
+ , town_district = Nothing
+ , country_subdivision = Nothing
+ }
+ }
+
+target_38925_v4 :: NaturalPerson
+target_38925_v4 = NaturalPerson
+ { full_name = "Mickey Bezruchenko"
+ , last_name = "Bezruchenko"
+ , birthdate = YearMonthDay 1960 02 13
+ , nationality = BE
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = HT
+ , street_name = "Kryzhizhanovskogo str."
+ , street_number = "5A"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Just "64"
+ , zipcode = "Non existent"
+ , town_location = Just "Gresovskoe"
+ , town_district = Nothing
+ , country_subdivision = Just "Autonomous Republic of Crimea"
+ }
+ }
+
+target_38925_v5 :: NaturalPerson
+target_38925_v5 = NaturalPerson
+ { full_name = "Natalia Ivanovna Bezruchenko"
+ , last_name = "Bezruchenko"
+ , birthdate = YearMonthDay 1979 08 22
+ , nationality = RU
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = RU
+ , street_name = "Kryzhizhanovskogo str."
+ , street_number = "5A"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Just "64"
+ , zipcode = "Non existent"
+ , town_location = Just "Gresovskoe"
+ , town_district = Nothing
+ , country_subdivision = Nothing
+ }
+ }
+
+target_68815 :: NaturalPerson
+target_68815 = NaturalPerson
+ { full_name = "Innocent Vitelhomme"
+ , last_name = "Vitelhomme"
+ , birthdate = YearMonthDay 1986 03 27
+ , nationality = HT
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = HT
+ , street_name = "Non existent"
+ , street_number = "Non existent"
+ , GLS.lines = Just "Tabarre 49"
+ , building_name = Nothing
+ , building_number = Just "64"
+ , zipcode = "Non existent"
+ , town_location = Just "Port-au-Prince"
+ , town_district = Nothing
+ , country_subdivision = Nothing
+ }
+ }
+
+target_57355_v1 :: NaturalPerson
+target_57355_v1 = NaturalPerson
+ { full_name = "Jimmy Cherizier"
+ , last_name = "Cherizier"
+ , birthdate = YearMonthDay 1977 03 30
+ , nationality = HT
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = HT
+ , street_name = "Impasse Manius"
+ , street_number = "16"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Just "40B"
+ , zipcode = "Non existent"
+ , town_location = Just "Delmas"
+ , town_district = Nothing
+ , country_subdivision = Just "Port-au-Prince"
+ }
+ }
+
+target_57355_v2 :: NaturalPerson
+target_57355_v2 = NaturalPerson
+ { full_name = "Jimmy Barbeque"
+ , last_name = "Barbeque"
+ , birthdate = YearMonthDay 1977 03 30
+ , nationality = HT
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = HT
+ , street_name = "Impasse Manius"
+ , street_number = "16"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Just "40B"
+ , zipcode = "Non existent"
+ , town_location = Just "Delmas"
+ , town_district = Nothing
+ , country_subdivision = Just "Port-au-Prince"
+ }
+ }
+
+target_57355_v3 :: NaturalPerson
+target_57355_v3 = NaturalPerson
+ { full_name = "Jim Cherizier"
+ , last_name = "Cherizier"
+ , birthdate = YearMonthDay 1953 02 19
+ , nationality = HT
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = HT
+ , street_name = "Impasse Manius"
+ , street_number = "16"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Just "40B"
+ , zipcode = "Non existent"
+ , town_location = Just "Delmas"
+ , town_district = Nothing
+ , country_subdivision = Just "Port-au-Prince"
+ }
+ }
+
+target_57355_v4 :: NaturalPerson
+target_57355_v4 = NaturalPerson
+ { full_name = "Jimmy Cherisier"
+ , last_name = "Cherisier"
+ , birthdate = YearMonthDay 1953 02 19
+ , nationality = HT
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = HT
+ , street_name = "Non existent"
+ , street_number = "Non existent"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Nothing
+ , zipcode = "Non existent"
+ , town_location = Nothing
+ , town_district = Nothing
+ , country_subdivision = Nothing
+ }
+ }
+
+target_57355_v5 :: NaturalPerson
+target_57355_v5 = NaturalPerson
+ { full_name = "Jimmy Cherisier"
+ , last_name = "Cherisier"
+ , birthdate = YearMonthDay 1977 03 30
+ , nationality = HT
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = HT
+ , street_name = "Non existent"
+ , street_number = "Non existent"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Nothing
+ , zipcode = "Non existent"
+ , town_location = Nothing
+ , town_district = Nothing
+ , country_subdivision = Nothing
+ }
+ }
+
+target_57355_v6 :: NaturalPerson
+target_57355_v6 = NaturalPerson
+ { full_name = "Jim Cherizier"
+ , last_name = "Cherizier"
+ , birthdate = YearMonthDay 1953 02 19
+ , nationality = HT
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = HT
+ , street_name = "Non existent"
+ , street_number = "Non existent"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Nothing
+ , zipcode = "Non existent"
+ , town_location = Nothing
+ , town_district = Nothing
+ , country_subdivision = Nothing
+ }
+ }
diff --git a/test/Tests/Targets/Individuals/Trusted.hs b/test/Tests/Targets/Individuals/Trusted.hs
@@ -0,0 +1,264 @@
+-- SPDX-FileCopyrightText: 2025 LNRS
+--
+-- SPDX-License-Identifier: AGPL-3.0-or-later
+-- SPDX-License-Identifier: EUPL-1.2
+
+{-# LANGUAGE OverloadedStrings #-}
+
+module Tests.Targets.Individuals.Trusted
+ ( target_6
+ , public_figure_1
+ , public_figure_2
+ , public_figure_3
+ , public_figure_4
+ , public_figure_5
+ , imaginary_figure_1
+ , imaginary_figure_2
+ , imaginary_figure_3
+ , imaginary_figure_4
+ , imaginary_figure_5
+ ) where
+
+import Data.CountryCodes
+import Data.Time.Calendar
+
+import KYCheck.GLS.Type as GLS
+
+
+-- target :: NaturalPerson
+-- target = NaturalPerson
+-- { full_name =
+-- , last_name =
+-- , birthdate =
+-- , nationality =
+-- , national_id =
+-- , residential = GLS.Address { GLS.country =
+-- , street_name =
+-- , street_number =
+-- , GLS.lines =
+-- , building_name =
+-- , building_number =
+-- , zipcode =
+-- , town_location =
+-- , town_district =
+-- , country_subdivision =
+
+public_figure_1 :: NaturalPerson
+public_figure_1 = NaturalPerson
+ { full_name = "Georges Prosper Remi"
+ , last_name = "Remi"
+ , birthdate = YearMonthDay 1907 05 22
+ , nationality = BE
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = BE
+ , street_name = "Non existent"
+ , street_number = "Non existent"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Nothing
+ , zipcode = "Non existent"
+ , town_location = Just "Etterbeek"
+ , town_district = Just "Bruxelles"
+ , country_subdivision = Just "Brussels"
+ }
+ }
+
+public_figure_2 :: NaturalPerson
+public_figure_2 = NaturalPerson
+ { full_name = "Jeffrey Preston Bezos"
+ , last_name = "Bezos"
+ , birthdate = YearMonthDay 1964 01 12
+ , nationality = US
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = US
+ , street_name = "Negra Arroyo Lane"
+ , street_number = "308"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Nothing
+ , zipcode = "87112"
+ , town_location = Just "Albuquerque"
+ , town_district = Just "Bernalillo"
+ , country_subdivision = Just "New Mexico"
+ }
+ }
+
+public_figure_3 :: NaturalPerson
+public_figure_3 = NaturalPerson
+ { full_name = "Abraham Lincoln"
+ , last_name = "Lincoln"
+ , birthdate = YearMonthDay 1809 02 12
+ , nationality = US
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = US
+ , street_name = "Lincoln Farm Road"
+ , street_number = "2995"
+ , GLS.lines = Nothing
+ , building_name = Just "Abraham Lincoln Birthplace"
+ , building_number = Nothing
+ , zipcode = "42748"
+ , town_location = Just "Hodgenville"
+ , town_district = Just "LaRue"
+ , country_subdivision = Just "Kentucky"
+ }
+ }
+
+public_figure_4 :: NaturalPerson
+public_figure_4 = NaturalPerson
+ { full_name = "Willem-Alexander Claus George Ferdinand van Oranje-Nassau"
+ , last_name = "van Oranje-Nassau"
+ , birthdate = YearMonthDay 1980 04 30
+ , nationality = NL
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = NL
+ , street_name = "'s-Gravenhaagse Bos"
+ , street_number = "10"
+ , GLS.lines = Nothing
+ , building_name = Just "Huis ten Bosch"
+ , building_number = Nothing
+ , zipcode = "2594BD"
+ , town_location = Just "'s-Gravenhage"
+ , town_district = Nothing
+ , country_subdivision = Just "Zuid-Holland"
+ }
+ }
+
+public_figure_5 :: NaturalPerson
+public_figure_5 = NaturalPerson
+ { full_name = "Leonardo di ser Piero da Vinci"
+ , last_name = "da Vinci"
+ , birthdate = YearMonthDay 1452 04 15
+ , nationality = IT
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = IT
+ , street_name = "Non existent"
+ , street_number = "Non existent"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Nothing
+ , zipcode = "2594BD"
+ , town_location = Just "Vinci"
+ , town_district = Just "Florence"
+ , country_subdivision = Just "Tuscany"
+ }
+ }
+
+imaginary_figure_1 :: NaturalPerson
+imaginary_figure_1 = NaturalPerson
+ { full_name = "Papa Smurf"
+ , last_name = "Smurf"
+ , birthdate = YearMonthDay 1958 10 23
+ , nationality = FR
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = FR
+ , street_name = "Non existent"
+ , street_number = "Non existent"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Nothing
+ , zipcode = "Non existent"
+ , town_location = Nothing
+ , town_district = Nothing
+ , country_subdivision = Just "Smurf Village"
+ }
+ }
+
+imaginary_figure_2 :: NaturalPerson
+imaginary_figure_2 = NaturalPerson
+ { full_name = "Donald Fauntleroy Duck"
+ , last_name = "Duck"
+ , birthdate = YearMonthDay 1934 06 09
+ , nationality = US
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = US
+ , street_name = "South Harbor Boulevard"
+ , street_number = "1313"
+ , GLS.lines = Nothing
+ , building_name = Just "Disneyland"
+ , building_number = Nothing
+ , zipcode = "92802"
+ , town_location = Just "Anaheim"
+ , town_district = Just "Orange"
+ , country_subdivision = Just "California"
+ }
+ }
+
+imaginary_figure_3 :: NaturalPerson
+imaginary_figure_3 = NaturalPerson
+ { full_name = "Willy Wonka"
+ , last_name = "Wonka"
+ , birthdate = YearMonthDay 1964 01 17
+ , nationality = GB
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = GB
+ , street_name = "Non existent"
+ , street_number = "Non existent"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Nothing
+ , zipcode = "Non existent"
+ , town_location = Just "Cardiff"
+ , town_district = Nothing
+ , country_subdivision = Just "Wales"
+ }
+ }
+
+imaginary_figure_4 :: NaturalPerson
+imaginary_figure_4 = NaturalPerson
+ { full_name = "Bilbo Baggins"
+ , last_name = "Baggins"
+ , birthdate = YearMonthDay 1937 09 21
+ , nationality = GB
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = GB
+ , street_name = "Bagshot Row"
+ , street_number = "Non existent"
+ , GLS.lines = Nothing
+ , building_name = Just "Bag End"
+ , building_number = Nothing
+ , zipcode = "Non existent"
+ , town_location = Just "Hobbiton"
+ , town_district = Just "Westfarthing"
+ , country_subdivision = Just "The Shire"
+ }
+ }
+
+imaginary_figure_5 :: NaturalPerson
+imaginary_figure_5 = NaturalPerson
+ { full_name = "Bruce Wayne"
+ , last_name = "Wayne"
+ , birthdate = YearMonthDay 1972 02 19
+ , nationality = US
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = US
+ , street_name = "Park Drive"
+ , street_number = "224"
+ , GLS.lines = Nothing
+ , building_name = Just "Wayne Manor"
+ , building_number = Nothing
+ , zipcode = "19007"
+ , town_location = Just "Bristol Township"
+ , town_district = Just "Bucks"
+ , country_subdivision = Just "Pennsylvania"
+ }
+ }
+
+target_6 :: NaturalPerson
+target_6 = NaturalPerson
+ { full_name = "Bowser"
+ , last_name = "Bowser"
+ , birthdate = YearMonthDay 1985 09 13
+ , nationality = JP
+ , national_id = "012345ABCDEF"
+ , residential = GLS.Address { GLS.country = JP
+ , street_name = "Non existent"
+ , street_number = "Non existent"
+ , GLS.lines = Nothing
+ , building_name = Nothing
+ , building_number = Nothing
+ , zipcode = "Non existent"
+ , town_location = Nothing
+ , town_district = Nothing
+ , country_subdivision = Nothing
+ }
+ }
diff --git a/test/Tests/Targets/Real.hs b/test/Tests/Targets/Real.hs
@@ -1,558 +0,0 @@
--- SPDX-FileCopyrightText: 2025 LNRS
---
--- SPDX-License-Identifier: AGPL-3.0-or-later
--- SPDX-License-Identifier: EUPL-1.2
-
-{-# LANGUAGE OverloadedStrings #-}
-
-module Tests.Targets.Real
- ( target_5144
- , target_5266
- , target_49816_v1
- , target_49816_v2
- , target_49816_v3
- , target_49816_v4
- , target_43462
- , target_43616
- , target_43641
- , target_43718
- , target_43662
- , target_43611
- , target_29723
- , target_38925_v1
- , target_38925_v2
- , target_38925_v3
- , target_38925_v4
- , target_38925_v5
- , target_68815
- , target_57355_v1
- , target_57355_v2
- , target_57355_v3
- , target_57355_v4
- , target_57355_v5
- , target_57355_v6
- ) where
-
-import Data.CountryCodes
-import Data.Time.Calendar
-
-import KYCheck.GLS.Type as GLS
-
-
--- target :: NaturalPerson
--- target = NaturalPerson
--- { full_name =
--- , last_name =
--- , birthdate =
--- , nationality =
--- , national_id =
--- , residential = GLS.Address { GLS.country =
--- , street_name =
--- , street_number =
--- , GLS.lines =
--- , building_name =
--- , building_number =
--- , zipcode =
--- , town_location =
--- , town_district =
--- , country_subdivision =
-
-target_5144 :: NaturalPerson
-target_5144 = NaturalPerson
- { full_name = "Dmitri Aliaksandravich Lukashenko"
- , last_name = "Lukashenko"
- , birthdate = YearMonthDay 1980 03 23
- , nationality = BY
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = BY
- , street_name = "ул. Старовиленская"
- , street_number = "4"
- , GLS.lines = Just "President's Sports Club"
- , building_name = Nothing
- , building_number = Nothing
- , zipcode = "220029"
- , town_location = Just "г. Минск"
- , town_district = Nothing
- , country_subdivision = Nothing
- }
- }
-
-target_5266 :: NaturalPerson
-target_5266 = NaturalPerson
- { full_name = "Natallia Alexeeuna Chatviartkova"
- , last_name = "Chatviartkova"
- , birthdate = YearMonthDay 1960 01 01 -- Made up birth date
- , nationality = RU
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = RU
- , street_name = "Non existent"
- , street_number = "Non existent"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Nothing
- , zipcode = "Non existent"
- , town_location = Nothing
- , town_district = Nothing
- , country_subdivision = Nothing
- }
- }
-
-target_49816_v1 :: NaturalPerson
-target_49816_v1 = NaturalPerson
- { full_name = "Vladimir Vladimirovich Putin"
- , last_name = "Putin"
- , birthdate = YearMonthDay 1952 10 07
- , nationality = RU
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = RU
- , street_name = "Инжирный переулок"
- , street_number = "1"
- , GLS.lines = Nothing
- , building_name = Just "Bocharov Ruchey"
- , building_number = Nothing
- , zipcode = "354008"
- , town_location = Just "Sochi"
- , town_district = Just "Town district of Sochi"
- , country_subdivision = Just "Krasnodar Krai"
- }
- }
-
-target_49816_v2 :: NaturalPerson
-target_49816_v2 = NaturalPerson
- { full_name = "Vladimir Mouse"
- , last_name = "Mouse"
- , birthdate = YearMonthDay 1952 10 07
- , nationality = RU
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = RU
- , street_name = "Инжирный переулок"
- , street_number = "1"
- , GLS.lines = Nothing
- , building_name = Just "Bocharov Ruchey"
- , building_number = Nothing
- , zipcode = "354008"
- , town_location = Just "Sochi"
- , town_district = Just "Town district of Sochi"
- , country_subdivision = Just "Krasnodar Krai"
- }
- }
-
-target_49816_v3 :: NaturalPerson
-target_49816_v3 = NaturalPerson
- { full_name = "Mickey Mouse"
- , last_name = "Mouse"
- , birthdate = YearMonthDay 1951 04 12
- , nationality = RU
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = RU
- , street_name = "Инжирный переулок"
- , street_number = "1"
- , GLS.lines = Nothing
- , building_name = Just "Bocharov Ruchey"
- , building_number = Nothing
- , zipcode = "354008"
- , town_location = Just "Sochi"
- , town_district = Just "Town district of Sochi"
- , country_subdivision = Just "Krasnodar Krai"
- }
- }
-
-target_49816_v4 :: NaturalPerson
-target_49816_v4 = NaturalPerson
- { full_name = "Vladimir Vladimirovich Putin"
- , last_name = "Putin"
- , birthdate = YearMonthDay 1952 10 07
- , nationality = FR
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = FR
- , street_name = "Non existent"
- , street_number = "Non existent"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Nothing
- , zipcode = "Non existent"
- , town_location = Nothing
- , town_district = Nothing
- , country_subdivision = Nothing
- }
- }
-
-target_43462 :: NaturalPerson
-target_43462 = NaturalPerson
- { full_name = "Aleksandr Petrovich Barsukov"
- , last_name = "Barsukov"
- , birthdate = YearMonthDay 1965 04 29
- , nationality = BY
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = BY
- , street_name = "Non existent"
- , street_number = "Non existent"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Nothing
- , zipcode = "Non existent"
- , town_location = Nothing
- , town_district = Nothing
- , country_subdivision = Nothing
- }
- }
-
-target_43616 :: NaturalPerson
-target_43616 = NaturalPerson
- { full_name = "Oleg Anatolievich Chernyshev"
- , last_name = "Chernyshev"
- , birthdate = YearMonthDay 1985 07 27 -- Made up birth date
- , nationality = RU
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = RU
- , street_name = "Non existent"
- , street_number = "Non existent"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Nothing
- , zipcode = "Non existent"
- , town_location = Nothing
- , town_district = Nothing
- , country_subdivision = Nothing
- }
- }
-
-target_43641 :: NaturalPerson
-target_43641 = NaturalPerson
- { full_name = "Vadzim Dzmitryevich Ipatau"
- , last_name = "Ipatau"
- , birthdate = YearMonthDay 1964 10 30
- , nationality = BY
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = BY
- , street_name = "Non existent"
- , street_number = "Non existent"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Nothing
- , zipcode = "Non existent"
- , town_location = Nothing
- , town_district = Nothing
- , country_subdivision = Nothing
- }
- }
-
-target_43718 :: NaturalPerson
-target_43718 = NaturalPerson
- { full_name = "Irina Aliaksandrauna Tselikavets"
- , last_name = "Tselikavets"
- , birthdate = YearMonthDay 1976 11 02
- , nationality = BY
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = BY
- , street_name = "Non existent"
- , street_number = "Non existent"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Nothing
- , zipcode = "Non existent"
- , town_location = Nothing
- , town_district = Nothing
- , country_subdivision = Nothing
- }
- }
-
-target_43662 :: NaturalPerson
-target_43662 = NaturalPerson
- { full_name = "Olga Leonidovna Doroshenko"
- , last_name = "Doroshenko"
- , birthdate = YearMonthDay 1976 09 02 -- Made up birth month and day
- , nationality = BY
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = BY
- , street_name = "Non existent"
- , street_number = "Non existent"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Nothing
- , zipcode = "Non existent"
- , town_location = Nothing
- , town_district = Nothing
- , country_subdivision = Nothing
- }
- }
-
-target_43611 :: NaturalPerson
-target_43611 = NaturalPerson
- { full_name = "Vladimir Viktorovich Kalach"
- , last_name = "Kalach"
- , birthdate = YearMonthDay 1960 12 22 -- Made up birth date
- , nationality = BY
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = BY
- , street_name = "Non existent"
- , street_number = "Non existent"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Nothing
- , zipcode = "Non existent"
- , town_location = Nothing
- , town_district = Nothing
- , country_subdivision = Nothing
- }
- }
-
-target_29723 :: NaturalPerson
-target_29723 = NaturalPerson
- { full_name = "Равиль Закариевич Халиков"
- , last_name = "Халиков"
- , birthdate = YearMonthDay 1969 02 23
- , nationality = RU
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = RU
- , street_name = "Non existent"
- , street_number = "Non existent"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Nothing
- , zipcode = "Non existent"
- , town_location = Nothing
- , town_district = Nothing
- , country_subdivision = Nothing
- }
- }
-
-target_38925_v1 :: NaturalPerson
-target_38925_v1 = NaturalPerson
- { full_name = "Solomon Grundy"
- , last_name = "Grundy"
- , birthdate = YearMonthDay 1800 06 06
- , nationality = BE
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = HT
- , street_name = "Kryzhizhanovskogo str."
- , street_number = "5A"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Just "64"
- , zipcode = "Non existent"
- , town_location = Just "Gresovskoe"
- , town_district = Nothing
- , country_subdivision = Nothing
- }
- }
-
-target_38925_v2 :: NaturalPerson
-target_38925_v2 = NaturalPerson
- { full_name = "Natalia Ivanovna Bezruchenko"
- , last_name = "Bezruchenko"
- , birthdate = YearMonthDay 1913 02 27
- , nationality = BE
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = BE
- , street_name = "Non existent"
- , street_number = "Non existent"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Nothing
- , zipcode = "Non existent"
- , town_location = Nothing
- , town_district = Nothing
- , country_subdivision = Nothing
- }
- }
-
-target_38925_v3 :: NaturalPerson
-target_38925_v3 = NaturalPerson
- { full_name = "Mickey Bezruchenko"
- , last_name = "Bezruchenko"
- , birthdate = YearMonthDay 1979 08 22
- , nationality = BE
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = HT
- , street_name = "Non existent"
- , street_number = "Non existent"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Nothing
- , zipcode = "Non existent"
- , town_location = Nothing
- , town_district = Nothing
- , country_subdivision = Nothing
- }
- }
-
-target_38925_v4 :: NaturalPerson
-target_38925_v4 = NaturalPerson
- { full_name = "Mickey Bezruchenko"
- , last_name = "Bezruchenko"
- , birthdate = YearMonthDay 1960 02 13
- , nationality = BE
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = HT
- , street_name = "Kryzhizhanovskogo str."
- , street_number = "5A"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Just "64"
- , zipcode = "Non existent"
- , town_location = Just "Gresovskoe"
- , town_district = Nothing
- , country_subdivision = Just "Autonomous Republic of Crimea"
- }
- }
-
-target_38925_v5 :: NaturalPerson
-target_38925_v5 = NaturalPerson
- { full_name = "Natalia Ivanovna Bezruchenko"
- , last_name = "Bezruchenko"
- , birthdate = YearMonthDay 1979 08 22
- , nationality = RU
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = RU
- , street_name = "Kryzhizhanovskogo str."
- , street_number = "5A"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Just "64"
- , zipcode = "Non existent"
- , town_location = Just "Gresovskoe"
- , town_district = Nothing
- , country_subdivision = Nothing
- }
- }
-
-target_68815 :: NaturalPerson
-target_68815 = NaturalPerson
- { full_name = "Innocent Vitelhomme"
- , last_name = "Vitelhomme"
- , birthdate = YearMonthDay 1986 03 27
- , nationality = HT
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = HT
- , street_name = "Non existent"
- , street_number = "Non existent"
- , GLS.lines = Just "Tabarre 49"
- , building_name = Nothing
- , building_number = Just "64"
- , zipcode = "Non existent"
- , town_location = Just "Port-au-Prince"
- , town_district = Nothing
- , country_subdivision = Nothing
- }
- }
-
-target_57355_v1 :: NaturalPerson
-target_57355_v1 = NaturalPerson
- { full_name = "Jimmy Cherizier"
- , last_name = "Cherizier"
- , birthdate = YearMonthDay 1977 03 30
- , nationality = HT
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = HT
- , street_name = "Impasse Manius"
- , street_number = "16"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Just "40B"
- , zipcode = "Non existent"
- , town_location = Just "Delmas"
- , town_district = Nothing
- , country_subdivision = Just "Port-au-Prince"
- }
- }
-
-target_57355_v2 :: NaturalPerson
-target_57355_v2 = NaturalPerson
- { full_name = "Jimmy Barbeque"
- , last_name = "Barbeque"
- , birthdate = YearMonthDay 1977 03 30
- , nationality = HT
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = HT
- , street_name = "Impasse Manius"
- , street_number = "16"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Just "40B"
- , zipcode = "Non existent"
- , town_location = Just "Delmas"
- , town_district = Nothing
- , country_subdivision = Just "Port-au-Prince"
- }
- }
-
-target_57355_v3 :: NaturalPerson
-target_57355_v3 = NaturalPerson
- { full_name = "Jim Cherizier"
- , last_name = "Cherizier"
- , birthdate = YearMonthDay 1953 02 19
- , nationality = HT
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = HT
- , street_name = "Impasse Manius"
- , street_number = "16"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Just "40B"
- , zipcode = "Non existent"
- , town_location = Just "Delmas"
- , town_district = Nothing
- , country_subdivision = Just "Port-au-Prince"
- }
- }
-
-target_57355_v4 :: NaturalPerson
-target_57355_v4 = NaturalPerson
- { full_name = "Jimmy Cherisier"
- , last_name = "Cherisier"
- , birthdate = YearMonthDay 1953 02 19
- , nationality = HT
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = HT
- , street_name = "Non existent"
- , street_number = "Non existent"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Nothing
- , zipcode = "Non existent"
- , town_location = Nothing
- , town_district = Nothing
- , country_subdivision = Nothing
- }
- }
-
-target_57355_v5 :: NaturalPerson
-target_57355_v5 = NaturalPerson
- { full_name = "Jimmy Cherisier"
- , last_name = "Cherisier"
- , birthdate = YearMonthDay 1977 03 30
- , nationality = HT
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = HT
- , street_name = "Non existent"
- , street_number = "Non existent"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Nothing
- , zipcode = "Non existent"
- , town_location = Nothing
- , town_district = Nothing
- , country_subdivision = Nothing
- }
- }
-
-target_57355_v6 :: NaturalPerson
-target_57355_v6 = NaturalPerson
- { full_name = "Jim Cherizier"
- , last_name = "Cherizier"
- , birthdate = YearMonthDay 1953 02 19
- , nationality = HT
- , national_id = "012345ABCDEF"
- , residential = GLS.Address { GLS.country = HT
- , street_name = "Non existent"
- , street_number = "Non existent"
- , GLS.lines = Nothing
- , building_name = Nothing
- , building_number = Nothing
- , zipcode = "Non existent"
- , town_location = Nothing
- , town_district = Nothing
- , country_subdivision = Nothing
- }
- }
diff --git a/test/data/test.config.dhall b/test/data/test.config.dhall
@@ -8,9 +8,10 @@ let Verbosity = < Test | Silent | Info | Errors | Debug >
in { verbosity = Verbosity.Test
, ssl_location = "test-sanction-list.xml"
- , threshold_ratio = 0.8 -- Percentage
- , threshold_points = 200 -- Points needed to flag entry as match
- , perfect_points = 300 -- Amount of points required to get 100% confidence
+ , threshold_ratio = 0.8 -- Percentage
+ , threshold_points = 200 -- Points needed to flag entry as match
+ , threshold_confidence = 0.67 -- Confidence needed to flag entry as match
+ , perfect_points = 300 -- Amount of points required to get 100% confidence
, weight_address = 150
, weight_date = 100
, weight_id = 200