Finding Peoples' Names in Files

Diez B. Roggisch deets at nospam.web.de
Thu Oct 11 11:46:45 EDT 2007


brad wrote:

> cokofreedom at gmail.com wrote:
>> On Oct 11, 5:22 pm, brad <byte8b... at gmail.com> wrote:
>>> Crazy question, but has anyone attempted this or seen Python code that
>>> does? For example, if a text file contained 'Guido' and or 'Robert' and
>>> or 'Susan', then we should return True, otherwise return False.
>> 
>> Can't you just use the string function .findall() ?
>> 
> 
> I mean *any* possible person's name... I don't *know* the names
> beforehand :)

Erm, now what's a persons name then? Maybe there is a Viagra Cialis living
in ... Caracas. Or so. Or a Woodshed Ribcage in Oregon... who knows?

And what about variable names - peters_temp a name? It's amazing what lack
of creativity in variable names can result in...

So - unless you come up with positive list of what you consider a name,
you're pretty much out of luck.

diez



More information about the Python-list mailing list