How to use the konlpy.stream.naver.NaverStreamer 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_naver.py View on Github external
def test_naver_streamer():
    naver = NaverStreamer()
    naver.options.n_limits = 1
    naver.options.display_rank = True
    naver.options.verbose = True
    naver.options.interval = 3
    naver.stream()
github konlpy / konlpy / konlpy / stream / naver.py View on Github external
def __init__(self, is_async=True):
        super(NaverStreamer, 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',
github konlpy / konlpy / konlpy / stream / naver.py View on Github external
def main():
    app = NaverStreamer(is_async=False)
    app.options.verbose = True
    app.show_options()
    app.stream()