document.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:gransk 作者: pcbje 项目源码 文件源码
def add(self, offset, entity_type, entity_value):
    """
    Adds a found entity to list. The `offset` parameter is used as key, so
    only one entity can start at the given offset.

    :param offset: Offset in extracted text where the found entity starts.
    :param entity_type: The type of entity that is found.
    :param entity_value: The found entity.
    :type start: ``int``
    :type entity_type: ``unicode``
    :type entity_value: ``unicode``
    """
    self.obj[offset] = {
        'type': entity_type,
        'value': entity_value,
        'entity_id': re.sub(r'\s', '_', entity_value).lower()
    }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号