src/tag/averaged-perceptron.js
function createContext(sentence) {
  const context = new Array(sentence.length + 4);
        context[0] = START[0];
        context[1] = START[1];

  for (let j = 0, m = sentence.length; j < m; j++)
    context[j + 2] = normalize(sentence[j][0]);

  context[context.length - 2] = END[0];
  context[context.length - 1] = END[1];

  return context;
}
function createContext(sentence) {
  const context = new Array(sentence.length + 4);
        context[0] = START[0];
        context[1] = START[1];

  for (let j = 0, m = sentence.length; j < m; j++)
    context[j + 2] = normalize(sentence[j][0]);

  context[context.length - 2] = END[0];
  context[context.length - 1] = END[1];

  return context;
}
function createContext ( sentence ) { const context = new Array ( sentence . length + 4 ) ; context [ 0 ] = START [ 0 ] ; context [ 1 ] = START [ 1 ] ; for ( let j = 0 , m = sentence . length ; j < m ; j ++ ) context [ j + 2 ] = normalize ( sentence [ j ] [ 0 ] ) ; context [ context . length - 2 ] = END [ 0 ] ; context [ context . length - 1 ] = END [ 1 ] ; return context ; }
Function used to build a context from the given tokenized sentence.

@param  {array} sentence - Target sentence.
@return {array}          - Context.
Function used to build a context from the given tokenized sentence .