Re: Python's re module and genealogy problem

2014-06-13 Thread BrJohan
On 11/06/2014 14:23, BrJohan wrote: For some genealogical purposes I consider using Python's re module. Rather many names can be spelled in a number of similar ways, and in order to match names even if they are spelled differently, I will build regular expressions, each of which is supposed to

Re: Python's re module and genealogy problem

2014-06-13 Thread Peter Otten
BrJohan wrote: On 11/06/2014 14:23, BrJohan wrote: For some genealogical purposes I consider using Python's re module. Rather many names can be spelled in a number of similar ways, and in order to match names even if they are spelled differently, I will build regular expressions, each of

Re: Python's re module and genealogy problem

2014-06-13 Thread Dan Sommers
On Fri, 13 Jun 2014 17:17:06 +0200, BrJohan wrote: Or to put the namevariants in some sequence of sets having elements like: (Kristina, Christina, Cristine, Kristine) Matching is then just applying the 'in' operator. That's definitely a better approach, for the reasons you mentioned.

Python's re module and genealogy problem

2014-06-11 Thread BrJohan
For some genealogical purposes I consider using Python's re module. Rather many names can be spelled in a number of similar ways, and in order to match names even if they are spelled differently, I will build regular expressions, each of which is supposed to match a number of similar names.

Re: Python's re module and genealogy problem

2014-06-11 Thread Robert Kern
On 2014-06-11 13:23, BrJohan wrote: For some genealogical purposes I consider using Python's re module. Rather many names can be spelled in a number of similar ways, and in order to match names even if they are spelled differently, I will build regular expressions, each of which is supposed to

Re: Python's re module and genealogy problem

2014-06-11 Thread Thomas Rachel
Am 11.06.2014 14:23 schrieb BrJohan: Can it, for a pair of regular expressions be decided whether at least one string matching both of those regular expressions, can be constructed? If it is possible to make such a decision, then how? Anyone aware of an algorithm for this? Just a

Re: Python's re module and genealogy problem

2014-06-11 Thread Mark H Harris
On 6/11/14 8:26 AM, Robert Kern wrote: Anyways, to your new problem, yes it's possible. Search for regular expression intersection for possible approaches. I agree, I would not use a decision (decision tree) but would consider a set of filters from most specific to least specific. marcus

Re: Python's re module and genealogy problem

2014-06-11 Thread Michael Torrie
On 06/11/2014 06:23 AM, BrJohan wrote: For some genealogical purposes I consider using Python's re module. Rather many names can be spelled in a number of similar ways, and in order to match names even if they are spelled differently, I will build regular expressions, each of which is

Re: Python's re module and genealogy problem

2014-06-11 Thread Nick Cash
On 06/11/2014 10:35 AM, Michael Torrie wrote: On 06/11/2014 06:23 AM, BrJohan wrote: For some genealogical purposes I consider using Python's re module. Rather many names can be spelled in a number of similar ways, and in order to match names even if they are spelled differently, I will

Re: Python's re module and genealogy problem

2014-06-11 Thread Simon Ward
On 11 June 2014 13:23:14 BST, BrJohan brjo...@gmail.com wrote: For some genealogical purposes I consider using Python's re module. Rather many names can be spelled in a number of similar ways, and in order to match names even if they are spelled differently, I will build regular expressions,

Re: Python's re module and genealogy problem

2014-06-11 Thread Vlastimil Brom
2014-06-11 14:23 GMT+02:00 BrJohan brjo...@gmail.com: For some genealogical purposes I consider using Python's re module. ... Now, my problem: Is there a way to decide whether any two - or more - of those regular expressions will match the same string? Or, stated a little differently: Can