sql HANA上的文本挖掘演示

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql HANA上的文本挖掘演示相关的知识,希望对你有一定的参考价值。

DROP TABLE TM_TEXTS;
CREATE COLUMN TABLE TM_TEXTS (
	id int PRIMARY KEY,
	doc varchar(5000)
);

DROP SEQUENCE TM_ID;
CREATE SEQUENCE TM_ID START WITH 10; 

INSERT INTO TM_TEXTS VALUES (TM_ID.NEXTVAL, 'We didn''t start the fire.');
INSERT INTO TM_TEXTS VALUES (TM_ID.NEXTVAL, ':D');
INSERT INTO TM_TEXTS VALUES (TM_ID.NEXTVAL, ':P');
INSERT INTO TM_TEXTS VALUES (TM_ID.NEXTVAL, ':)');
INSERT INTO TM_TEXTS VALUES (TM_ID.NEXTVAL, ';)');
INSERT INTO TM_TEXTS VALUES (TM_ID.NEXTVAL, '=)');
INSERT INTO TM_TEXTS VALUES (TM_ID.NEXTVAL, '(:');
INSERT INTO TM_TEXTS VALUES (TM_ID.NEXTVAL, ':>');
INSERT INTO TM_TEXTS VALUES (TM_ID.NEXTVAL, ':<');
INSERT INTO TM_TEXTS VALUES (TM_ID.NEXTVAL, ':(');
INSERT INTO TM_TEXTS VALUES (TM_ID.NEXTVAL, '>.<');
INSERT INTO TM_TEXTS VALUES (TM_ID.NEXTVAL, '=(');
INSERT INTO TM_TEXTS VALUES (TM_ID.NEXTVAL, ':d');
INSERT INTO TM_TEXTS VALUES (TM_ID.NEXTVAL, ':O');
INSERT INTO TM_TEXTS VALUES (TM_ID.NEXTVAL, 'I love fires.');
SELECT * FROM TM_TEXTS;


DROP FULLTEXT INDEX TM_TEXTS_FTI;

CREATE FULLTEXT Index TM_TEXTS_FTI On TM_TEXTS(doc) 	
	TEXT ANALYSIS ON
	CONFIGURATION 'EXTRACTION_CORE_VOICEOFCUSTOMER';
	
SELECT * FROM "$TA_TM_TEXTS_FTI" WHERE TA_TYPE IN ('WeakPositiveEmoticon', 'StrongPositiveEmoticon', 'WeakNegativeEmoticon', 'StrongNegativeEmoticon');

以上是关于sql HANA上的文本挖掘演示的主要内容,如果未能解决你的问题,请参考以下文章

文本挖掘在科研选题上的应用操作要点提示

Python PDF挖掘获取文本在每一行上的位置

HANA系列SAP HANA SQL/MDX及TCP/IP端口介绍

R tm 文本挖掘中的自冲突停用词

sql 插入TQuery hana

sql sentencia SAP HANA