We create the tables to store the data. The news_table stores the documents to be classified. The news_categories table stores the categories and rules that define our categories. The news_id_cat table stores the document ids and their associated categories after classification.
create table news_table (
tk number primary key not null,
title varchar2(1000),
text clob);
create table news_categories (
queryid number primary key not null,
category varchar2(100),
query varchar2(2000));
create table news_id_cat (
tk number,
category_id number);