Skip to content

Commit

Permalink
update demo
Browse files Browse the repository at this point in the history
  • Loading branch information
kristw committed Oct 18, 2017
1 parent 53f2c97 commit 5e53289
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demo/src/main-simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import { SentenTreeBuilder, SentenTreeVis, tokenizer } from '../../src/main.js';
const container = document.querySelector('#vis');
container.innerHTML = 'Loading ...';

tsv('data/test_thai.tsv', (error, rawdata) => {
tsv('data/demo.tsv', (error, rawdata) => {
const data = rawdata.map(d => Object.assign({}, d, { count: +d.count }));
console.time('Build model');
const model = new SentenTreeBuilder()
.tokenize(tokenizer.tokenizeBySpace)
.transformToken(token => (/score(d|s)?/.test(token) ? 'score' : token))
.buildModel(data, { maxSupportRatio: 1 });
.buildModel(data);
console.timeEnd('Build model');

container.innerHTML = '';
Expand Down

0 comments on commit 5e53289

Please sign in to comment.