Date: Thu, 6 Jun 2013 07:31:55 -0500
From: Phil Schumm <pschumm(a)uchicago.edu>
To: TextMate users <textmate(a)lists.macromates.com>
Subject: [TxMt] Re: Find verbs and nouns
Content-Type: text/plain; charset=us-ascii
On Jun 6, 2013, at 4:58 AM, Ross Ahmed <rossahmed(a)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(a)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 (
). Specifically, the examples on this page show how easy
it is to extract verbs, nouns and adjectives:
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).