From adb025213096860a3a5b168c5a33d470fc88c4fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20Schl=C3=BCter?= Date: Sat, 17 Jan 2015 17:12:10 +0100 Subject: [PATCH] Fix bug so one potential place following another directly is also matched --- analyze.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/analyze.py b/analyze.py index 4103cc8..88fdde6 100644 --- a/analyze.py +++ b/analyze.py @@ -30,7 +30,10 @@ def get_potential_places(article_place, article_body): # we stop the match, so append the current match places.append(current_match) current_match = [] - is_matching = False + + # whe we're looking at a preposition again, just start new match + if tuple[1] not in ("APPR", "APPRART"): + is_matching = False else: # start matching when we have a preposition if tuple[1] in ("APPR", "APPRART"):