------------------------------
Message: 2
Date: Thu, 6 Jun 2013 07:31:55 -0500
From: Phil Schumm <pschumm@uchicago.edu>
To: TextMate users <textmate@lists.macromates.com>
Subject: [TxMt] Re: Find verbs and nouns
Message-ID: <2F5211E5-CFDB-4621-9273-56BCF48658C5@uchicago.edu>
Content-Type: text/plain; charset=us-ascii
On Jun 6, 2013, at 4:58 AM, Ross Ahmed <rossahmed@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@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