summaryrefslogtreecommitdiff
path: root/definition.py
diff options
context:
space:
mode:
authorJoe Robinson <joe@lc8n.com>2014-10-04 17:58:43 +0100
committerJoe Robinson <joe@lc8n.com>2014-10-04 17:58:43 +0100
commit7fa9083eb83e96eb53f7b8ca39634bc34d8f38c0 (patch)
tree4c048446fe1f26b5565a445539998ab92dab7fbb /definition.py
parent05b3990f3d81ea66cbca6e4e6e2bfb8294318931 (diff)
Fixes, cleanup, move definition class to own file
Diffstat (limited to 'definition.py')
-rw-r--r--definition.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/definition.py b/definition.py
new file mode 100644
index 0000000..877888d
--- /dev/null
+++ b/definition.py
@@ -0,0 +1,24 @@
+class Definition(object):
+
+ #ID is relative to the word type, eg noun 1, noun 2, verb 1, verb 2, not to the entire list
+ id = 0
+ word = ""
+ dictionary = ""
+ word_type = ""
+ definition = ""
+ uses = []
+ synonyms = []
+ antonyms = []
+ categories = []
+
+ def __init__(self, word, id, dictionary, word_type, definition, uses = [], synonyms = [], antonyms = [], categories= [], see_also = False):
+ self.word = word
+ self.id = id
+ self.dictionary = dictionary
+ self.word_type = word_type
+ self.definition = definition
+ self.uses = uses
+ self.synonyms = synonyms
+ self.antonyms = antonyms
+ self.categories = categories
+ self.see_also = see_also \ No newline at end of file