Difference between revisions of "OmegaWiki"
Jump to navigation
Jump to search
(New page: The OmegaWiki database layout is pretty dreadful, hopefully this will make things slightly easier for anyone brave enough to look near it. ==Retrieving a list of POS tags== First find th...) |
|||
Line 23: | Line 23: | ||
mysql> select option_id,attribute_id,option_mid,uw_option_attribute_options.language_id,uw_defined_meaning.expression_id,spelling |
mysql> select option_id,attribute_id,option_mid,uw_option_attribute_options.language_id,uw_defined_meaning.expression_id,spelling |
||
-> from uw_option_attribute_options,uw_defined_meaning,uw_expression_ns |
-> from uw_option_attribute_options,uw_defined_meaning,uw_expression_ns |
||
-> where attribute_id = '409106' and uw_option_attribute_options.language_id = '153' and |
-> where attribute_id = '409106' and uw_option_attribute_options.language_id = '153' and |
||
-> uw_defined_meaning.defined_meaning_id = option_mid and uw_expression_ns.expression_id = |
|||
-> uw_defined_meaning.expression_id; |
|||
+-----------+--------------+------------+-------------+---------------+-----------+ |
+-----------+--------------+------------+-------------+---------------+-----------+ |
||
| option_id | attribute_id | option_mid | language_id | expression_id | spelling | |
| option_id | attribute_id | option_mid | language_id | expression_id | spelling | |
Revision as of 11:26, 30 July 2007
The OmegaWiki database layout is pretty dreadful, hopefully this will make things slightly easier for anyone brave enough to look near it.
Retrieving a list of POS tags
First find the language which you would like to retrieve the POS tags for:
mysql> select * from language_names where language_name = 'Welsh'; +-------------+------------------+---------------+ | language_id | name_language_id | language_name | +-------------+------------------+---------------+ | 153 | 85 | Welsh | | 153 | 89 | Welsh | +-------------+------------------+---------------+ 2 rows in set (0.00 sec)
So the language_id
is '153', we'll need to use this later on.
Now we need to retrieve the list of parts of speech, to do this we need 3 tables:
mysql> select option_id,attribute_id,option_mid,uw_option_attribute_options.language_id,uw_defined_meaning.expression_id,spelling -> from uw_option_attribute_options,uw_defined_meaning,uw_expression_ns -> where attribute_id = '409106' and uw_option_attribute_options.language_id = '153' and -> uw_defined_meaning.defined_meaning_id = option_mid and uw_expression_ns.expression_id = -> uw_defined_meaning.expression_id; +-----------+--------------+------------+-------------+---------------+-----------+ | option_id | attribute_id | option_mid | language_id | expression_id | spelling | +-----------+--------------+------------+-------------+---------------+-----------+ | 435748 | 409106 | 5612 | 153 | 121924 | noun | | 435751 | 409106 | 6100 | 153 | 124600 | verb | | 435753 | 409106 | 6102 | 153 | 124610 | adjective | +-----------+--------------+------------+-------------+---------------+-----------+ 3 rows in set (0.00 sec)
uw_expression_ns.spelling
is the way the word is spelt.uw_defined_meaning.defined_meaning_id
is the "defined meaning" of the part of speech, e.g. it describes what a "verb" is, or an "adjective".uw_option_attribute_options.attribute_id
defines that this "defined meaning" is a "part of speech" option.