I\'m looking for a java driven solution to a requirement for analysing sentences to log whether a key word was used positively or negatively.
Ie The key word might
I doubt there's anything like that. Lucene definitely can't do it out of the box.
How do you even define "whether a key word was used positively or negatively" in a way that can be evaluated programmatically? To do it properly, you'd have to analyse the text for their actual meaning, which is an AI problem that is not even remotely solved.
I suppose you could solve it approximately by just doing a statistical analysis of whether the keyword appears more often close to positive (like, good, great, wonderful) or negative (bad, hate, crappy, damn) keywords, but even there, negations, sarcasm and complex sentence structures will be problematic.