【引用】Oracle全文检索方面的研究(全2)

本文详细介绍了Oracle文本搜索中Filter属性的作用及各类过滤器的功能,包括CHARSET_FILTER、NULL_FILTER、AUTO_FILTER、MAIL_FILTER、USER_FILTER和PROCEDURE_FILTER等,并提供了具体的创建示例。

3.2 Filter 属性

过滤器负责将各种文件格式的数据转换为纯文本格式,索引管道中的其他组件只能处理纯文本数据,不能识别 microsoft word 或 excel 等文件格式,filter 有charset_filter、

inso_filter、null_filter、user_filter、procedure_filter 几种类型。(可将文档格式转化为数据库文本格式等。)

 

 

 

 

 

3.2.1 CHARSET_FILTER

把文档从非数据库字符转化成数据库字符(原文:Use the CHARSET_FILTER to convert

documents from a non-database character set to the character set used by the database)

 

例子:

create table hdocs ( id number primary key, fmt varchar2(10), cset varchar2(20),

text varchar2(80)

);

begin

cxt_ddl.create.preference('cs_filter', 'CHARSET_FILTER');

ctx_ddl.set_attribute('cs_filter', 'charset', 'UTF8');

end

insert into hdocs values(1, 'text', 'WE8ISO8859P1', '/docs/iso.txt');

insert into hdocs values (2, 'text', 'UTF8', '/docs/utf8.txt');

commit;

create index hdocsx on hdocs(text) indextype is ctxsys.context

parameters ('datastore ctxsys.file_datastore

filter cs_filter

format column fmt

charset column cset');

 

 

 

3.2.2 NULL_FILTER

默认属性,不进行任何过滤

oracle 不建议对html、xml 和plain text 使用auto_filter 参数,oracle 建议你使用

null_filter 和section group type

--建立null filter

create index myindex on docs(htmlfile) indextype is ctxsys.context

parameters('filter ctxsys.null_filter section group ctxsys.html_section_group');

Filter 的默认值会受到索引字段类型和datastore 的类型的影响,对于存储在数据库中的

varchar2、char 和clob 字段中的数据,oracle 自动选择了null_filtel,若datastore 的属性设置为

file_datastore,oracle 会选择 auto_filter 作为默认值。

 

3.2.3 AUTO_FILTER

通用的过滤器,适用于大部分文档,包括PDF 和Ms word,过滤器还会自动识别出plain-text, HTML, XHTML,

SGML 和XML 文档

Create table my_filter (id number, docs varchar2(1000));

Insert into my_filter values (1, 'Expert Oracle Database Architecture.pdf');

Insert into my_filter values (2, '1.txt');

Insert into my_filter values (3, '2.doc');

commit;

/

--建立 file datastore

Begin

ctx_ddl.create_preference('test_filter', 'file_datastore');

ctx_ddl.set_attribute('test_filter', 'path', '/opt/tmp');

End;

--错误信息表

select * from CTX_USER_INDEX_ERRORS

--建立 auto filter

Create index idx_m_filter on my_filter (docs) indextype is ctxsys.context

parameters ('datastore test_filter filter ctxsys.auto_filter');

select * from my_filter where contains(docs,'oracle')>0

 

AUTO_FILTER 能自动识别出大部分格式的文档,我们也可以显示的通过column 来指定文档类型,有text,binary,ignore,设置为binary 的文档使用auto_filter,设置为text 的文档使用null_filter,设置为ignore的文档不进行索引。

create table hdocs (id number primary key,fmt varchar2(10),text varchar2(80));

insert into hdocs values(1, 'binary', '/docs/myword.doc');

insert in hdocs values (2, 'text', '/docs/index.html');

insert in hdocs values (2, 'ignore', '/docs/1.txt');

commit;

create index hdocsx on hdocs(text) indextype is ctxsys.context

parameters ('datastore ctxsys.file_datastore filter ctxsys.auto_filter format column

fmt');

 

3.2.4 MAIL_FILTER

通过mail_filter 把RFC-822,RFC-2045 信息转化成索引文本

限制:

文档必须是us-ascii

长度不能超过1024bytes

document must be syntactically valid with regard to RFC-822

 

 

3.2.5 USER_FILTER

Use the USER_FILTER type to specify an external filter for filtering documents in a column

 

3.2.6 PROCEDURE_FILTER

Use the PROCEDURE_FILTER type to filter your documents with a stored procedure. The stored procedure is called

each time a document needs to be filtered.

 

3.2.7 参考脚本

--建立null filter

create index myindex on docs(htmlfile) indextype is ctxsys.context

parameters('filter ctxsys.null_filter section group ctxsys.html_section_group');

--建立 auto filter

Create index idx_m_filter on my_filter (docs) indextype is ctxsys.context

parameters ('datastore test_filter filter ctxsys.auto_filter');

 

Filter 错误记录表:CTX_USER_INDEX_ERRORS

 

 

内容概要:本文介绍了ENVI Deep Learning V1.0的操作教程,重点讲解了如何利用ENVI软件进行深度学习模型的训练与应用,以实现遥感图像中特定目标(如集装箱)的自动提取。教程涵盖了从数据准备、标签图像创建、模型初始化与训练,到执行分类及结果优化的完整流程,并介绍了精度评价与通过ENVI Modeler实现一键化建模的方法。系统基于TensorFlow框架,采用ENVINet5(U-Net变体)架构,支持通过点、线、面ROI或分类图生成标签数据,适用于多/高光谱影像的单一类别特征提取。; 适合人群:具备遥感图像处理基础,熟悉ENVI软件操作,从事地理信息、测绘、环境监测等相关领域的技术人员或研究人员,尤其是希望将深度学习技术应用于遥感目标识别的初学者与实践者。; 使用场景及目标:①在遥感影像中自动识别和提取特定地物目标(如车辆、建筑、道路、集装箱等);②掌握ENVI环境下深度学习模型的训练流程与关键参数设置(如Patch Size、Epochs、Class Weight等);③通过模型调优与结果反馈提升分类精度,实现高效自动化信息提取。; 阅读建议:建议结合实际遥感项目边学边练,重点关注标签数据制作、模型参数配置与结果后处理环节,充分利用ENVI Modeler进行自动化建模与参数优化,同时注意软硬件环境(特别是NVIDIA GPU)的配置要求以保障训练效率。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值