Identify, parse and remove some more uncertainty indicators

This commit is contained in:
Joshua Ramon Enslin 2023-10-27 19:06:08 +02:00
parent bbbc84015b
commit 95de1615ef
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE
2 changed files with 7 additions and 0 deletions

View File

@ -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 = [

View File

@ -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");
}