Re: a simple question about a tricky problem

Hi Martin, did you solve your problem by now?
Would that be s.th. like the found <w> word element sits in a relative clause which is a nested clause in a sentence/main clause, and you'd like to find surrounding words crossing the relative clause's end, i.e. also from the higher level? Sorry if I'm not using proper terminology here - not a native English speaker, my grammar knowledge is rusty and I'm not familiar with the TEI structure. Could you maybe give a very small + simple ("minimal") example of such a TEI-encoded text that illustrates the problem? Should be a working TEI-XML file, i.e. parsable with lxml.
Are there some higher level structures which boundaries' your search for the surrounding 7 words should never cross? Then maybe you could instead iterate over these higher level structures, "flatten" all its <w> and <pc> (or any other relevant) descendants, ignoring <note>s, for further processing and then work on such a flattened list. Best regards, Holger Landesbank Baden-Wuerttemberg Anstalt des oeffentlichen Rechts Hauptsitze: Stuttgart, Karlsruhe, Mannheim, Mainz HRA 12704 Amtsgericht Stuttgart HRA 4356, HRA 104 440 Amtsgericht Mannheim HRA 40687 Amtsgericht Mainz Die LBBW verarbeitet gemaess Erfordernissen der DSGVO Ihre personenbezogenen Daten. Informationen finden Sie unter https://www.lbbw.de/datenschutz.
participants (1)
-
Holger.Joukl@LBBW.de