|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|
|
|
|
|
|
|
|
|
|
|
CREATE DATABASE `sme_wikipedia_2021_10K`; |
|
|
|
USE `sme_wikipedia_2021_10K`; |
|
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `co_n`; |
|
CREATE TABLE `co_n` ( |
|
`w1_id` int(10) unsigned NOT NULL default '0', |
|
`w2_id` int(10) unsigned NOT NULL default '0', |
|
`freq` int(8) unsigned default NULL, |
|
`sig` float(8) default NULL, |
|
PRIMARY KEY `w1_w2` (`w1_id`,`w2_id`), |
|
KEY `w1_sig` (`w1_id`,`sig`), |
|
KEY `w2_sig` (`w2_id`,`sig`) |
|
) ENGINE=MyISAM CHARSET=utf8mb4; |
|
|
|
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `co_s`; |
|
CREATE TABLE `co_s` ( |
|
`w1_id` int(10) unsigned NOT NULL default '0', |
|
`w2_id` int(10) unsigned NOT NULL default '0', |
|
`freq` int(8) unsigned default NULL, |
|
`sig` float(8) default NULL, |
|
PRIMARY KEY `w1_w2` (`w1_id`,`w2_id`), |
|
KEY `w1_sig` (`w1_id`,`sig`), |
|
KEY `w2_sig` (`w2_id`,`sig`) |
|
) ENGINE=MyISAM CHARSET=utf8mb4; |
|
|
|
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `inv_so`; |
|
CREATE TABLE `inv_so` ( |
|
`so_id` int(10) unsigned NOT NULL default '0', |
|
`s_id` int(10) unsigned NOT NULL default '0', |
|
KEY `s_id` (`s_id`), |
|
KEY `so_id` (`so_id`) |
|
) ENGINE=MyISAM CHARSET=utf8mb4; |
|
|
|
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `inv_w`; |
|
CREATE TABLE `inv_w` ( |
|
`w_id` int(10) unsigned NOT NULL default '0', |
|
`s_id` int(10) unsigned NOT NULL default '0', |
|
`pos` mediumint(2) unsigned NOT NULL default '0', |
|
KEY `w_id` (`w_id`), |
|
KEY `s_id` (`s_id`), |
|
KEY `w_s` (`w_id`,`s_id`) |
|
) ENGINE=MyISAM CHARSET=utf8mb4; |
|
|
|
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `sentences`; |
|
CREATE TABLE `sentences` ( |
|
`s_id` int(10) unsigned NOT NULL auto_increment, |
|
`sentence` text NOT NULL, |
|
PRIMARY KEY `s_id` (`s_id`) |
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
|
|
|
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `sources`; |
|
CREATE TABLE `sources` ( |
|
`so_id` int(10) unsigned NOT NULL auto_increment, |
|
`source` varchar(255) default NULL, |
|
`date` date default NULL, |
|
PRIMARY KEY `so_id` (`so_id`), |
|
KEY `date` (`date`) |
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
|
|
|
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `words`; |
|
CREATE TABLE `words` ( |
|
`w_id` int(10) unsigned NOT NULL auto_increment, |
|
`word` varchar(255) character set utf8mb4 collate utf8mb4_bin NOT NULL, |
|
`freq` int(10) unsigned default NULL, |
|
PRIMARY KEY `w_id` (`w_id`), |
|
UNIQUE KEY `word` (`word`(250)) |
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
|
|
|
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `sentences_tagged`; |
|
CREATE TABLE `sentences_tagged` ( |
|
`s_id` int(10) unsigned NOT NULL, |
|
`sentence` text, |
|
PRIMARY KEY `s_id` (`s_id`) |
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
|
|
|
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `words_pos_base`; |
|
CREATE TABLE `words_pos_base` ( |
|
`w_id` int(10) unsigned NOT NULL DEFAULT '0', |
|
`word` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, |
|
`pos` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, |
|
`pos_ud17` varchar(64) SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '', |
|
`base_form` varchar(256) SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '', |
|
`freq` int(8) unsigned DEFAULT NULL, |
|
UNIQUE KEY `w_id` (`w_id`, `word`(128), `pos`, `base_form`(128)), |
|
KEY `i_w_id` (`w_id`), |
|
KEY `i_word` (`word`) |
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
|
|
|
|
|
|
|
|
|
|
|
|
|
ALTER TABLE `co_n` DISABLE KEYS; |
|
ALTER TABLE `co_s` DISABLE KEYS; |
|
ALTER TABLE `inv_so` DISABLE KEYS; |
|
ALTER TABLE `inv_w` DISABLE KEYS; |
|
ALTER TABLE `sentences` DISABLE KEYS; |
|
ALTER TABLE `sources` DISABLE KEYS; |
|
ALTER TABLE `words` DISABLE KEYS; |
|
ALTER TABLE `sentences_tagged` DISABLE KEYS; |
|
ALTER TABLE `words_pos_base` DISABLE KEYS; |
|
|
|
|
|
|
|
|
|
|
|
LOAD DATA LOCAL INFILE 'sme_wikipedia_2021_10K-words.txt' INTO TABLE words; |
|
LOAD DATA LOCAL INFILE 'sme_wikipedia_2021_10K-sentences.txt' INTO TABLE sentences; |
|
LOAD DATA LOCAL INFILE 'sme_wikipedia_2021_10K-co_s.txt' INTO TABLE co_s; |
|
LOAD DATA LOCAL INFILE 'sme_wikipedia_2021_10K-co_n.txt' INTO TABLE co_n; |
|
LOAD DATA LOCAL INFILE 'sme_wikipedia_2021_10K-inv_w.txt' INTO TABLE inv_w; |
|
LOAD DATA LOCAL INFILE 'sme_wikipedia_2021_10K-inv_so.txt' INTO TABLE inv_so; |
|
LOAD DATA LOCAL INFILE 'sme_wikipedia_2021_10K-sources.txt' INTO TABLE sources; |
|
|
|
|
|
|
|
|
|
|
|
ALTER TABLE `co_n` ENABLE KEYS; |
|
ALTER TABLE `co_s` ENABLE KEYS; |
|
ALTER TABLE `inv_so` ENABLE KEYS; |
|
ALTER TABLE `inv_w` ENABLE KEYS; |
|
ALTER TABLE `sentences` ENABLE KEYS; |
|
ALTER TABLE `sources` ENABLE KEYS; |
|
ALTER TABLE `words` ENABLE KEYS; |
|
ALTER TABLE `sentences_tagged` ENABLE KEYS; |
|
ALTER TABLE `words_pos_base` ENABLE KEYS; |
|
|
|
|
|
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|
; |
|
|