language analysis to enforce code standards

Bruce C. Baker bcb at
Thu Jul 9 23:28:46 EDT 2009

"Jason S. Friedman" <jason at> wrote in message 
news:mailman.2927.1247192026.8015.python-list at
> Hello, I administer the Informatica ETL tool at my company.  Part of that 
> role involves creating and enforcing standards.  I want the Informatica 
> developers to add comments to certain key objects and I want to be able to 
> verify (in an automated fashion) that they have done so.
> I cannot merely check for non-emptiness; that is trivial to circumvent. On 
> the other hand, I probably do not need to be able to catch developers who 
> are determined to not create comments.  There are not too many of them and 
> perhaps they will find it is easier to write a (useful) comment than to 
> game the system.
> Any thoughts on how I might proceed?  Stated plainly, how can I tell when 
> a string more-or-less forms at least one phrase?

Well, you *could* try analyzing the comment text using NLTK:

More information about the Python-list mailing list