From 3f2666612353da3cbbb8b572c5e55e590ecea8f3 Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Sat, 2 Apr 2022 19:31:53 +0200 Subject: [PATCH] Extend lists of uncertainty prefixes and suffixes Close #10, close #11, close #12 --- src/NodaUncertaintyHelper.php | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/src/NodaUncertaintyHelper.php b/src/NodaUncertaintyHelper.php index 927641d..c3ee9d3 100644 --- a/src/NodaUncertaintyHelper.php +++ b/src/NodaUncertaintyHelper.php @@ -37,10 +37,10 @@ final class NodaUncertaintyHelper { "Vermtl. ", "vermutlich ", "Vermutlich ", - "wohl ", "wahrscheinlich ", - "Wohl ", "Wahrscheinlich ", + "wohl ", + "Wohl ", ]; const PERSINST_UNCERTAINTY_SUFFIXES = [ @@ -76,15 +76,26 @@ final class NodaUncertaintyHelper { "gegen ", "um ", "verm. ", + "Verm. ", "vermtl. ", + "Vermtl. ", "vermutlich ", + "Vermutlich ", "wohl ", "wohl um ", + "Wohl ", + "Wohl um ", ]; const TIME_UNCERTAINTY_SUFFIXES = [ "(?)", "?", + " (ca.)", + " [ca.]", + " (circa)", + " [circa]", + " (verm.)", + " (vermutl.)", " körül", ", um", ]; @@ -120,13 +131,20 @@ final class NodaUncertaintyHelper { "vlt. ", "wohl ", "Wohl ", + "verm. ", + "vermut. ", "vermtl. ", "vermutlich ", ]; const PLACE_UNCERTAINTY_SUFFIXES = [ "(?)", + "(vermutl.)", + "[vermutl.]", + "(vermutlich)", "[vermutlich]", + "(wohl)", + "[wohl]", "?", ]; @@ -178,7 +196,8 @@ final class NodaUncertaintyHelper { } /** - * Attempts guessing whether time is uncertain. + * Attempts guessing whether time is uncertain. Returns true if the name + * indicates certainty, false if it indicates uncertainty. * * @param string $zeit_name Time name. * @@ -240,7 +259,8 @@ final class NodaUncertaintyHelper { } /** - * Attempts guessing whether place is uncertain. + * Attempts guessing whether place is uncertain. Returns true if the name + * indicates certainty, false if it indicates uncertainty. * * @param string $ort_name Place name. * @@ -300,7 +320,8 @@ final class NodaUncertaintyHelper { } /** - * Attempts guessing whether persinst is uncertain. + * Attempts guessing whether persinst is uncertain. Returns true if the name + * indicates certainty, false if it indicates uncertainty. * * @param string $name Persinst name. *