<div dir="ltr">It would also be easy to do using Obj-C, with the NSLinguisticTagger API:<div><br></div><div><a href="http://developer.apple.com/library/ios/documentation/cocoa/reference/NSLinguisticTagger_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40009799-CH1-SW42">http://developer.apple.com/library/ios/documentation/cocoa/reference/NSLinguisticTagger_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40009799-CH1-SW42</a><div class="gmail_extra">
<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 6 Jun 2013 07:31:55 -0500<br>
From: Phil Schumm <<a href="mailto:pschumm@uchicago.edu">pschumm@uchicago.edu</a>><br>
To: TextMate users <<a href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</a>><br>
Subject: [TxMt] Re: Find verbs and nouns<br>
Message-ID: <<a href="mailto:2F5211E5-CFDB-4621-9273-56BCF48658C5@uchicago.edu">2F5211E5-CFDB-4621-9273-56BCF48658C5@uchicago.edu</a>><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
On Jun 6, 2013, at 4:58 AM, Ross Ahmed <<a href="mailto:rossahmed@googlemail.com">rossahmed@googlemail.com</a>> wrote:<br>
> Does TextMate have the ability to locate all verbs, nouns and adjectives in a body of text?<br>
<br>
On Jun 6, 2013, at 7:10 AM, Ross Ahmed <<a href="mailto:rossahmed@googlemail.com">rossahmed@googlemail.com</a>> wrote:<br>
> Do you know where I might find such a script?<br>
<br>
<br>
If it were me, I would do this with Python's Natural Language Toolkit (<a href="http://nltk.org" target="_blank">http://nltk.org</a>). Specifically, the examples on this page show how easy it is to extract verbs, nouns and adjectives:<br>
<br>
<a href="http://nltk.org/book/ch05.html" target="_blank">http://nltk.org/book/ch05.html</a><br>
<br>
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).<br>
<br>
<br>
-- Phil<br><br>
</blockquote></div><br></div></div></div>