Current script goes line by line and gets added into a database, being rendered by jsTree.
There are certain keywords that occur that requires the lines not be added into the tree itself, but to the node above it. Take a look at the example document. The keywords are synonyms/eponyms, clinical, pathology. The result has some tags to help with showing what I mean.
Basically need to modify the script to do that.