lib/EarleyItem.js
function EarleyItem(parameters) {
  // A unique identifier is constructed from rule, dot and from
  this.id = "Earley(" + parameters.rule.lhs + "->" + parameters.rule.rhs + 
    ", " + parameters.dot + ", " + parameters.from + ", " + parameters.to +")";
  logger.debug("EarleyItem: " + this.id);
  this.name = parameters.rule.lhs;
  this.children = [];

  this.data = {};
  this.data.rule = parameters.rule;
  this.data.dot = parameters.dot;
  this.data.from = parameters.from;
  this.data.to = parameters.to;
  if (global.config.UNIFICATION) {
    this.data.fs = parameters.fs;
  }
}
function EarleyItem(parameters) {
  // A unique identifier is constructed from rule, dot and from
  this.id = "Earley(" + parameters.rule.lhs + "->" + parameters.rule.rhs + 
    ", " + parameters.dot + ", " + parameters.from + ", " + parameters.to +")";
  logger.debug("EarleyItem: " + this.id);
  this.name = parameters.rule.lhs;
  this.children = [];

  this.data = {};
  this.data.rule = parameters.rule;
  this.data.dot = parameters.dot;
  this.data.from = parameters.from;
  this.data.to = parameters.to;
  if (global.config.UNIFICATION) {
    this.data.fs = parameters.fs;
  }
}
function EarleyItem ( parameters ) { // A unique identifier is constructed from rule, dot and from this . id = "Earley(" + parameters . rule . lhs + "->" + parameters . rule . rhs + ", " + parameters . dot + ", " + parameters . from + ", " + parameters . to + ")" ; logger . debug ( "EarleyItem: " + this . id ) ; this . name = parameters . rule . lhs ; this . children = [ ] ; this . data = { } ; this . data . rule = parameters . rule ; this . data . dot = parameters . dot ; this . data . from = parameters . from ; this . data . to = parameters . to ; if ( global . config . UNIFICATION ) { this . data . fs = parameters . fs ; } }
Creates an item; dot is an index in the RHS of the rule, from is the starting point in the sentence Data structure is prepared for InfoVis
Creates an item ; dot is an index in the RHS of the rule from is the starting point in the sentence Data structure is prepared for InfoVis