Skip to main content

ne_pretty rule find entity

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

ne_pretty-0.0.7-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file ne_pretty-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: ne_pretty-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for ne_pretty-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 2d17ae9b94ba231abe57d2fe9a8573f587edcdbda8ce4ec4f272e1b12f295ab4
MD5 9f1d7cb326fee0f5197f41417c91240b
BLAKE2b-256 252c8d236d3a30989095eff7484919227815cf5048d7eaac97a0185371869cc6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page