AW: AW: [Metafacture] Character classes in data source

Böhme, Christoph C.Boehme at dnb.de
Mon Oct 28 18:05:31 CET 2013


Hi Pascal,

As Markus merged the current implementation already, we can leave it for now. I think, for a more solid integration of the new matching patterns, the implementation of the WildcardTrie should be modified to support character classes natively. I cannot see a reason at the moment why this should not be part of the standard implementation. 

Alternatively, Metamorph could be extended support different types of matchers. The user could then use an attribute on the <metamorph> element to choose a matcher class that should be used in a certain script. I am not convinced though that this is a good idea whe looking at the future of Metamorph because the way a certain matcher works may affect other behaviours of the language.

Cheers,
Christoph


> -----Ursprüngliche Nachricht-----
> Von: metafacture-bounces at lists.dnb.de [mailto:metafacture-
> bounces at lists.dnb.de] Im Auftrag von Christoph, Pascal
> Gesendet: Donnerstag, 17. Oktober 2013 11:39
> An: Böhme, Christoph
> Cc: metafacture at lists.dnb.de
> Betreff: Re: AW: [Metafacture] Character classes in data source
> 
> Hi Christoph,
> 
> Am 16.10.2013 19:34 schrieb Böhme, Christoph :
> 
> > it is currently not possible to use character classes. You would have to extend the
> WildcardTrie class [1] to support more elaborate matching patterns. I reckon it
> should not be incredibly difficult to add support for character classes. We do not
> have any plans for implementing this at the moment, though. Perhaps you could
> give it a try yourself?
> 
> Yes, I have done this already, see the pull request[1].
> I am not sure how to embed that new functionality, though. As you can see in
> [1] I made a wrapper, for the WildardTrie is final and thus cannot be extended.
> #135 provides a metamorph test, too. To make it simple for now, the new class
> is instantiated at the WildcardDataRegistry , which is obviously not a good
> place resp. needs renaming.
> I would be glad if you have a more solid notion of integrating this new class.
> Renaming is also fine with me.
> 
> -o
> 
> [1] https://github.com/culturegraph/metafacture-core/pull/135
> 
> > Best,
> > Christoph
> >
> >
> >
> > [1] https://github.com/culturegraph/metafacture-
> core/blob/master/src/main/java/org/culturegraph/mf/util/tries/WildcardTrie.java
> >
> >
> >
> >> -----Ursprüngliche Nachricht-----
> >> Von: metafacture-bounces at lists.dnb.de [mailto:metafacture-
> >> bounces at lists.dnb.de] Im Auftrag von Christoph, Pascal
> >> Gesendet: Mittwoch, 16. Oktober 2013 10:42
> >> An: metafacture at lists.dnb.de
> >> Betreff: [Metafacture] Character classes in data source
> >>
> >> Hello *,
> >>
> >> in metamorph, is there a possibility to use more then wildcards ('*','?')
> >> defining the data source? I would like to use simple character classes. For
> >> instance, something like this:
> >>
> >> <rules>
> >> 	<data source="902-1.9|907-1.9|.../>
> >> </rules>
> >>
> >> should be expressable by this:
> >>
> >> <rules>
> >> 	<data source="9[0123445678][27]-[-1].9/>
> >> </rules>
> >>
> >> -o
> >>
> >> _______________________________________________
> >> Metafacture mailing list
> >> Metafacture at lists.dnb.de
> >> http://lists.dnb.de/mailman/listinfo/metafacture
> >
> 
> _______________________________________________
> Metafacture mailing list
> Metafacture at lists.dnb.de
> http://lists.dnb.de/mailman/listinfo/metafacture



More information about the Metafacture mailing list