Skip to content

Commit

Permalink
Skip posts with no tokens in post topic matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
stijn-uva committed Jan 10, 2024
1 parent 9963cd8 commit be6ea8c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions processors/text-analysis/post_topic_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ def process(self):
raise ProcessorInterruptedException("Interrupted while writing results file")

# Grab metadata related to post
if post.get('id') not in token_metadata:
# post has no tokens...
continue

token_data = token_metadata[str(post.get('id'))]
model_data = model_metadata[token_data.get('filename')]
interval = token_data['interval']
Expand Down

0 comments on commit be6ea8c

Please sign in to comment.