How to use the konlpy.stream.daum.DaumStreamer function in konlpy

To help you get started, we’ve selected a few konlpy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github konlpy / konlpy / test / test_stream_daum.py View on Github external
def test_daum_streamer():
    daum = DaumStreamer()
    daum.options.n_limits = 1
    daum.options.display_rank = True
    daum.options.verbose = True
    daum.options.interval = 3
    daum.stream()
github konlpy / konlpy / konlpy / stream / daum.py View on Github external
def main():
    app = DaumStreamer(is_async=False)
    app.options.verbose = True
    app.show_options()
    app.stream()
github konlpy / konlpy / konlpy / stream / daum.py View on Github external
def __init__(self, is_async=True):
        super(DaumStreamer, self).__init__(is_async=is_async)
        self.is_async = is_async

        parser = self.get_parser()
        parser.add_argument(
            '-d', '--display_rank',
            help="display rank in results and commandline.",
            action="store_true"
        )
        parser.add_argument(
            '-i', '--interval',
            help="streaming interval(secs)",
            default=60,
            type=int
        )
        parser.add_argument(
            '-n', '--n_limits',