Let's say the dictionary has two definitions for live:
- Live: I live by the sea.
- Live: The match was shown live on the sports channel.
and also contains the following definition:
Live it up: Live it up like there's no tomorrow!
A native speaker of English will easily differentiate between these different meanings for a range of different sentences, for example:
- I prefer to live in a house. (Live1)
- Kennedy was shot on live TV. (Live2)
- Live football. (Live2) probably.
- Live and breathe football. (Live1)
- Live it up girl! (Live it up)
- ... is live... (Live2)
- ... live or... (Live1), (Live2) or even (Live or let die). More context is needed.
I have built my own corpus with 10 million words. This corpus supplies me with words or groups of words and their frequencies. I can query the corpus after the word "live" and get the following result:
- to live
- live in
- live with
- to live in
- live up
- live up to
- live on
where the word is show in its most common contexts.
What I wish to do is to complement this list by tagging it in the following manner:
- live (Live1: 80%, Live2: 20%)
- to live (Live1: 100%)
- live in (Live1: 95%, Live2: 5%)
- live with (Live1: 95%, Live2: 5%)
- to live in (Live1: 100%)
- live up (Live1: 90%, Live2: 10%)
- live up to (Live1: 95%, Live2: 5%)
- live on (Live1: 70%, Live2: 30%)
- who live (Live1: 100%)
- live it up (Live it up: 100%)
Live1 and Live2 tags should be associated with "live on" since you can have "Shown live on tv" or "I live on a farm". The percentages relate to the probability that a particular meaning is associated with the group in question. "live up" is more than likely Live1 but it is possible that it is Live2, in the case: "I am watching the match live up in my room".
Note that "living" or "lived" are not present in my list. I'm only interested in the word itself and groups of words in which it might be found. No plurals or the likes of the word in question are present in the list either.
Another example for the word "soap":
- soap (80% Soap1, 20% Soap2)
- the soap (80% SOAP, 20% Soap2)
- soap operas (100% Soap opera)
- of soap (100% Soap1)
- soap opera (100% Soap opera)
where I define the following meanings:
- Soap1: I wash myself with soap.
- Soap2: Dallas is my favorite soap.
- Soap opera: Dallas is my favorite soap opera.
I don't make the connection between "soap" and "soap opera", hence Soap2 and Soap opera.
So, I currently have my own corpus and the facility to request for a word its most common contexts. How would you suggest I produce tagging along the lines of those specified above? What api's might help me, for example? What theories should I research? Perhaps there are api's or theories which might not give me exactly what I'm looking for but might still be of interest.