I want a code for tagging idioms in a given sentence or text using NLTK and Python.
-
5And I want to read the question.Maciej Ziarko– Maciej Ziarko2011-03-07 08:59:53 +00:00Commented Mar 7, 2011 at 8:59
-
7And If you get this answer your company should pay SORafi– Rafi2011-03-07 09:06:18 +00:00Commented Mar 7, 2011 at 9:06
-
1Do you mean part of speech tagging?Joe– Joe2011-03-08 14:41:00 +00:00Commented Mar 8, 2011 at 14:41
1 Answer
Depends what you mean by an "idiom". Joe's suggestion of POS tagging is probably a good start - and might be what you are really after. If so, go read "Natural Language Processing with Python" by Bird et al. It is published by O'Reilly but is also available online under a Creative Commons license. This will get you started with POS tagging. It also has a good review of NLTK's abilities. For example, can some "Named Entity Recognition" techniques be adapted to do what you want? Or perhaps what you want is simply too difficult. I suspect the latter is the case (as implied by Rafi) but you will find that out in your journey. Perhaps you'll develop something new during your journey, in which case I hope you give back to the NLTK community.