[TxMt] Re: Find verbs and nouns
Phil Schumm
pschumm at uchicago.edu
Thu Jun 6 12:31:55 UTC 2013
On Jun 6, 2013, at 4:58 AM, Ross Ahmed <rossahmed at googlemail.com> wrote:
> Does TextMate have the ability to locate all verbs, nouns and adjectives in a body of text?
On Jun 6, 2013, at 7:10 AM, Ross Ahmed <rossahmed at googlemail.com> wrote:
> Do you know where I might find such a script?
If it were me, I would do this with Python's Natural Language Toolkit (http://nltk.org). Specifically, the examples on this page show how easy it is to extract verbs, nouns and adjectives:
http://nltk.org/book/ch05.html
It would be very straightforward to write a small Python script that would use the NLTK to identify each of these types of words from a string, and then if you want call this from TextMate (e.g., passing the current window content as input).
-- Phil
More information about the textmate
mailing list