function(str, lex) {
  if (lex) {
    w.plugin({
      words: lex
    });
  }
  let doc = buildText(str, w);
  doc.tagger();
  return doc;
}
function(str, lex) {
  if (lex) {
    w.plugin({
      words: lex
    });
  }
  let doc = buildText(str, w);
  doc.tagger();
  return doc;
}
function ( str , lex ) { if ( lex ) { w . plugin ( { words : lex } ) ; } let doc = buildText ( str , w ) ; doc . tagger ( ) ; return doc ; }
the main function
the main function
Build a text document