Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nested tags #3

Closed
kuczera opened this issue Mar 27, 2024 · 0 comments
Closed

nested tags #3

kuczera opened this issue Mar 27, 2024 · 0 comments

Comments

@kuczera
Copy link
Member

kuczera commented Mar 27, 2024

The actual version does not handle nested tags:

CALL apoc.periodic.iterate('MATCH (n) RETURN n', 'DETACH DELETE n', {batchSize:1000}); CALL apoc.schema.assert({},{},true) YIELD label, key RETURN *; create (r:Text {identifier:'[RI XIII] H. 15 n. 101', summary:'Kg. F. teilt Kammerer und Rat der Stadt Regensburg mit, daß er als Vormund des Königs (von Böhmen und Ungarn) Ladislaus (Postumus) einerseits sowie die Brüder Hans und Heinrich, Hzz. zu Lüben (<em>Löbin</em>)<sup>1</sup>, andererseits glauben, Ansprüche auf die Länder und Städte Liegnitz und <i>Goldberg<sup>2</sup> zu</i>) haben. Deshalb habe er auf den <em>nechsten montag nach sant Veits schierstkunftigen</em> (Juni 21) einen Tag nach Breslau angesetzt und an mehrere Fürsten, Herren und Mannen geschrieben, diesen Tag zu besuchen<sup>3</sup>. <em>Als richter</em> in dieser Angelegenheit habe er den Bf. Peter (Nowag) von Breslau <em>geordnet</em><sup>4</sup>; er bittet sie, ebenfalls eine Botschaft zu schicken, um Reinprecht von Ebersdorf und anderen, die er dorthin senden werde, <em>rat und beystand ze tun</em>. Er (Kg. F.) habe auch den Breslauern befohlen, ihnen hierzu Sicherheit und Geleit zu erteilen<sup>5</sup>.'}); MATCH (t:Text {identifier:'[RI XIII] H. 15 n. 101'}) CALL atag.text.import.html(t, 'summary', 'Annotation', 'text', 'HAS_ANNOTATION') YIELD node RETURN node;

What we would need would be the direct connection between the Text-Node an the i-Annotation-Node. There is no need to keep the nesting information.

This query leads to the right result.
match (t:Text)-[:HAS_ANNOTATION]->(b:Annotation {tag:'b'})-[r2:HAS_ANNOTATION]->(i:Annotation {tag:'i'}) create (t)-[:HAS_ANNOTATION]->(i) delete r2 return *;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant