CN105573968A - 基于规则的文本标引方法 - Google Patents
基于规则的文本标引方法 Download PDFInfo
- Publication number
- CN105573968A CN105573968A CN201510910423.1A CN201510910423A CN105573968A CN 105573968 A CN105573968 A CN 105573968A CN 201510910423 A CN201510910423 A CN 201510910423A CN 105573968 A CN105573968 A CN 105573968A
- Authority
- CN
- China
- Prior art keywords
- feature
- word
- rule
- keyword
- text
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/103—Formatting, i.e. changing of presentation of documents
- G06F40/117—Tagging; Marking up; Designating a block; Setting of attributes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/289—Phrasal analysis, e.g. finite state techniques or chunking
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
一种基于规则的文本标引方法,包括以下步骤:建立特征枚举集合,集合中包括特征词集,特征邻接词集,禁止词集及其他特征变量集合等;建立规则集合,描述当某些特征符合某种同现关系后需要激活哪些标引标签的逻辑;对文本进行特征扫描,得到该文本包含的特征元素集合;对逐一使用规则匹配文本的特征关系集合;符合规则的文本,将根据规则的描述打上相应的标签,并将特征及其同现关系作为线索输出。本发明解决了单纯特征匹配无法在复杂的中文语义下进行准确判断的问题。
Description
技术领域
本发明涉及文本标引的技术领域,具体说是一种基于规则的文本标引方法。
背景技术
随着互联网技术的不断发展,网络已成为巨大的、分布广泛的信息源,在对网络信息进行分析时,往往需要对互联网上的新闻评论、论坛帖子等文本进行分析,判断其中是否有传销广告、色情及其他违规信息,并对其打上相应的标签。
又由于中文语言文本结构非常复杂,业界在文本标引中普遍使用的关键词扫描技术、广告联系方式匹配技术和建模统计技术均无法达到需要的精准度,且此类技术在上线后若需进行效果改善,或遇到新问题急需解决的情况,都存在可操作性差甚至无法人工改善,且改善后上线周期长的问题。
发明内容
本发明要解决的技术问题是提供一种基于规则的文本标引方法。
本发明为解决公知技术中存在的技术问题所采取的技术方案是:
本发明的基于规则的文本标引方法,包括以下步骤:
A、建立包括有关键词集合的知识集合,建立以词为基础的特征集合;
B、将上述特征集合按树形分类分等级并形成词树集,词树集中的每一枝节点作为规则引用的最小集合;
C、建立规则集合,定义文本打标签的条件;
D、扫描文本,对文本进行关键词扫描、分词,提取文本内的关键特征;
E、对提取出的关键特征进行整理,并逐一与规则进行匹配;
F、关键特征与规则成功匹配的,则触发“命中”逻辑,将规则所携带的标签信息及关键特征作为结果输出。
本发明还可以采用以下技术措施:
步骤D之后,对关键词扫描的结果和分词结果进行匹配,删除关键词扫描中输出的歧义关键词。
关键词集合中又包括特征词集、特征邻接词集、禁止词集;特征词集中包括广告特征,色情特征,联系方式特征,禁止词特征。
本发明具有的优点和积极效果是:
本发明的基于规则的文本标引方法,包括以下步骤:建立特征枚举集合,集合中包括特征词集,特征邻接词集,禁止词集及其他特征变量集合等;建立规则集合,描述当某些特征符合某种同现关系后需要激活哪些标引标签的逻辑;对文本进行特征扫描,得到该文本包含的特征元素集合;对逐一使用规则匹配文本的特征关系集合;符合规则的文本,将根据规则的描述打上相应的标签,并将特征及其同现关系作为线索输出。本发明解决了单纯特征匹配无法在复杂的中文语义下进行准确判断的问题。
具体实施方式
以下通过具体实施例对本发明进行详细说明。
本发明的基于规则的文本标引方法,包括以下步骤:
A、建立包括有关键词集合的知识集合,建立以词为基础的特征集合;
B、将上述特征集合按树形分类分等级并形成词树集,词树集中的每一枝节点作为规则引用的最小集合;
C、建立规则集合,定义文本打标签的条件;
D、扫描文本,对文本进行关键词扫描、分词,提取文本内的关键特征;
E、对提取出的关键特征进行整理,并逐一与规则进行匹配;
F、关键特征与规则成功匹配的,则触发“命中”逻辑,将规则所携带的标签信息及关键特征作为结果输出。
步骤D之后,对关键词扫描的结果和分词结果进行匹配,删除关键词扫描中输出的歧义关键词。
关键词集合中又包括特征词集、特征邻接词集、禁止词集;特征词集中包括广告特征,色情特征,联系方式特征,禁止词特征。
实施例1:
下面以广告文本标引为例:
“$Ru_广告_卖考试答案=IsNear(WordFilter(FindWTSSeg("class广告_交易行为"),FindWTS("class广告_交易行为干扰词")),HaveContact(cellphone,0.5),10)&IsHaveWTS("class广告_考试答案")”是网页内的一段对应数据,
本发明的处理步骤如下:
1)关键词扫描得到文中是否有"class广告_交易行为""class广告_交易行为干扰词""class广告_考试答案"类的特征词(FindWTSSeg,FindWTS,IsHaveWTS);
2)对"class广告_交易行为"类词的扫描结果和分词结果进行匹配,删除不符合中文分词语法的误命中词(例如“本店有售”出现在“本店有售后服务”中的情况)(FindWTSSeg);
3)对文本进行联系方式提取,得到文中的联系方式权值在0.5以上的手机号码特征(HaveContact);
4)class广告_交易行为干扰词"的特征词结果,对"class广告_交易行为"进行干扰词排除,将"class广告_交易行为"的命中词更加精确化(WordFilter);
5)对"class广告_交易行为"和手机号特征进行距离检查,找出在文中出现两特征距离小于10个字的特征组合(IsNear);
6)若5步骤的特征组合存在,且(&)文中同时存在"class广告_考试答案"的特征词,则此规则命中,将对此文本打上名为“广告_卖考试答案”的标签。
以上所述,仅是本发明的较佳实施例而已,并非对本发明作任何形式上的限制,虽然本发明已以较佳实施例公开如上,然而,并非用以限定本发明,任何熟悉本专业的技术人员,在不脱离本发明技术方案范围内,当然会利用揭示的技术内容作出些许更动或修饰,成为等同变化的等效实施例,但凡是未脱离本发明技术方案的内容,依据本发明的技术实质对以上实施例所作的任何简单修改、等同变化与修饰,均属于本发明技术方案的范围内。
Claims (3)
1.一种基于规则的文本标引方法,包括以下步骤:
A、建立包括有关键词集合的知识集合,建立以词为基础的特征集合;
B、将上述特征集合按树形分类分等级并形成词树集,词树集中的每一枝节点作为规则引用的最小集合;
C、建立规则集合,定义文本打标签的条件;
D、扫描文本,对文本进行关键词扫描、分词,提取文本内的关键特征;
E、对提取出的关键特征进行整理,并逐一与规则进行匹配;
F、关键特征与规则成功匹配的,则触发“命中”逻辑,将规则所携带的标签信息及关键特征作为结果输出。
2.根据权利要求1所述的基于规则的文本标引方法,其特征在于:步骤D之后,对关键词扫描的结果和分词结果进行匹配,删除关键词扫描中输出的歧义关键词。
3.根据权利要求1所述的基于规则的文本标引方法,其特征在于:关键词集合中又包括特征词集、特征邻接词集、禁止词集;特征词集中包括广告特征,色情特征,联系方式特征,禁止词特征。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510910423.1A CN105573968A (zh) | 2015-12-10 | 2015-12-10 | 基于规则的文本标引方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510910423.1A CN105573968A (zh) | 2015-12-10 | 2015-12-10 | 基于规则的文本标引方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105573968A true CN105573968A (zh) | 2016-05-11 |
Family
ID=55884121
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510910423.1A Pending CN105573968A (zh) | 2015-12-10 | 2015-12-10 | 基于规则的文本标引方法 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105573968A (zh) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108153895A (zh) * | 2018-01-06 | 2018-06-12 | 国网福建省电力有限公司 | 一种基于开放数据的语料库构建方法和系统 |
CN109002443A (zh) * | 2017-06-06 | 2018-12-14 | 北京国双科技有限公司 | 一种文本信息的分类方法及装置 |
CN111199143A (zh) * | 2018-10-31 | 2020-05-26 | 北大方正集团有限公司 | Word论文的标引方法、装置、设备及存储介质 |
CN113095039A (zh) * | 2021-03-09 | 2021-07-09 | 智慧芽信息科技(苏州)有限公司 | 对文件自定义字段标引的处理方法、装置、服务器 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6442606B1 (en) * | 1999-08-12 | 2002-08-27 | Inktomi Corporation | Method and apparatus for identifying spoof documents |
EP2045737A2 (en) * | 2007-10-05 | 2009-04-08 | Fujitsu Limited | Selecting tags for a document by analysing paragraphs of the document |
CN102207945A (zh) * | 2010-05-11 | 2011-10-05 | 天津海量信息技术有限公司 | 基于知识网络的文本标引系统及其方法 |
CN102208992A (zh) * | 2010-06-13 | 2011-10-05 | 天津海量信息技术有限公司 | 面向互联网的不良信息过滤系统及其方法 |
CN103198057A (zh) * | 2012-01-05 | 2013-07-10 | 深圳市腾讯计算机系统有限公司 | 一种自动给文档添加标签的方法和装置 |
CN104216876A (zh) * | 2013-05-29 | 2014-12-17 | 中国电信股份有限公司 | 信息文本过滤方法及系统 |
-
2015
- 2015-12-10 CN CN201510910423.1A patent/CN105573968A/zh active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6442606B1 (en) * | 1999-08-12 | 2002-08-27 | Inktomi Corporation | Method and apparatus for identifying spoof documents |
EP2045737A2 (en) * | 2007-10-05 | 2009-04-08 | Fujitsu Limited | Selecting tags for a document by analysing paragraphs of the document |
CN102207945A (zh) * | 2010-05-11 | 2011-10-05 | 天津海量信息技术有限公司 | 基于知识网络的文本标引系统及其方法 |
CN102208992A (zh) * | 2010-06-13 | 2011-10-05 | 天津海量信息技术有限公司 | 面向互联网的不良信息过滤系统及其方法 |
CN103198057A (zh) * | 2012-01-05 | 2013-07-10 | 深圳市腾讯计算机系统有限公司 | 一种自动给文档添加标签的方法和装置 |
CN104216876A (zh) * | 2013-05-29 | 2014-12-17 | 中国电信股份有限公司 | 信息文本过滤方法及系统 |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109002443A (zh) * | 2017-06-06 | 2018-12-14 | 北京国双科技有限公司 | 一种文本信息的分类方法及装置 |
CN109002443B (zh) * | 2017-06-06 | 2021-12-28 | 北京国双科技有限公司 | 一种文本信息的分类方法及装置 |
CN108153895A (zh) * | 2018-01-06 | 2018-06-12 | 国网福建省电力有限公司 | 一种基于开放数据的语料库构建方法和系统 |
CN111199143A (zh) * | 2018-10-31 | 2020-05-26 | 北大方正集团有限公司 | Word论文的标引方法、装置、设备及存储介质 |
CN113095039A (zh) * | 2021-03-09 | 2021-07-09 | 智慧芽信息科技(苏州)有限公司 | 对文件自定义字段标引的处理方法、装置、服务器 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
AU2015252513B2 (en) | Method and system for filtering goods evaluation information | |
Petz et al. | Reprint of: Computational approaches for mining user’s opinions on the Web 2.0 | |
Aisopos et al. | Content vs. context for sentiment analysis: a comparative analysis over microblogs | |
Gokulakrishnan et al. | Opinion mining and sentiment analysis on a twitter data stream | |
CN100462980C (zh) | 内容相关广告识别方法和内容相关广告服务器 | |
Spitters et al. | Authorship analysis on dark marketplace forums | |
Chatzakou et al. | Harvesting opinions and emotions from social media textual resources | |
CN105573968A (zh) | 基于规则的文本标引方法 | |
Song et al. | Opinion mining in e-learning system | |
Jurgens et al. | Twitter users# codeswitch hashtags!# moltoimportante# wow | |
CN106933878B (zh) | 一种信息处理方法及装置 | |
US20160283582A1 (en) | Device and method for detecting similar text, and application | |
Samha et al. | Aspect-based opinion mining from product reviews using conditional random fields | |
Nguyen et al. | On predicting religion labels in microblogging networks | |
Tsapatsoulis et al. | Feature extraction for tweet classification: Do the humans perform better? | |
Hammond et al. | Examining attention given to threats to elephant conservation on social media | |
Sattikar et al. | Natural language processing for content analysis in social networking | |
Peisenieks et al. | Uses of machine translation in the sentiment analysis of tweets | |
de Zarate et al. | Measuring controversy in social networks through nlp | |
Zubiaga et al. | Political homophily in independence movements: analyzing and classifying social media users by national identity | |
Aldahawi et al. | Twitter mining in the oil business: A sentiment analysis approach | |
CN112529629A (zh) | 恶意用户评论刷量行为识别方法及系统 | |
CN104462065A (zh) | 事件情感类型的分析方法和装置 | |
CN106708932A (zh) | 问答类网站的回复的摘要提取方法及装置 | |
Rubtsova et al. | Aspect extraction from reviews using conditional random fields |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: 300020 Tianjin Heping District, South Road, No. 11 International Building 23 purchase of Wheat Applicant after: Tianjin mass information technology Limited by Share Ltd Address before: 300020 Tianjin Heping District, South Road, No. 11 International Building 23 purchase of Wheat Applicant before: Tianjin Hylanda Information Technology Co.,Ltd. |
|
COR | Change of bibliographic data | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160511 |