From 95de1615efb0380edc63f7048bac2a33a0e51dda Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Fri, 27 Oct 2023 19:06:08 +0200 Subject: [PATCH] Identify, parse and remove some more uncertainty indicators --- src/NodaUncertaintyHelper.php | 4 ++++ tests/NodaUncertaintyHelperTest.php | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/NodaUncertaintyHelper.php b/src/NodaUncertaintyHelper.php index 82c6e9f..13be37f 100644 --- a/src/NodaUncertaintyHelper.php +++ b/src/NodaUncertaintyHelper.php @@ -44,6 +44,7 @@ final class NodaUncertaintyHelper { "Wahrscheinlich ", "wohl ", "Wohl ", + "?", ]; const PERSINST_UNCERTAINTY_SUFFIXES = [ @@ -155,7 +156,10 @@ final class NodaUncertaintyHelper { "vermut. ", "vermtl. ", "vermutlich ", + "vermutlich: ", "Vermutlich ", + "Vermutlich: ", + "?", ]; const PLACE_UNCERTAINTY_SUFFIXES = [ diff --git a/tests/NodaUncertaintyHelperTest.php b/tests/NodaUncertaintyHelperTest.php index fa0e048..5d339a7 100644 --- a/tests/NodaUncertaintyHelperTest.php +++ b/tests/NodaUncertaintyHelperTest.php @@ -58,6 +58,8 @@ final class NodaUncertaintyHelperTest extends TestCase { self::assertEquals(NodaUncertaintyHelper::guessPlaceCertainty("wohl Berlin"), false); self::assertEquals(NodaUncertaintyHelper::guessPlaceCertainty("Berlin"), true); + self::assertEquals(NodaUncertaintyHelper::guessPlaceCertainty("?-Italien"), false); + } /** @@ -69,6 +71,7 @@ final class NodaUncertaintyHelperTest extends TestCase { self::assertEquals(NodaUncertaintyHelper::cleanUncertaintyIndicatorsPersinst("wohl Barbarossa"), "Barbarossa"); self::assertEquals(NodaUncertaintyHelper::cleanUncertaintyIndicatorsPersinst("Barbarossa"), "Barbarossa"); + self::assertEquals(NodaUncertaintyHelper::cleanUncertaintyIndicatorsPersinst("?-Barbarossa"), "Barbarossa"); }