Skip to main content

ne_pretty rule find entity

# -*- coding: utf-8 -*-
# @Time    : 2022/3/17 14:39
# @Author  : wyw

#增加实体
from ne_pretty import e_add_context
#正则添加实体
from ne_pretty import e_add_rule_context
#连接相邻实体
from ne_pretty import e_do_connect
#连接交叉实体,保留最大
from ne_pretty import e_cross_do_connect
#扩展前缀
from ne_pretty import e_extend_prefix
#扩展后缀
from ne_pretty import e_extend_suffix
#删除前缀
from ne_pretty import e_remove_prefix
#删除后缀
from ne_pretty import e_remove_suffix

#删除实体包含
from ne_pretty import e_remove_contain
#删除指定实体
from ne_pretty import e_remove_eq
#去重
from ne_pretty import e_remove_dup
#比较不同
from ne_pretty import entity_diff


filename = r'C:\Users\acer\Desktop\demo\text.txt'

e_add_rule_context(filename,filename,'地点','(北京)')

#e_add_context(filename,filename,'地点','北京')


#e_remove_eq(filename,filename,'地点','北京')


#e_remove_suffix(filename,filename,'地点','北京')

#e_remove_prefix(filename,filename,'地点','北京')


#e_remove_contain(filename,filename,'作案手段')

#e_remove_dup(filename,filename)

Metadata

Release files for ne-pretty 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for ne-pretty 0.0.7
File Interpreter ABI Platform
ne_pretty-0.0.7-py3-none-any.whl Python 3 none any Details

Release files / ne_pretty-0.0.7-py3-none-any.whl

Download URL ne_pretty-0.0.7-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d17ae9b94ba231abe57d2fe9a8573f587edcdbda8ce4ec4f272e1b12f295ab4
BLAKE2b-256 checksum
How to use checksums
252c8d236d3a30989095eff7484919227815cf5048d7eaac97a0185371869cc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.5.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

Release history Release notifications | RSS feed

This release

0.0.7 This release

1 release file

0.0.6

1 release file

0.0.4

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page