13 lines
415 B
Python
13 lines
415 B
Python
import time
|
|
from loguru import logger
|
|
|
|
def sawaw_analyze_method(func):
|
|
"""
|
|
A decorator declares that the function can take an SAWAWEntry as input and populate the sentiment_results field.
|
|
"""
|
|
def inner(*args, **kwargs):
|
|
t = time.time()
|
|
result = func(*args, **kwargs)
|
|
logger.debug("SAWAW analysis took {:.2f} s.".format(time.time() - t))
|
|
return result
|
|
return inner |