Linker/Cookbook

From BioAssist
Jump to: navigation, search

Boot process

Files

  1. default.py
  2. wikifier_ui.js

Flow

  • default.py script called: creates the tool bar / page frames and loads the home page which calls the showLoad function on startup
 <FRAME onload="showload()"
  • The enrich() function
  • wikifier_ui.js mit_enrich

Identification of sites

Files

  1. sources.js
  2. sourcesCore.js

Flow

  • Sources.js: var SourceInfo[]: is an array of all the sites identified by the linker.
    • o = order in source popdown menu
    • g = group
    • l = label
    • u = URL
    • c = check function. Returns true / false whether this is a supported site. All of these functions are called in a loop to check if the page being displayed is supported or not.
    • p = process text function. Processes the HTML text between two supported files
    • i = unique id
  • SourcesCore.js: contains the functions defined by the 'c' and 'p'

Text Parsing

Files

  1. sources_core.js
  2. wikifier_parsing.js

Flow

  • sources_core.js IsURLToEnrich() : iterates over all the “c” functions to check if the site is recognized or not
  • sources_core.js ProcessPage() : evals the “p” function to extraction text markers from the page
  • wikifier_base.getTextValue()
  • wikifier_parsing.indexNode()
  • wikifier_parsing.getText()
  • Check cache if the indexing for this page exits, if not make a call for indexing.
  • wikifier_base.getTextValue(node, include, offset, clear, index, ahref)
    • node: the DOM node, starting from which the text needs to be extracted.
    • include:
    • offset
    • clear
    • index
    • href
    • wikifier_parsing.getText()

Concept Cache