Skip to content

Commit

Permalink
log exception
Browse files Browse the repository at this point in the history
  • Loading branch information
dianzrong committed Jun 21, 2023
1 parent 9f067a4 commit 4b9c68a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openadapt/strategies/mixins/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ class MyReplayStrategy(SummaryReplayStrategyMixin):
from openadapt.models import Recording
from openadapt.strategies.base import BaseReplayStrategy


from sumy.summarizers.lsa import LsaSummarizer
from sumy.parsers.plaintext import PlaintextParser
from sumy.nlp.tokenizers import Tokenizer
from sumy.nlp.stemmers import Stemmer
from sumy.utils import get_stop_words
import nltk
from loguru import logger


class SummaryReplayStrategyMixin(BaseReplayStrategy):
Expand Down Expand Up @@ -51,6 +51,7 @@ def get_summary(
Tokenizer("english")
break
except:
logger.info("Doesn't currently have punkt")
nltk.download("punkt")

parser = PlaintextParser.from_string(text, Tokenizer("english"))
Expand Down

0 comments on commit 4b9c68a

Please sign in to comment.