Source code for konlp.parse.api

# Copyright (C) 2017 - 0000 KoNLTK project
#
# Korean Natural Language Toolkit:
#
#
# Author: HyunYoung Lee <hyun02.engineer@gmail.com>
#         GyuHyeon Nam <ngh3053@gmail.com>
#         Seungshik Kang <sskang@kookmin.ac.kr>
# URL: <https://www.konltk.org>
# For license information, see LICENSE.TXT
# ============================================================
"""Korean Natural Language Toolkit parsing interface"""

from abc import ABCMeta, abstractmethod
from six import add_metaclass


[docs]@add_metaclass(ABCMeta) class ParserI(object): """Parser Interface"""
[docs] @abstractmethod def tag(self, tokens): """ Determine the most appropriate tag sequence for the given token sequence, and return a corresponding list of tagged tokens. A tagged token is encoded as a tuple ``(token, tag)``. :param tokens: The list of string token :type tokens: list(string) :raises: NotImplementedError """ raise NotImplementedError()