#!/usr/bin/env python # coding: utf-8 # # Duplicate structure headings (N1904GBI) # In[1]: get_ipython().run_line_magic('load_ext', 'autoreload') get_ipython().run_line_magic('autoreload', '2') # In[2]: # Loading the New Testament TextFabric code # Note: it is assumed Text-Fabric is installed in your environment. from tf.fabric import Fabric from tf.app import use # In[76]: # load the app and data N1904 = use ("tonyjurg/Nestle1904GBI", version="0.3", hoist=globals()) # In[52]: T.structureInfo() # In[53]: T.hdMult # In[54]: T.text(240744) # In[55]: T.text(240746) # In[68]: N1904.plain(240744) F.otype.v(240744) # In[67]: N1904.plain(240746) F.otype.v(240746) # Possibly related to?: # # ``` # 0.03s Removing unlinked nodes ... # | | 0.00s 25 unlinked "phrase" nodes: [1, 10018, 27166, 46044, 49656] ... # | | 0.00s 25 unlinked nodes # ``` # In[81]: for i in (1, 10018, 27166, 46044, 49656): N1904.plain(i) print(F.otype.v(1)) # In[49]: for NodeType in F.otype.all: print (NodeType, F.otype.sInterval(NodeType)) # The nodes are not sorted: # In[80]: N1904.plain(240744) WordNodeList=L.d(240744,otype='word') for node in WordNodeList: print (node,F.nodeID.v(node),F.sentence.v(node)) # In[79]: N1904.plain(240746) WordNodeList=L.d(240746,otype='word') for node in WordNodeList: print (node,F.nodeID.v(node),F.sentence.v(node)) # In[84]: FeatureList=Fall() print ('Node=123290') for Feature in FeatureList: print (Feature,Fs(Feature).v(123290)) print ('\nNode=123291') for Feature in FeatureList: print (Feature,Fs(Feature).v(123291)) # # Check release '0.4' # In[3]: # load the app and data N1904_4 = use ("tonyjurg/Nestle1904GBI", version="0.4", hoist=globals()) # In[4]: T.structureInfo() # Conclusion: duplicate structure problem resolved with new release. # In[ ]: