From 3aceae8ab1eb5992110ea57a9479bbc3177feb21 Mon Sep 17 00:00:00 2001
From: Kelly Rauchenberger <fefferburbia@gmail.com>
Date: Wed, 16 Mar 2016 11:27:16 -0400
Subject: Added more inflections, word relationships, and pronunciations

Nouns, adjectives, and adverbs now have inflected forms. A large number of WordNet word relationships (all noun-noun relationships, plus synonymy and antonymy for all word types except verbs) have been added. Additionally, CMUDICT is now being used to store word pronunciations for rhyming purposes. Verbly is now also a compiled library rather than being header-only due to the complexity of the query interface.
---
 schema.sql | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 54 insertions(+), 5 deletions(-)

(limited to 'schema.sql')

diff --git a/schema.sql b/schema.sql
index 62dd780..fd55734 100644
--- a/schema.sql
+++ b/schema.sql
@@ -34,20 +34,25 @@ CREATE TABLE `verb_groups` (
 DROP TABLE IF EXISTS `adjectives`;
 CREATE TABLE `adjectives` (
   `adjective_id` INTEGER PRIMARY KEY,
-  `form` VARCHAR(32) NOT NULL,
+  `base_form` VARCHAR(32) NOT NULL,
+  `comparative` VARCHAR(32),
+  `superlative` VARCHAR(32),
   `position` CHAR(1)
 );
 
 DROP TABLE IF EXISTS `adverbs`;
 CREATE TABLE `adverbs` (
   `adverb_id` INTEGER PRIMARY KEY,
-  `form` VARCHAR(32) NOT NULL
+  `base_form` VARCHAR(32) NOT NULL,
+  `comparative` VARCHAR(32),
+  `superlative` VARCHAR(32)
 );
 
 DROP TABLE IF EXISTS `nouns`;
 CREATE TABLE `nouns` (
   `noun_id` INTEGER PRIMARY KEY,
-  `form` VARCHAR(32) NOT NULL
+  `singular` VARCHAR(32) NOT NULL,
+  `plural` VARCHAR(32)
 );
 
 DROP TABLE IF EXISTS `hypernymy`;
@@ -146,10 +151,54 @@ CREATE TABLE `mannernymy` (
   FOREIGN KEY (`mannernym_id`) REFERENCES `adverbs`(`adverb_id`)
 );
 
-DROP TABLE IF EXISTS `synonymy`;
-CREATE TABLE `synonymy` (
+DROP TABLE IF EXISTS `noun_synonymy`;
+CREATE TABLE `noun_synonymy` (
+  `noun_1_id` INTEGER NOT NULL,
+  `noun_2_id` INTEGER NOT NULL,
+  FOREIGN KEY (`noun_1_id`) REFERENCES `nouns`(`nouns_id`),
+  FOREIGN KEY (`noun_2_id`) REFERENCES `nouns`(`nouns_id`)
+);
+
+DROP TABLE IF EXISTS `adjective_synonymy`;
+CREATE TABLE `adjective_synonymy` (
   `adjective_1_id` INTEGER NOT NULL,
   `adjective_2_id` INTEGER NOT NULL,
   FOREIGN KEY (`adjective_1_id`) REFERENCES `adjectives`(`adjective_id`),
   FOREIGN KEY (`adjective_2_id`) REFERENCES `adjectives`(`adjective_id`)
 );
+
+DROP TABLE IF EXISTS `adverb_synonymy`;
+CREATE TABLE `adverb_synonymy` (
+  `adverb_1_id` INTEGER NOT NULL,
+  `adverb_2_id` INTEGER NOT NULL,
+  FOREIGN KEY (`adverb_1_id`) REFERENCES `adverbs`(`adverb_id`),
+  FOREIGN KEY (`adverb_2_id`) REFERENCES `adverbs`(`adverb_id`)
+);
+
+DROP TABLE IF EXISTS `noun_pronunciations`;
+CREATE TABLE `noun_pronunciations` (
+  `noun_id` INTEGER NOT NULL,
+  `pronunciation` VARCHAR(64) NOT NULL,
+  FOREIGN KEY (`noun_id`) REFERENCES `nouns`(`noun_id`)
+);
+
+DROP TABLE IF EXISTS `verb_pronunciations`;
+CREATE TABLE `verb_pronunciations` (
+  `verb_id` INTEGER NOT NULL,
+  `pronunciation` VARCHAR(64) NOT NULL,
+  FOREIGN KEY (`verb_id`) REFERENCES `verbs`(`verb_id`)
+);
+
+DROP TABLE IF EXISTS `adjective_pronunciations`;
+CREATE TABLE `adjective_pronunciations` (
+  `adjective_id` INTEGER NOT NULL,
+  `pronunciation` VARCHAR(64) NOT NULL,
+  FOREIGN KEY (`adjective_id`) REFERENCES `adjectives`(`adjective_id`)
+);
+
+DROP TABLE IF EXISTS `adverb_pronunciations`;
+CREATE TABLE `adverb_pronunciations` (
+  `adverb_id` INTEGER NOT NULL,
+  `pronunciation` VARCHAR(64) NOT NULL,
+  FOREIGN KEY (`adverb_id`) REFERENCES `adverbs`(`adverb_id`)
+);
-- 
cgit 1.4.1

