CREATE TABLE langs(lid    INTEGER PRIMARY KEY AUTOINCREMENT,
                            lang   TEXT UNIQUE,
                            locale TEXT UNIQUE,
                            pages  INTEGER DEFAULT 0,  -- total pages in this language
                            words  INTEGER DEFAULT 0);
langs
CREATE TABLE pages(pid INTEGER PRIMARY KEY AUTOINCREMENT,
                            lid INTEGER REFERENCES langs(lid) ON UPDATE CASCADE ON DELETE CASCADE,
                            page INTEGER DEFAULT NULL, -- wikipedia page id
                            revision INTEGER DEFAULT NULL, -- wikipedia revision page id
                            title TEXT,
                            words INTEGER DEFAULT 0, -- number of different words in this page
                            UNIQUE(lid,page,title));
pages
CREATE TABLE words(wid INTEGER PRIMARY KEY AUTOINCREMENT,
                            word        TEXT UNIQUE,
                            occurrences INTEGER DEFAULT 0);
words
CREATE TABLE langs_words(lid INTEGER REFERENCES langs(lid) ON UPDATE CASCADE ON DELETE CASCADE,
                                        wid INTEGER REFERENCES words(wid) ON UPDATE CASCADE ON DELETE CASCADE,
                                        occurrences INTEGER, -- repetitions of this word in this language
                                        PRIMARY KEY(lid,wid))
                                        WITHOUT ROWID;
langs_words
CREATE TABLE pages_words(pid INTEGER REFERENCES pages(pid) ON UPDATE CASCADE ON DELETE CASCADE,
                                        wid INTEGER REFERENCES words(wid) ON UPDATE CASCADE ON DELETE CASCADE,
                                        occurrences INTEGER DEFAULT 0, -- times this word appears into this page
                                        PRIMARY KEY(pid,wid))
                                        WITHOUT ROWID;
pages_words
CREATE TABLE biwords(lid    INTEGER REFERENCES langs(lid) ON UPDATE CASCADE ON DELETE CASCADE,
                                w1st   INTEGER REFERENCES words(wid) ON UPDATE CASCADE ON DELETE CASCADE,
                                w2nd   INTEGER REFERENCES words(wid) ON UPDATE CASCADE ON DELETE CASCADE,
                                occurrences INTEGER DEFAULT 0, -- times this pair appears in this language/page
                                PRIMARY KEY(lid,w1st,w2nd))
                                WITHOUT ROWID;
biwords
original_column_name,column_name,column_description,data_format,value_description
pid,page id,page id of Wikipedia about Catalan language,integer,
lid,language id,language id ,integer,"commonsense evidence: 
lid=1 means it's Catalan language"
page,,wikipedia page id,integer,
revision,,wikipedia revision page id,integer,
title,,The title of this Catalan language Wikipedia page,text,
words,,number of different words in this page,integer,
pages
original_column_name,column_name,column_description,data_format,value_description
wid,word id,The word id of the Catalan language,integer,The value is unique.
word,,The word itself,text,
occurrences,,The occurrences of the specific word,integer,
words
original_column_name,column_name,column_description,data_format,value_description
pid,page id,page id of Wikipedia about Catalan language,integer,
wid,word id,The word id of the Catalan language,integer,The value is unique.
occurrences,,times of this word appears into this page,integer,
pages_words
original_column_name,column_name,column_description,data_format,value_description
lid,language id,language id ,integer,"commonsense evidence: 
lid=1 means it's Catalan language."
wid,word id,The word id of the Catalan language,integer,
occurrences,,repetitions of this word in this language,integer,it's INTEGER and DEFAULT is 0.
langs_words
original_column_name,column_name,column_description,data_format,value_description
lid,language id,language id ,integer,"commonsense evidence: 
lid=1 means it's the Catalan language.
"
lang,language,language name ,text,"commonsense evidence:
 ca means Catalan language."
locale,,The locale of the language,text,
pages,,total pages of Wikipedia in this language,integer,
words,,total number of words in this pages,integer,
langs
original_column_name,column_name,column_description,data_format,value_description
lid,language id,language id ,integer,"commonsense evidence: 
lid=1 means it's Catalan language.
"
w1st,word id of the first word,The word id of the first word of the biwords pair. ,integer,The value is unique.
w2nd,word id of the second word,The word id of the second word of the biwords pair. ,integer,The value is unique.
occurrences,,times of this pair appears in this language/page,integer,
biwords