Skip to content

Commit

Permalink
fix: remove euparl logging
Browse files Browse the repository at this point in the history
  • Loading branch information
BeritJanssen committed Sep 25, 2024
1 parent 1e89cd4 commit 1776a24
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions backend/corpora/parliament/euparl.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from datetime import datetime
from itertools import chain
import logging
import os
from typing import Tuple, Union

Expand All @@ -26,8 +25,7 @@
LPV = Namespace('http://purl.org/linkedpolitics/vocabulary/')

def add_speaker_metadata(filename: str) -> dict:
''' Parse all relevant metadata out of MembersOfParliament ttl to dict'''
logger = logging.getLogger("indexing")
"""Parse all relevant metadata out of MembersOfParliament ttl to dict"""
speaker_dict = {}
speaker_graph = Graph()
speaker_graph.parse(filename)
Expand All @@ -36,7 +34,7 @@ def add_speaker_metadata(filename: str) -> dict:
try:
name = speaker_graph.value(speaker, FOAF.name).value
except AttributeError:
logger.info(f"Cannot find name of speaker subject {speaker}")
# We cannot find the name of the speaker subject
continue
country_node = speaker_graph.value(speaker, LPV.countryOfRepresentation)
country_name = speaker_graph.value(country_node, RDFS.label).value
Expand Down

0 comments on commit 1776a24

Please sign in to comment.