Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def read_chat(*filenames, **kwargs):
"""
Create a corpus object based on *filenames*.
:param filenames: one or multiple filenames (absolute-path or relative to
the current directory; with or without glob matching patterns)
:param kwargs: Keyword arguments. Currently, only ``encoding`` is
recognized, which defaults to 'utf8'.
"""
encoding = kwargs.get("encoding", ENCODING)
return CantoneseCHATReader(*filenames, encoding=encoding)
def __init__(self, *filenames, **kwargs):
encoding = kwargs.get("encoding", ENCODING)
super(CantoneseCHATReader, self).__init__(
*filenames, encoding=encoding
)