|
Posted by markdavies2003 on 07/12/07 18:24
Assume the following table, where the columns represent two-word
strings (word1 and word2) and the part of speech of the second word,
along with their frequency:
[TagTable]
freq word1 word2 partOfSpeechWord2
---- ---- ---- ----
1 the plant verb (incorrectly tagged)
21 the plant noun
6 to plant verb
27 to stop verb
3 to stop noun (incorrectly tagged)
4 the stop noun
I want to generate the following list, which show the most frequent
partOfSpeech for a given word1 / word2 combination, e.g.:
21 the plant noun
6 to plant verb
27 to stop verb
4 the stop noun
(but would not include the following, which are presumably errors from
a part of speech tagger):
1 the plant verb
3 to stop noun
What's the SELECT command to get the four correct results above?
----------------------------------------
A somewhat more complicated scenario --
Assume the same [TagTable] above, and then another table with NULL
partOfSpeech tags:
[NeedsTag]
word1 word2 partOfSpeechWord2
---- ---- ----
the plant NULL
to plant NULL
to stop NULL
the stop NULL
What would be the correct UPDATE command to insert noun, verb, verb,
noun (in that order) into this table, based on the most frequent tag
from the first table (i.e. ignoring the incorrect "the plant = V" and
"to stop = N")?
Thanks in advance for your help.
Mark Davies
[Back to original message]
|